From 731ec347b15ff4f39b93708a660d58d370dff0c3 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 11 Nov 2017 09:26:23 +0000 Subject: [PATCH 001/175] Removed old template parser --- boot.php | 9 - doc/themes.md | 4 +- include/template_processor.php | 311 ------------------------------ include/text.php | 1 - view/theme/duepuntozero/theme.php | 2 +- view/theme/frio/theme.php | 2 +- view/theme/frost-mobile/theme.php | 2 +- view/theme/frost/theme.php | 2 +- view/theme/smoothly/theme.php | 2 +- view/theme/vier/theme.php | 2 +- 10 files changed, 8 insertions(+), 329 deletions(-) delete mode 100644 include/template_processor.php diff --git a/boot.php b/boot.php index 4e20058bc..8492701a0 100644 --- a/boot.php +++ b/boot.php @@ -1527,15 +1527,6 @@ function get_spoolpath() return ""; } -/// @deprecated -function set_template_engine(App $a, $engine = 'internal') -{ - /// @note This function is no longer necessary, but keep it as a wrapper to the class method - /// to avoid breaking themes again unnecessarily - /// @TODO maybe output a warning here so the theme developer can see it? PHP won't show such warnings like Java does. - - $a->set_template_engine($engine); -} if (!function_exists('exif_imagetype')) { function exif_imagetype($file) diff --git a/doc/themes.md b/doc/themes.md index fc21b19d6..531ff9c16 100644 --- a/doc/themes.md +++ b/doc/themes.md @@ -172,7 +172,7 @@ The content of this file should be something like $a-> theme_info = array( 'extends' => 'duepuntozero'. ); - set_template_engine($a, 'smarty3'); + $a->set_template_engine('smarty3'); /* and more stuff e.g. the JavaScript function for the header */ } @@ -253,7 +253,7 @@ So in the case of quattro it is function quattro_init(App $a) { $a->theme_info = array(); - set_template_engine($a, 'smarty3'); + $a->set_template_engine('smarty3'); } Here we have set the basic theme information, in this case they are empty. diff --git a/include/template_processor.php b/include/template_processor.php deleted file mode 100644 index 252375a06..000000000 --- a/include/template_processor.php +++ /dev/null @@ -1,311 +0,0 @@ - 5.3, not certain how to code around it for unit tests -// case PREG_BAD_UTF8_OFFSET_ERROR: echo('PREG_BAD_UTF8_OFFSET_ERROR'); break; - default: - //die("Unknown preg error."); - return; - } - echo "
";
-		debug_print_backtrace();
-		die();
-	}
-
-	private function _push_stack() {
-		$this->stack[] = array($this->r, $this->nodes);
-	}
-
-	private function _pop_stack() {
-		list($this->r, $this->nodes) = array_pop($this->stack);
-	}
-
-	private function _get_var($name, $retNoKey = false) {
-		$keys = array_map('trim', explode(".", $name));
-		if ($retNoKey && !array_key_exists($keys[0], $this->r))
-			return KEY_NOT_EXISTS;
-		$val = $this->r;
-		foreach ($keys as $k) {
-			$val = (isset($val[$k]) ? $val[$k] : null);
-		}
-		return $val;
-	}
-
-	/**
-	 * IF node
-	 * 
-	 * {{ if <$var> }}...[{{ else }} ...] {{ endif }}
-	 * {{ if <$var>== }}...[{{ else }} ...]{{ endif }}
-	 * {{ if <$var>!= }}...[{{ else }} ...]{{ endif }}
-	 */
-	private function _replcb_if ($args) {
-		if (strpos($args[2], "==") > 0) {
-			list($a, $b) = array_map("trim", explode("==", $args[2]));
-			$a = $this->_get_var($a);
-			if ($b[0] == "$")
-				$b = $this->_get_var($b);
-			$val = ($a == $b);
-		} else if (strpos($args[2], "!=") > 0) {
-			list($a, $b) = array_map("trim", explode("!=", $args[2]));
-			$a = $this->_get_var($a);
-			if ($b[0] == "$")
-				$b = $this->_get_var($b);
-			$val = ($a != $b);
-		} else {
-			$val = $this->_get_var($args[2]);
-		}
-		$x = preg_split("|{{ *else *}}|", $args[3]);
-		return ( $val ? $x[0] : (isset($x[1]) ? $x[1] : ""));
-	}
-
-	/**
-	 * FOR node
-	 * 
-	 * {{ for <$var> as $name }}...{{ endfor }}
-	 * {{ for <$var> as $key=>$name }}...{{ endfor }}
-	 */
-	private function _replcb_for ($args) {
-		$m = array_map('trim', explode(" as ", $args[2]));
-		$x = explode("=>", $m[1]);
-		if (count($x) == 1) {
-			$varname = $x[0];
-			$keyname = "";
-		} else {
-			list($keyname, $varname) = $x;
-		}
-		if ($m[0] == "" || $varname == "" || is_null($varname))
-			die("template error: 'for " . $m[0] . " as " . $varname . "'");
-		//$vals = $this->r[$m[0]];
-		$vals = $this->_get_var($m[0]);
-		$ret = "";
-		if (!is_array($vals)) {
-			return $ret;
-		}
-		foreach ($vals as $k => $v) {
-			$this->_push_stack();
-			$r = $this->r;
-			$r[$varname] = $v;
-			if ($keyname != '') {
-				$r[$keyname] = (($k === 0) ? '0' : $k);
-			}
-			$ret .= $this->replace($args[3], $r);
-			$this->_pop_stack();
-		}
-		return $ret;
-	}
-
-	/**
-	 * INC node
-	 * 
-	 * {{ inc  [with $var1=$var2] }}{{ endinc }}
-	 */
-	private function _replcb_inc($args) {
-		if (strpos($args[2], "with")) {
-			list($tplfile, $newctx) = array_map('trim', explode("with", $args[2]));
-		} else {
-			$tplfile = trim($args[2]);
-			$newctx = null;
-		}
-
-		if ($tplfile[0] == "$")
-			$tplfile = $this->_get_var($tplfile);
-
-		$this->_push_stack();
-		$r = $this->r;
-		if (!is_null($newctx)) {
-			list($a, $b) = array_map('trim', explode("=", $newctx));
-			$r[$a] = $this->_get_var($b);
-		}
-		$this->nodes = Array();
-		$tpl = get_markup_template($tplfile);
-		$ret = $this->replace($tpl, $r);
-		$this->_pop_stack();
-		return $ret;
-	}
-
-	/**
-	 * DEBUG node
-	 * 
-	 * {{ debug $var [$var [$var [...]]] }}{{ enddebug }}
-	 * 
-	 * replace node with 
var_dump($var, $var, ...);
- */ - private function _replcb_debug($args) { - $vars = array_map('trim', explode(" ", $args[2])); - $vars[] = $args[1]; - - $ret = "
";
-		foreach ($vars as $var) {
-			$ret .= htmlspecialchars(var_export($this->_get_var($var), true));
-			$ret .= "\n";
-		}
-		$ret .= "
"; - return $ret; - } - - private function _replcb_node($m) { - $node = $this->nodes[$m[1]]; - if (method_exists($this, "_replcb_" . $node[1])) { - $s = call_user_func(array($this, "_replcb_" . $node[1]), $node); - } else { - $s = ""; - } - $s = preg_replace_callback('/\|\|([0-9]+)\|\|/', array($this, "_replcb_node"), $s); - return $s; - } - - private function _replcb($m) { - //var_dump(array_map('htmlspecialchars', $m)); - $this->done = false; - $this->nodes[] = (array) $m; - return "||" . (count($this->nodes) - 1) . "||"; - } - - private function _build_nodes($s) { - $this->done = false; - while (!$this->done) { - $this->done = true; - $s = preg_replace_callback('|{{ *([a-z]*) *([^}]*)}}([^{]*({{ *else *}}[^{]*)?){{ *end\1 *}}|', array($this, "_replcb"), $s); - if ($s == Null) - $this->_preg_error(); - } - //({{ *else *}}[^{]*)? - krsort($this->nodes); - return $s; - } - - private function var_replace($s) { - $m = array(); - /** regexp: - * \$ literal $ - * (\[)? optional open square bracket - * ([a-zA-Z0-9-_]+\.?)+ var name, followed by optional - * dot, repeated at least 1 time - * (|[a-zA-Z0-9-_:]+)* pipe followed by filter name and args, zero or many - * (?(1)\]) if there was opened square bracket - * (subgrup 1), match close bracket - */ - if (preg_match_all('/\$(\[)?([a-zA-Z0-9-_]+\.?)+(\|[a-zA-Z0-9-_:]+)*(?(1)\])/', $s, $m)) { - foreach ($m[0] as $var) { - - $exp = str_replace(array("[", "]"), array("", ""), $var); - $exptks = explode("|", $exp); - - $varn = $exptks[0]; - unset($exptks[0]); - $val = $this->_get_var($varn, true); - if ($val != KEY_NOT_EXISTS) { - /* run filters */ - /* - * Filter are in form of: - * filtername:arg:arg:arg - * - * "filtername" is function name - * "arg"s are optional, var value is appended to the end - * if one "arg"==='x' , is replaced with var value - * - * examples: - * $item.body|htmlspecialchars // escape html chars - * $item.body|htmlspecialchars|strtoupper // escape html and uppercase result - * $item.created|date:%Y %M %j // format date (created is a timestamp) - * $item.body|str_replace:cat:dog // replace all "cat" with "dog" - * $item.body|str_replace:cat:dog:x:1 // replace one "cat" with "dog" - - */ - foreach ($exptks as $filterstr) { - $filter = explode(":", $filterstr); - $filtername = $filter[0]; - unset($filter[0]); - $valkey = array_search("x", $filter); - if ($valkey === false) { - $filter[] = $val; - } else { - $filter[$valkey] = $val; - } - if (function_exists($filtername)) { - $val = call_user_func_array($filtername, $filter); - } - } - $s = str_replace($var, $val, $s); - } - } - } - - return $s; - } - - // TemplateEngine interface - public function replace_macros($s, $r) { - $this->r = $r; - - // remove comments block - $s = preg_replace('/{#(.*?\s*?)*?#}/', "", $s); - - $s = $this->_build_nodes($s); - - $s = preg_replace_callback('/\|\|([0-9]+)\|\|/', array($this, "_replcb_node"), $s); - if ($s == Null) - $this->_preg_error(); - - // replace strings recursively (limit to 10 loops) - $os = ""; - $count = 0; - while ($os != $s && $count < 10) { - $os = $s; - $count++; - $s = $this->var_replace($s); - } - return template_unescape($s); - } - - public function get_template_file($file, $root='') { - $a = get_app(); - $template_file = get_template_file($a, $file, $root); - $content = file_get_contents($template_file); - return $content; - } - -} - - -function template_escape($s) { - - return str_replace(array('$', '{{'), array('!_Doll^Ars1Az_!', '!_DoubLe^BraceS4Rw_!'), $s); -} - -function template_unescape($s) { - - return str_replace(array('!_Doll^Ars1Az_!', '!_DoubLe^BraceS4Rw_!'), array('$', '{{'), $s); -} - diff --git a/include/text.php b/include/text.php index 54595452c..04cf11550 100644 --- a/include/text.php +++ b/include/text.php @@ -6,7 +6,6 @@ use Friendica\Core\PConfig; use Friendica\Core\System; use Friendica\Database\DBM; -require_once "include/template_processor.php"; require_once "include/friendica_smarty.php"; require_once "include/Smilies.php"; require_once "include/map.php"; diff --git a/view/theme/duepuntozero/theme.php b/view/theme/duepuntozero/theme.php index a8ec75352..02882ca94 100644 --- a/view/theme/duepuntozero/theme.php +++ b/view/theme/duepuntozero/theme.php @@ -6,7 +6,7 @@ use Friendica\Core\PConfig; function duepuntozero_init(App $a) { -set_template_engine($a, 'smarty3'); +$a->set_template_engine('smarty3'); $colorset = PConfig::get( local_user(), 'duepuntozero','colorset'); if (!$colorset) diff --git a/view/theme/frio/theme.php b/view/theme/frio/theme.php index 70cac3b3a..35e40aa96 100644 --- a/view/theme/frio/theme.php +++ b/view/theme/frio/theme.php @@ -22,7 +22,7 @@ function frio_init(App $a) { // disable the events module link in the profile tab $a->theme_events_in_profile = false; - set_template_engine($a, 'smarty3'); + $a->set_template_engine('smarty3'); $baseurl = System::baseUrl(); diff --git a/view/theme/frost-mobile/theme.php b/view/theme/frost-mobile/theme.php index 2d104dc75..20b304d87 100644 --- a/view/theme/frost-mobile/theme.php +++ b/view/theme/frost-mobile/theme.php @@ -18,7 +18,7 @@ function frost_mobile_init(App $a) { $a->videoheight = 200; $a->theme_thread_allow = false; $a->force_max_items = 10; - set_template_engine($a, 'smarty3'); + $a->set_template_engine('smarty3'); } function frost_mobile_content_loaded(App $a) { diff --git a/view/theme/frost/theme.php b/view/theme/frost/theme.php index 4c38b605d..a504a542d 100644 --- a/view/theme/frost/theme.php +++ b/view/theme/frost/theme.php @@ -16,7 +16,7 @@ function frost_init(App $a) { $a->videowidth = 400; $a->videoheight = 330; $a->theme_thread_allow = false; - set_template_engine($a, 'smarty3'); + $a->set_template_engine('smarty3'); } function frost_content_loaded(App $a) { diff --git a/view/theme/smoothly/theme.php b/view/theme/smoothly/theme.php index 293836af1..555b65eed 100644 --- a/view/theme/smoothly/theme.php +++ b/view/theme/smoothly/theme.php @@ -14,7 +14,7 @@ use Friendica\App; use Friendica\Core\System; function smoothly_init(App $a) { - set_template_engine($a, 'smarty3'); + $a->set_template_engine('smarty3'); $cssFile = null; $ssl_state = null; diff --git a/view/theme/vier/theme.php b/view/theme/vier/theme.php index e0c385e5e..7f58b214e 100644 --- a/view/theme/vier/theme.php +++ b/view/theme/vier/theme.php @@ -23,7 +23,7 @@ function vier_init(App $a) { $a->theme_events_in_profile = false; - set_template_engine($a, 'smarty3'); + $a->set_template_engine('smarty3'); if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] || $a->argv[0] === "network" && local_user()) { vier_community_info(); From 4d146acf90376db9b09eaa5c98835be81a55c7f8 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Sat, 11 Nov 2017 07:21:15 -0500 Subject: [PATCH 002/175] Smilies to src Move Smilies to Friendica\Content namespace. Related to #3878 --- include/bbcode.php | 2 +- include/text.php | 2 +- mod/message.php | 6 +-- mod/smilies.php | 6 +-- {include => src/Content}/Smilies.php | 72 ++++++++++++++++------------ 5 files changed, 49 insertions(+), 39 deletions(-) rename {include => src/Content}/Smilies.php (83%) diff --git a/include/bbcode.php b/include/bbcode.php index a61160547..89311e775 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -1,6 +1,7 @@ argv[1] === "json") { $tmp = Smilies::get_list(); $results = array(); diff --git a/include/Smilies.php b/src/Content/Smilies.php similarity index 83% rename from include/Smilies.php rename to src/Content/Smilies.php index 28fd59db0..464b5ee83 100644 --- a/include/Smilies.php +++ b/src/Content/Smilies.php @@ -1,7 +1,7 @@ smilies texts array, 'icons' => smilies html array) */ - public static function get_list() { - + public static function get_list() + { $texts = array( '<3', '</3', @@ -151,26 +153,29 @@ class Smilies { * function from being executed by the prepare_text() routine when preparing * bbcode source for HTML display * - * @param string $s Text that should be replaced + * @param string $s Text that should be replaced * @param boolean $sample * @param boolean $no_images Only replace emoticons without images * * @return string HML Output of the Smilie */ - public static function replace($s, $sample = false, $no_images = false) { - if(intval(Config::get('system','no_smilies')) - || (local_user() && intval(PConfig::get(local_user(),'system','no_smilies')))) + public static function replace($s, $sample = false, $no_images = false) + { + if (intval(Config::get('system', 'no_smilies')) + || (local_user() && intval(PConfig::get(local_user(), 'system', 'no_smilies'))) + ) { return $s; + } - $s = preg_replace_callback('/
(.*?)<\/pre>/ism','self::encode',$s);
-		$s = preg_replace_callback('/(.*?)<\/code>/ism','self::encode',$s);
+		$s = preg_replace_callback('/
(.*?)<\/pre>/ism', 'self::encode', $s);
+		$s = preg_replace_callback('/(.*?)<\/code>/ism', 'self::encode', $s);
 
 		$params = self::get_list();
 
 		if ($no_images) {
 			$cleaned = array('texts' => array(), 'icons' => array());
 			$icons = $params['icons'];
-			foreach ($icons AS $key => $icon) {
+			foreach ($icons as $key => $icon) {
 				if (!strstr($icon, '
' . $params['icons'][$x] . '
'; } - } - else { - $params['string'] = preg_replace_callback('/<(3+)/','self::preg_heart',$params['string']); - $s = str_replace($params['texts'],$params['icons'],$params['string']); + } else { + $params['string'] = preg_replace_callback('/<(3+)/', 'self::preg_heart', $params['string']); + $s = str_replace($params['texts'], $params['icons'], $params['string']); } - $s = preg_replace_callback('/
(.*?)<\/pre>/ism','self::decode',$s);
-		$s = preg_replace_callback('/(.*?)<\/code>/ism','self::decode',$s);
+		$s = preg_replace_callback('/
(.*?)<\/pre>/ism', 'self::decode', $s);
+		$s = preg_replace_callback('/(.*?)<\/code>/ism', 'self::decode', $s);
 
 		return $s;
 	}
 
-	private static function encode($m) {
-		return(str_replace($m[1],base64url_encode($m[1]),$m[0]));
+	private static function encode($m)
+	{
+		return(str_replace($m[1], base64url_encode($m[1]), $m[0]));
 	}
 
-	private static function decode($m) {
-		return(str_replace($m[1],base64url_decode($m[1]),$m[0]));
+	private static function decode($m)
+	{
+		return(str_replace($m[1], base64url_decode($m[1]), $m[0]));
 	}
 
 
@@ -211,17 +217,21 @@ class Smilies {
 	 * @brief expand <3333 to the correct number of hearts
 	 *
 	 * @param string $x
+	 *
 	 * @return string HTML Output
 	 *
 	 * @todo: Rework because it doesn't work correctly
 	 */
-	private static function preg_heart($x) {
-		if(strlen($x[1]) == 1)
+	private static function preg_heart($x)
+	{
+		if (strlen($x[1]) == 1) {
 			return $x[0];
+		}
 		$t = '';
-		for($cnt = 0; $cnt < strlen($x[1]); $cnt ++)
+		for ($cnt = 0; $cnt < strlen($x[1]); $cnt ++) {
 			$t .= '<3';
-		$r =  str_replace($x[0],$t,$x[0]);
+		}
+		$r =  str_replace($x[0], $t, $x[0]);
 		return $r;
 	}
 }

From 06ce34eda1776a76152b1f1e6848ee09496cb712 Mon Sep 17 00:00:00 2001
From: Michael 
Date: Sun, 12 Nov 2017 07:21:23 +0000
Subject: [PATCH 003/175] The worker can now call methods in the worker
 namespace

---
 src/Core/Worker.php | 40 ++++++++++++++++++++++++++++++++++++----
 1 file changed, 36 insertions(+), 4 deletions(-)

diff --git a/src/Core/Worker.php b/src/Core/Worker.php
index 76bd9fd07..ffc6b29db 100644
--- a/src/Core/Worker.php
+++ b/src/Core/Worker.php
@@ -211,6 +211,34 @@ class Worker {
 		// Check for existance and validity of the include file
 		$include = $argv[0];
 
+		if (method_exists(sprintf('Friendica\Worker\%s', $include), 'execute')) {
+			// We constantly update the "executed" date every minute to avoid being killed too soon
+			if (!isset(self::$last_update)) {
+				self::$last_update = strtotime($queue["executed"]);
+			}
+
+			$age = (time() - self::$last_update) / 60;
+			self::$last_update = time();
+
+			if ($age > 1) {
+				$stamp = (float)microtime(true);
+				dba::update('workerqueue', array('executed' => datetime_convert()), array('pid' => $mypid, 'done' => false));
+				self::$db_duration += (microtime(true) - $stamp);
+			}
+
+			array_shift($argv);
+
+			self::execFunction($queue, $include, $argv, true);
+
+			$stamp = (float)microtime(true);
+			if (dba::update('workerqueue', array('done' => true), array('id' => $queue["id"]))) {
+				Config::set('system', 'last_poller_execution', datetime_convert());
+			}
+			self::$db_duration = (microtime(true) - $stamp);
+
+			return true;
+		}
+
 		// The script could be provided as full path or only with the function name
 		if ($include == basename($include)) {
 			$include = "include/".$include.".php";
@@ -242,7 +270,7 @@ class Worker {
 				self::$db_duration += (microtime(true) - $stamp);
 			}
 
-			self::execFunction($queue, $funcname, $argv);
+			self::execFunction($queue, $funcname, $argv, false);
 
 			$stamp = (float)microtime(true);
 			if (dba::update('workerqueue', array('done' => true), array('id' => $queue["id"]))) {
@@ -264,7 +292,7 @@ class Worker {
 	 * @param string $funcname name of the function
 	 * @param array $argv Array of values to be passed to the function
 	 */
-	private static function execFunction($queue, $funcname, $argv) {
+	private static function execFunction($queue, $funcname, $argv, $method_call) {
 		$a = get_app();
 
 		$mypid = getmypid();
@@ -303,7 +331,11 @@ class Worker {
 		// Reset global data to avoid interferences
 		unset($_SESSION);
 
-		$funcname($argv, $argc);
+		if ($method_call) {
+			call_user_func_array(sprintf('Friendica\Worker\%s::execute', $funcname), $argv);
+		} else {
+			$funcname($argv, $argc);
+		}
 
 		$a->process_id = $old_process_id;
 		unset($a->queue);
@@ -873,7 +905,7 @@ class Worker {
 		self::add(PRIORITY_MEDIUM, "cron");
 
 		// Run the cronhooks job separately from cron for being able to use a different timing
-		self::add(PRIORITY_MEDIUM, "cronhooks");
+		self::add(PRIORITY_MEDIUM, "CronHooks");
 
 		// Cleaning dead processes
 		self::killStaleWorkers();

From 1aa8f56662341b1d0cce7fcbb4218b45cd1bceb2 Mon Sep 17 00:00:00 2001
From: Michael 
Date: Sun, 12 Nov 2017 07:24:49 +0000
Subject: [PATCH 004/175] The cronhooks are now changed

---
 include/cronhooks.php => src/Worker/CronHooks.php | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename include/cronhooks.php => src/Worker/CronHooks.php (100%)

diff --git a/include/cronhooks.php b/src/Worker/CronHooks.php
similarity index 100%
rename from include/cronhooks.php
rename to src/Worker/CronHooks.php

From 521e213e7a401e43d0e1cbe61156e18b2a015248 Mon Sep 17 00:00:00 2001
From: Michael 
Date: Sun, 12 Nov 2017 07:26:04 +0000
Subject: [PATCH 005/175] I will never understand git ...

---
 src/Worker/CronHooks.php | 81 +++++++++++++++++++++-------------------
 1 file changed, 42 insertions(+), 39 deletions(-)

diff --git a/src/Worker/CronHooks.php b/src/Worker/CronHooks.php
index 5f15c9379..86075760d 100644
--- a/src/Worker/CronHooks.php
+++ b/src/Worker/CronHooks.php
@@ -1,54 +1,57 @@
 hooks) && array_key_exists("cron", $a->hooks)) {
-		foreach ($a->hooks["cron"] as $hook) {
-			if ($hook[1] == $argv[1]) {
-				logger("Calling cron hook '" . $hook[1] . "'", LOGGER_DEBUG);
-				call_single_hook($a, $name, $hook, $data);
+		if (($hook != '') && is_array($a->hooks) && array_key_exists("cron", $a->hooks)) {
+			foreach ($a->hooks["cron"] as $single_hook) {
+				if ($single_hook[1] == $hook) {
+					logger("Calling cron hook '" . $hook . "'", LOGGER_DEBUG);
+					call_single_hook($a, $name, $hook, $data);
+				}
 			}
-		}
-		return;
-	}
-
-	$last = Config::get('system', 'last_cronhook');
-
-	$poll_interval = intval(Config::get('system', 'cronhook_interval'));
-	if (! $poll_interval) {
-		$poll_interval = 9;
-	}
-
-	if ($last) {
-		$next = $last + ($poll_interval * 60);
-		if ($next > time()) {
-			logger('cronhook intervall not reached');
 			return;
 		}
-	}
 
-	$a->set_baseurl(Config::get('system', 'url'));
+		$last = Config::get('system', 'last_cronhook');
 
-	logger('cronhooks: start');
-
-	$d = datetime_convert();
-
-	if (is_array($a->hooks) && array_key_exists("cron", $a->hooks)) {
-		foreach ($a->hooks["cron"] as $hook) {
-			logger("Calling cronhooks for '" . $hook[1] . "'", LOGGER_DEBUG);
-			Worker::add(PRIORITY_MEDIUM, "cronhooks", $hook[1]);
+		$poll_interval = intval(Config::get('system', 'cronhook_interval'));
+		if (!$poll_interval) {
+			$poll_interval = 9;
 		}
+
+		if ($last) {
+			$next = $last + ($poll_interval * 60);
+			if ($next > time()) {
+				logger('cronhook intervall not reached');
+				return;
+			}
+		}
+
+		$a->set_baseurl(Config::get('system', 'url'));
+
+		logger('cronhooks: start');
+
+		$d = datetime_convert();
+
+		if (is_array($a->hooks) && array_key_exists("cron", $a->hooks)) {
+			foreach ($a->hooks["cron"] as $hook) {
+				logger("Calling cronhooks for '" . $hook[1] . "'", LOGGER_DEBUG);
+				Worker::add(PRIORITY_MEDIUM, "CronHooks", $hook[1]);
+			}
+		}
+
+		logger('cronhooks: end');
+
+		Config::set('system', 'last_cronhook', time());
+
+		return;
 	}
-
-	logger('cronhooks: end');
-
-	Config::set('system', 'last_cronhook', time());
-
-	return;
 }

From 476facde61eeb6d21319101453ee8ed2df89d8f7 Mon Sep 17 00:00:00 2001
From: Michael 
Date: Sun, 12 Nov 2017 18:50:35 +0000
Subject: [PATCH 006/175] Onepoll moved as well

---
 include/cron.php         |   2 +-
 include/follow.php       |   2 +-
 include/onepoll.php      | 625 ---------------------------------------
 mod/contacts.php         |   2 +-
 src/Worker/CronHooks.php |   2 +-
 src/Worker/OnePoll.php   | 625 +++++++++++++++++++++++++++++++++++++++
 6 files changed, 629 insertions(+), 629 deletions(-)
 delete mode 100644 include/onepoll.php
 create mode 100644 src/Worker/OnePoll.php

diff --git a/include/cron.php b/include/cron.php
index e7c670151..01989826d 100644
--- a/include/cron.php
+++ b/include/cron.php
@@ -252,7 +252,7 @@ function cron_poll_contacts($argc, $argv) {
 			} else {
 				$priority = PRIORITY_LOW;
 			}
-			Worker::add(array('priority' => $priority, 'dont_fork' => true), 'onepoll', (int)$contact['id']);
+			Worker::add(array('priority' => $priority, 'dont_fork' => true), 'OnePoll', (int)$contact['id']);
 		}
 	}
 }
diff --git a/include/follow.php b/include/follow.php
index e34ae92fd..7dced7156 100644
--- a/include/follow.php
+++ b/include/follow.php
@@ -252,7 +252,7 @@ function new_contact($uid, $url, $interactive = false, $network = '') {
 
 	// pull feed and consume it, which should subscribe to the hub.
 
-	Worker::add(PRIORITY_HIGH, "onepoll", $contact_id, "force");
+	Worker::add(PRIORITY_HIGH, "OnePoll", $contact_id, "force");
 
 	$r = q("SELECT `contact`.*, `user`.* FROM `contact` INNER JOIN `user` ON `contact`.`uid` = `user`.`uid`
 			WHERE `user`.`uid` = %d AND `contact`.`self` LIMIT 1",
diff --git a/include/onepoll.php b/include/onepoll.php
deleted file mode 100644
index c9fbb1610..000000000
--- a/include/onepoll.php
+++ /dev/null
@@ -1,625 +0,0 @@
- 1) && (intval($argv[1]))) {
-		$contact_id = intval($argv[1]);
-	}
-
-	if (($argc > 2) && ($argv[2] == "force")) {
-		$force = true;
-	}
-
-	if (!$contact_id) {
-		logger('onepoll: no contact');
-		return;
-	}
-
-	$d = datetime_convert();
-
-	// Only poll from those with suitable relationships,
-	// and which have a polling address and ignore Diaspora since
-	// we are unable to match those posts with a Diaspora GUID and prevent duplicates.
-
-	$contacts = q("SELECT `contact`.* FROM `contact`
-		WHERE (`rel` = %d OR `rel` = %d) AND `poll` != ''
-		AND NOT `network` IN ('%s', '%s')
-		AND `contact`.`id` = %d
-		AND `self` = 0 AND `contact`.`blocked` = 0 AND `contact`.`readonly` = 0
-		AND `contact`.`archive` = 0 LIMIT 1",
-		intval(CONTACT_IS_SHARING),
-		intval(CONTACT_IS_FRIEND),
-		dbesc(NETWORK_FACEBOOK),
-		dbesc(NETWORK_PUMPIO),
-		intval($contact_id)
-	);
-
-	if (!count($contacts)) {
-		logger('Contact not found or cannot be used.');
-		return;
-	}
-
-	$contact = $contacts[0];
-
-	$importer_uid = $contact['uid'];
-
-	// load current friends if possible.
-	if (($contact['poco'] != "") && ($contact['success_update'] > $contact['failure_update'])) {
-		$r = q("SELECT count(*) AS total FROM glink
-			WHERE `cid` = %d AND updated > UTC_TIMESTAMP() - INTERVAL 1 DAY",
-			intval($contact['id'])
-		);
-		if (DBM::is_result($r)) {
-			if (!$r[0]['total']) {
-				poco_load($contact['id'], $importer_uid, 0, $contact['poco']);
-			}
-		}
-	}
-
-	/// @TODO Check why we don't poll the Diaspora feed at the moment (some guid problem in the items?)
-	/// @TODO Check whether this is possible with Redmatrix
-	if ($contact["network"] == NETWORK_DIASPORA) {
-		if (poco_do_update($contact["created"], $contact["last-item"], $contact["failure_update"], $contact["success_update"])) {
-			$last_updated = poco_last_updated($contact["url"]);
-			$updated = datetime_convert();
-			if ($last_updated) {
-				$fields = array('last-item' => $last_updated, 'last-update' => $updated, 'success_update' => $updated);
-				dba::update('contact', $fields, array('id' => $contact['id']));
-			} else {
-				dba::update('contact', array('last-update' => $updated, 'failure_update' => $updated), array('id' => $contact['id']));
-			}
-		}
-		return;
-	}
-
-	$xml = false;
-
-	$t = $contact['last-update'];
-
-	if ($contact['subhub']) {
-		$poll_interval = Config::get('system', 'pushpoll_frequency');
-		$contact['priority'] = (($poll_interval !== false) ? intval($poll_interval) : 3);
-		$hub_update = false;
-
-		if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 day")) {
-			$hub_update = true;
-		}
-	} else {
-		$hub_update = false;
-	}
-
-	$last_update = (($contact['last-update'] <= NULL_DATE)
-		? datetime_convert('UTC', 'UTC', 'now - 7 days', ATOM_TIME)
-		: datetime_convert('UTC', 'UTC', $contact['last-update'], ATOM_TIME)
-	);
-
-	// Update the contact entry
-	if (($contact['network'] === NETWORK_OSTATUS) || ($contact['network'] === NETWORK_DIASPORA) || ($contact['network'] === NETWORK_DFRN)) {
-		if (!poco_reachable($contact['url'])) {
-			logger("Skipping probably dead contact ".$contact['url']);
-			return;
-		}
-
-		if (!update_contact($contact["id"])) {
-			mark_for_death($contact);
-			logger('Contact is marked dead');
-			return;
-		} else {
-			unmark_for_death($contact);
-		}
-	}
-
-	if ($importer_uid == 0) {
-		logger('Ignore public contacts');
-		return;
-	}
-
-	$r = q("SELECT `contact`.*, `user`.`page-flags` FROM `contact` INNER JOIN `user` on `contact`.`uid` = `user`.`uid` WHERE `user`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1",
-		intval($importer_uid)
-	);
-
-	if (!DBM::is_result($r)) {
-		logger('No self contact for user '.$importer_uid);
-		return;
-	}
-
-	$importer = $r[0];
-
-	logger("onepoll: poll: ({$contact['id']}) IMPORTER: {$importer['name']}, CONTACT: {$contact['name']}");
-
-	if ($contact['network'] === NETWORK_DFRN) {
-		$idtosend = $orig_id = (($contact['dfrn-id']) ? $contact['dfrn-id'] : $contact['issued-id']);
-		if (intval($contact['duplex']) && $contact['dfrn-id']) {
-			$idtosend = '0:' . $orig_id;
-		}
-		if (intval($contact['duplex']) && $contact['issued-id']) {
-			$idtosend = '1:' . $orig_id;
-		}
-
-		// they have permission to write to us. We already filtered this in the contact query.
-		$perm = 'rw';
-
-		// But this may be our first communication, so set the writable flag if it isn't set already.
-
-		if (!intval($contact['writable'])) {
-			$fields = array('writable' => true);
-			dba::update('contact', $fields, array('id' => $contact['id']));
-		}
-
-		$url = $contact['poll'] . '?dfrn_id=' . $idtosend
-			. '&dfrn_version=' . DFRN_PROTOCOL_VERSION
-			. '&type=data&last_update=' . $last_update
-			. '&perm=' . $perm ;
-
-		$ret = z_fetch_url($url);
-
-		if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
-			return;
-		}
-
-		$handshake_xml = $ret['body'];
-
-		$html_code = $a->get_curl_code();
-
-		logger('onepoll: handshake with url ' . $url . ' returns xml: ' . $handshake_xml, LOGGER_DATA);
-
-
-		if (!strlen($handshake_xml) || ($html_code >= 400) || !$html_code) {
-			logger("poller: $url appears to be dead - marking for death ");
-
-			// dead connection - might be a transient event, or this might
-			// mean the software was uninstalled or the domain expired.
-			// Will keep trying for one month.
-
-			mark_for_death($contact);
-
-			// set the last-update so we don't keep polling
-			$fields = array('last-update' => datetime_convert(), 'failure_update' => datetime_convert());
-			dba::update('contact', $fields, array('id' => $contact['id']));
-
-			return;
-		}
-
-		if (! strstr($handshake_xml, '<')) {
-			logger('poller: response from ' . $url . ' did not contain XML.');
-
-			mark_for_death($contact);
-
-			$fields = array('last-update' => datetime_convert(), 'failure_update' => datetime_convert());
-			dba::update('contact', $fields, array('id' => $contact['id']));
-
-			return;
-		}
-
-
-		$res = parse_xml_string($handshake_xml);
-
-		if (intval($res->status) == 1) {
-			logger("poller: $url replied status 1 - marking for death ");
-
-			// we may not be friends anymore. Will keep trying for one month.
-			// set the last-update so we don't keep polling
-			$fields = array('last-update' => datetime_convert(), 'failure_update' => datetime_convert());
-			dba::update('contact', $fields, array('id' => $contact['id']));
-
-			mark_for_death($contact);
-		} elseif ($contact['term-date'] > NULL_DATE) {
-			logger("poller: $url back from the dead - removing mark for death");
-			unmark_for_death($contact);
-		}
-
-		if ((intval($res->status) != 0) || !strlen($res->challenge) || !strlen($res->dfrn_id)) {
-			return;
-		}
-
-		if (((float)$res->dfrn_version > 2.21) && ($contact['poco'] == '')) {
-			$fields = array('poco' => str_replace('/profile/', '/poco/', $contact['url']));
-			dba::update('contact', $fields, array('id' => $contact['id']));
-		}
-
-		$postvars = array();
-
-		$sent_dfrn_id = hex2bin((string) $res->dfrn_id);
-		$challenge    = hex2bin((string) $res->challenge);
-
-		$final_dfrn_id = '';
-
-		if ($contact['duplex'] && strlen($contact['prvkey'])) {
-			openssl_private_decrypt($sent_dfrn_id, $final_dfrn_id, $contact['prvkey']);
-			openssl_private_decrypt($challenge, $postvars['challenge'], $contact['prvkey']);
-		} else {
-			openssl_public_decrypt($sent_dfrn_id, $final_dfrn_id, $contact['pubkey']);
-			openssl_public_decrypt($challenge, $postvars['challenge'], $contact['pubkey']);
-		}
-
-		$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('poller: ID did not decode: ' . $contact['id'] . ' orig: ' . $orig_id . ' final: ' . $final_dfrn_id);
-			// did not decode properly - cannot trust this site
-			return;
-		}
-
-		$postvars['dfrn_id'] = $idtosend;
-		$postvars['dfrn_version'] = DFRN_PROTOCOL_VERSION;
-		$postvars['perm'] = 'rw';
-
-		$xml = post_url($contact['poll'], $postvars);
-
-	} elseif (($contact['network'] === NETWORK_OSTATUS)
-		|| ($contact['network'] === NETWORK_DIASPORA)
-		|| ($contact['network'] === NETWORK_FEED)) {
-
-		// Upgrading DB fields from an older Friendica version
-		// Will only do this once per notify-enabled OStatus contact
-		// or if relationship changes
-
-		$stat_writeable = ((($contact['notify']) && ($contact['rel'] == CONTACT_IS_FOLLOWER || $contact['rel'] == CONTACT_IS_FRIEND)) ? 1 : 0);
-
-		// Contacts from OStatus are always writable
-		if ($contact['network'] === NETWORK_OSTATUS) {
-			$stat_writeable = 1;
-		}
-
-		if ($stat_writeable != $contact['writable']) {
-			$fields = array('writable' => $stat_writeable);
-			dba::update('contact', $fields, array('id' => $contact['id']));
-		}
-
-		// Are we allowed to import from this person?
-
-		if ($contact['rel'] == CONTACT_IS_FOLLOWER || $contact['blocked'] || $contact['readonly']) {
-			return;
-		}
-
-		$cookiejar = tempnam(get_temppath(), 'cookiejar-onepoll-');
-		$ret = z_fetch_url($contact['poll'], false, $redirects, array('cookiejar' => $cookiejar));
-
-		if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
-			return;
-		}
-
-		$xml = $ret['body'];
-
-		unlink($cookiejar);
-	} elseif ($contact['network'] === NETWORK_MAIL || $contact['network'] === NETWORK_MAIL2) {
-
-		logger("Mail: Fetching for ".$contact['addr'], LOGGER_DEBUG);
-
-		$mail_disabled = ((function_exists('imap_open') && (! Config::get('system', 'imap_disabled'))) ? 0 : 1);
-		if ($mail_disabled) {
-			return;
-		}
-
-		logger("Mail: Enabled", LOGGER_DEBUG);
-
-		$mbox = null;
-		$x = dba::select('user', array('prvkey'), array('uid' => $importer_uid), array('limit' => 1));
-
-		$condition = array("`server` != '' AND `uid` = ?", $importer_uid);
-		$mailconf = dba::select('mailacct', array(), $condition, array('limit' => 1));
-		if (DBM::is_result($x) && DBM::is_result($mailconf)) {
-			$mailbox = construct_mailbox_name($mailconf);
-			$password = '';
-			openssl_private_decrypt(hex2bin($mailconf['pass']), $password, $x['prvkey']);
-			$mbox = email_connect($mailbox, $mailconf['user'], $password);
-			unset($password);
-			logger("Mail: Connect to " . $mailconf['user']);
-			if ($mbox) {
-				$fields = array('last_check' => datetime_convert());
-				dba::update('mailacct', $fields, array('id' => $mailconf['id']));
-				logger("Mail: Connected to " . $mailconf['user']);
-			} else {
-				logger("Mail: Connection error ".$mailconf['user']." ".print_r(imap_errors(), true));
-			}
-		}
-
-		if ($mbox) {
-			$msgs = email_poll($mbox, $contact['addr']);
-
-			if (count($msgs)) {
-				logger("Mail: Parsing ".count($msgs)." mails from ".$contact['addr']." for ".$mailconf['user'], LOGGER_DEBUG);
-
-				$metas = email_msg_meta($mbox,implode(',', $msgs));
-				if (count($metas) != count($msgs)) {
-					logger("onepoll: for " . $mailconf['user'] . " there are ". count($msgs) . " messages but received " . count($metas) . " metas", LOGGER_DEBUG);
-				} else {
-					$msgs = array_combine($msgs, $metas);
-
-					foreach ($msgs as $msg_uid => $meta) {
-						logger("Mail: Parsing mail ".$msg_uid, LOGGER_DATA);
-
-						$datarray = array();
-						$datarray['verb'] = ACTIVITY_POST;
-						$datarray['object-type'] = ACTIVITY_OBJ_NOTE;
-	//					$meta = email_msg_meta($mbox, $msg_uid);
-	//					$headers = email_msg_headers($mbox, $msg_uid);
-
-						$datarray['uri'] = msgid2iri(trim($meta->message_id, '<>'));
-
-						// Have we seen it before?
-						$fields = array('deleted', 'id');
-						$condition = array('uid' => $importer_uid, 'uri' => $datarray['uri']);
-						$r = dba::select('item', $fields, $condition, array('limit' => 1));
-
-						if (DBM::is_result($r)) {
-							logger("Mail: Seen before ".$msg_uid." for ".$mailconf['user']." UID: ".$importer_uid." URI: ".$datarray['uri'],LOGGER_DEBUG);
-
-							// Only delete when mails aren't automatically moved or deleted
-							if (($mailconf['action'] != 1) && ($mailconf['action'] != 3))
-								if ($meta->deleted && ! $r['deleted']) {
-									$fields = array('deleted' => true, 'changed' => datetime_convert());
-									dba::update('item', $fields, array('id' => $r['id']));
-								}
-
-							switch ($mailconf['action']) {
-								case 0:
-									logger("Mail: Seen before ".$msg_uid." for ".$mailconf['user'].". Doing nothing.", LOGGER_DEBUG);
-									break;
-								case 1:
-									logger("Mail: Deleting ".$msg_uid." for ".$mailconf['user']);
-									imap_delete($mbox, $msg_uid, FT_UID);
-									break;
-								case 2:
-									logger("Mail: Mark as seen ".$msg_uid." for ".$mailconf['user']);
-									imap_setflag_full($mbox, $msg_uid, "\\Seen", ST_UID);
-									break;
-								case 3:
-									logger("Mail: Moving ".$msg_uid." to ".$mailconf['movetofolder']." for ".$mailconf['user']);
-									imap_setflag_full($mbox, $msg_uid, "\\Seen", ST_UID);
-									if ($mailconf['movetofolder'] != "") {
-										imap_mail_move($mbox, $msg_uid, $mailconf['movetofolder'], FT_UID);
-									}
-									break;
-							}
-							continue;
-						}
-
-
-						// look for a 'references' or an 'in-reply-to' header and try to match with a parent item we have locally.
-						$raw_refs = ((property_exists($meta, 'references')) ? str_replace("\t", '', $meta->references) : '');
-						if (! trim($raw_refs)) {
-							$raw_refs = ((property_exists($meta, 'in_reply_to')) ? str_replace("\t", '', $meta->in_reply_to) : '');
-						}
-						$raw_refs = trim($raw_refs);  // Don't allow a blank reference in $refs_arr
-
-						if ($raw_refs) {
-							$refs_arr = explode(' ', $raw_refs);
-							if (count($refs_arr)) {
-								for ($x = 0; $x < count($refs_arr); $x ++) {
-									$refs_arr[$x] = "'" . msgid2iri(str_replace(array('<', '>', ' '),array('', '', ''),dbesc($refs_arr[$x]))) . "'";
-								}
-							}
-							$qstr = implode(',', $refs_arr);
-							$r = q("SELECT `parent-uri` FROM `item` USE INDEX (`uid_uri`) WHERE `uri` IN ($qstr) AND `uid` = %d LIMIT 1",
-								intval($importer_uid)
-							);
-							if (DBM::is_result($r)) {
-								$datarray['parent-uri'] = $r[0]['parent-uri'];  // Set the parent as the top-level item
-							}
-						}
-
-						// Decoding the header
-						$subject = imap_mime_header_decode($meta->subject);
-						$datarray['title'] = "";
-						foreach ($subject as $subpart) {
-							if ($subpart->charset != "default") {
-								$datarray['title'] .= iconv($subpart->charset, 'UTF-8//IGNORE', $subpart->text);
-							} else {
-								$datarray['title'] .= $subpart->text;
-							}
-						}
-						$datarray['title'] = notags(trim($datarray['title']));
-
-						//$datarray['title'] = notags(trim($meta->subject));
-						$datarray['created'] = datetime_convert('UTC', 'UTC', $meta->date);
-
-						// Is it a reply?
-						$reply = ((substr(strtolower($datarray['title']), 0, 3) == "re:") ||
-							(substr(strtolower($datarray['title']), 0, 3) == "re-") ||
-							($raw_refs != ""));
-
-						// Remove Reply-signs in the subject
-						$datarray['title'] = RemoveReply($datarray['title']);
-
-						// If it seems to be a reply but a header couldn't be found take the last message with matching subject
-						if (empty($datarray['parent-uri']) && $reply) {
-							$r = q("SELECT `parent-uri` FROM `item` WHERE `title` = \"%s\" AND `uid` = %d AND `network` = '%s' ORDER BY `created` DESC LIMIT 1",
-								dbesc(protect_sprintf($datarray['title'])),
-								intval($importer_uid),
-								dbesc(NETWORK_MAIL));
-							if (DBM::is_result($r)) {
-								$datarray['parent-uri'] = $r[0]['parent-uri'];
-							}
-						}
-
-						if (empty($datarray['parent-uri'])) {
-							$datarray['parent-uri'] = $datarray['uri'];
-						}
-
-						$r = email_get_msg($mbox, $msg_uid, $reply);
-						if (!$r) {
-							logger("Mail: can't fetch msg ".$msg_uid." for ".$mailconf['user']);
-							continue;
-						}
-						$datarray['body'] = escape_tags($r['body']);
-						$datarray['body'] = limit_body_size($datarray['body']);
-
-						logger("Mail: Importing ".$msg_uid." for ".$mailconf['user']);
-
-						/// @TODO Adding a gravatar for the original author would be cool
-
-						$from = imap_mime_header_decode($meta->from);
-						$fromdecoded = "";
-						foreach ($from as $frompart) {
-							if ($frompart->charset != "default") {
-								$fromdecoded .= iconv($frompart->charset, 'UTF-8//IGNORE', $frompart->text);
-							} else {
-								$fromdecoded .= $frompart->text;
-							}
-						}
-
-						$fromarr = imap_rfc822_parse_adrlist($fromdecoded, $a->get_hostname());
-
-						$frommail = $fromarr[0]->mailbox."@".$fromarr[0]->host;
-
-						if (isset($fromarr[0]->personal)) {
-							$fromname = $fromarr[0]->personal;
-						} else {
-							$fromname = $frommail;
-						}
-
-						$datarray['author-name'] = $fromname;
-						$datarray['author-link'] = "mailto:".$frommail;
-						$datarray['author-avatar'] = $contact['photo'];
-
-						$datarray['owner-name'] = $contact['name'];
-						$datarray['owner-link'] = "mailto:".$contact['addr'];
-						$datarray['owner-avatar'] = $contact['photo'];
-
-						$datarray['uid'] = $importer_uid;
-						$datarray['contact-id'] = $contact['id'];
-						if ($datarray['parent-uri'] === $datarray['uri']) {
-							$datarray['private'] = 1;
-						}
-						if (($contact['network'] === NETWORK_MAIL) && (!PConfig::get($importer_uid, 'system', 'allow_public_email_replies'))) {
-							$datarray['private'] = 1;
-							$datarray['allow_cid'] = '<' . $contact['id'] . '>';
-						}
-
-						$stored_item = item_store($datarray);
-
-						$condition = array('parent-uri' => $datarray['parent-uri'], 'uid' => $importer_uid);
-						dba::update('item', array('last-child' => false), $condition);
-
-						dba::update('item', array('last-child' => true), array('id' => $stored_item));
-
-						switch ($mailconf['action']) {
-							case 0:
-								logger("Mail: Seen before ".$msg_uid." for ".$mailconf['user'].". Doing nothing.", LOGGER_DEBUG);
-								break;
-							case 1:
-								logger("Mail: Deleting ".$msg_uid." for ".$mailconf['user']);
-								imap_delete($mbox, $msg_uid, FT_UID);
-								break;
-							case 2:
-								logger("Mail: Mark as seen ".$msg_uid." for ".$mailconf['user']);
-								imap_setflag_full($mbox, $msg_uid, "\\Seen", ST_UID);
-								break;
-							case 3:
-								logger("Mail: Moving ".$msg_uid." to ".$mailconf['movetofolder']." for ".$mailconf['user']);
-								imap_setflag_full($mbox, $msg_uid, "\\Seen", ST_UID);
-								if ($mailconf['movetofolder'] != "") {
-									imap_mail_move($mbox, $msg_uid, $mailconf['movetofolder'], FT_UID);
-								}
-								break;
-						}
-					}
-				}
-			} else {
-				logger("Mail: no mails for ".$mailconf['user']);
-			}
-
-			logger("Mail: closing connection for ".$mailconf['user']);
-			imap_close($mbox);
-		}
-	}
-
-	if ($xml) {
-		logger('poller: received xml : ' . $xml, LOGGER_DATA);
-		if (!strstr($xml, '<')) {
-			logger('poller: post_handshake: response from ' . $url . ' did not contain XML.');
-
-			$fields = array('last-update' => datetime_convert(), 'failure_update' => datetime_convert());
-			dba::update('contact', $fields, array('id' => $contact['id']));
-
-			return;
-		}
-
-
-		logger("Consume feed of contact ".$contact['id']);
-
-		consume_feed($xml, $importer, $contact, $hub, 1, 1);
-
-		// do it twice. Ensures that children of parents which may be later in the stream aren't tossed
-
-		consume_feed($xml, $importer, $contact, $hub, 1, 2);
-
-		$hubmode = 'subscribe';
-		if ($contact['network'] === NETWORK_DFRN || $contact['blocked'] || $contact['readonly']) {
-			$hubmode = 'unsubscribe';
-		}
-
-		if (($contact['network'] === NETWORK_OSTATUS ||  $contact['network'] == NETWORK_FEED) && (! $contact['hub-verify'])) {
-			$hub_update = true;
-		}
-
-		if ($force) {
-			$hub_update = true;
-		}
-
-		logger("Contact ".$contact['id']." returned hub: ".$hub." Network: ".$contact['network']." Relation: ".$contact['rel']." Update: ".$hub_update);
-
-		if (strlen($hub) && $hub_update && (($contact['rel'] != CONTACT_IS_FOLLOWER) || $contact['network'] == NETWORK_FEED)) {
-			logger('poller: hub ' . $hubmode . ' : ' . $hub . ' contact name : ' . $contact['name'] . ' local user : ' . $importer['name']);
-			$hubs = explode(',', $hub);
-			if (count($hubs)) {
-				foreach ($hubs as $h) {
-					$h = trim($h);
-					if (!strlen($h)) {
-						continue;
-					}
-					subscribe_to_hub($h, $importer, $contact, $hubmode);
-				}
-			}
-		}
-
-		$updated = datetime_convert();
-
-		dba::update('contact', array('last-update' => $updated, 'success_update' => $updated), array('id' => $contact['id']));
-		dba::update('gcontact', array('last_contact' => $updated), array('nurl' => $contact['nurl']));
-	} elseif (in_array($contact["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, NETWORK_FEED))) {
-		$updated = datetime_convert();
-
-		dba::update('contact', array('last-update' => $updated, 'failure_update' => $updated), array('id' => $contact['id']));
-		dba::update('gcontact', array('last_failure' => $updated), array('nurl' => $contact['nurl']));
-	} else {
-		dba::update('contact', array('last-update' => $updated), array('id' => $contact['id']));
-	}
-
-	return;
-}
diff --git a/mod/contacts.php b/mod/contacts.php
index 5c810b179..a2bb9fc0f 100644
--- a/mod/contacts.php
+++ b/mod/contacts.php
@@ -252,7 +252,7 @@ function _contact_update($contact_id) {
 				intval($contact_id));
 	} else
 		// pull feed and consume it, which should subscribe to the hub.
-		Worker::add(PRIORITY_HIGH, "onepoll", $contact_id, "force");
+		Worker::add(PRIORITY_HIGH, "OnePoll", $contact_id, "force");
 }
 
 function _contact_update_profile($contact_id) {
diff --git a/src/Worker/CronHooks.php b/src/Worker/CronHooks.php
index 86075760d..e44aa9190 100644
--- a/src/Worker/CronHooks.php
+++ b/src/Worker/CronHooks.php
@@ -5,7 +5,7 @@ use Friendica\Core\Config;
 use Friendica\Core\Worker;
 
 Class CronHooks {
-	static public function execute($hook = '') {
+	public static function execute($hook = '') {
 		global $a;
 
 		require_once 'include/datetime.php';
diff --git a/src/Worker/OnePoll.php b/src/Worker/OnePoll.php
new file mode 100644
index 000000000..41cbffc2e
--- /dev/null
+++ b/src/Worker/OnePoll.php
@@ -0,0 +1,625 @@
+ $contact['failure_update'])) {
+			$r = q("SELECT count(*) AS total FROM glink
+				WHERE `cid` = %d AND updated > UTC_TIMESTAMP() - INTERVAL 1 DAY",
+				intval($contact['id'])
+			);
+			if (DBM::is_result($r)) {
+				if (!$r[0]['total']) {
+					poco_load($contact['id'], $importer_uid, 0, $contact['poco']);
+				}
+			}
+		}
+
+		/// @TODO Check why we don't poll the Diaspora feed at the moment (some guid problem in the items?)
+		/// @TODO Check whether this is possible with Redmatrix
+		if ($contact["network"] == NETWORK_DIASPORA) {
+			if (poco_do_update($contact["created"], $contact["last-item"], $contact["failure_update"], $contact["success_update"])) {
+				$last_updated = poco_last_updated($contact["url"]);
+				$updated = datetime_convert();
+				if ($last_updated) {
+					$fields = array('last-item' => $last_updated, 'last-update' => $updated, 'success_update' => $updated);
+					dba::update('contact', $fields, array('id' => $contact['id']));
+				} else {
+					dba::update('contact', array('last-update' => $updated, 'failure_update' => $updated), array('id' => $contact['id']));
+				}
+			}
+			return;
+		}
+
+		$xml = false;
+
+		$t = $contact['last-update'];
+
+		if ($contact['subhub']) {
+			$poll_interval = Config::get('system', 'pushpoll_frequency');
+			$contact['priority'] = (($poll_interval !== false) ? intval($poll_interval) : 3);
+			$hub_update = false;
+
+			if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 day")) {
+				$hub_update = true;
+			}
+		} else {
+			$hub_update = false;
+		}
+
+		$last_update = (($contact['last-update'] <= NULL_DATE)
+			? datetime_convert('UTC', 'UTC', 'now - 7 days', ATOM_TIME)
+			: datetime_convert('UTC', 'UTC', $contact['last-update'], ATOM_TIME)
+		);
+
+		// Update the contact entry
+		if (($contact['network'] === NETWORK_OSTATUS) || ($contact['network'] === NETWORK_DIASPORA) || ($contact['network'] === NETWORK_DFRN)) {
+			if (!poco_reachable($contact['url'])) {
+				logger("Skipping probably dead contact ".$contact['url']);
+				return;
+			}
+
+			if (!update_contact($contact["id"])) {
+				mark_for_death($contact);
+				logger('Contact is marked dead');
+				return;
+			} else {
+				unmark_for_death($contact);
+			}
+		}
+
+		if ($importer_uid == 0) {
+			logger('Ignore public contacts');
+			return;
+		}
+
+		$r = q("SELECT `contact`.*, `user`.`page-flags` FROM `contact` INNER JOIN `user` on `contact`.`uid` = `user`.`uid` WHERE `user`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1",
+			intval($importer_uid)
+		);
+
+		if (!DBM::is_result($r)) {
+			logger('No self contact for user '.$importer_uid);
+			return;
+		}
+
+		$importer = $r[0];
+
+		logger("onepoll: poll: ({$contact['id']}) IMPORTER: {$importer['name']}, CONTACT: {$contact['name']}");
+
+		if ($contact['network'] === NETWORK_DFRN) {
+			$idtosend = $orig_id = (($contact['dfrn-id']) ? $contact['dfrn-id'] : $contact['issued-id']);
+			if (intval($contact['duplex']) && $contact['dfrn-id']) {
+				$idtosend = '0:' . $orig_id;
+			}
+			if (intval($contact['duplex']) && $contact['issued-id']) {
+				$idtosend = '1:' . $orig_id;
+			}
+
+			// they have permission to write to us. We already filtered this in the contact query.
+			$perm = 'rw';
+
+			// But this may be our first communication, so set the writable flag if it isn't set already.
+
+			if (!intval($contact['writable'])) {
+				$fields = array('writable' => true);
+				dba::update('contact', $fields, array('id' => $contact['id']));
+			}
+
+			$url = $contact['poll'] . '?dfrn_id=' . $idtosend
+				. '&dfrn_version=' . DFRN_PROTOCOL_VERSION
+				. '&type=data&last_update=' . $last_update
+				. '&perm=' . $perm ;
+
+			$ret = z_fetch_url($url);
+
+			if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
+				return;
+			}
+
+			$handshake_xml = $ret['body'];
+
+			$html_code = $a->get_curl_code();
+
+			logger('onepoll: handshake with url ' . $url . ' returns xml: ' . $handshake_xml, LOGGER_DATA);
+
+
+			if (!strlen($handshake_xml) || ($html_code >= 400) || !$html_code) {
+				logger("poller: $url appears to be dead - marking for death ");
+
+				// dead connection - might be a transient event, or this might
+				// mean the software was uninstalled or the domain expired.
+				// Will keep trying for one month.
+
+				mark_for_death($contact);
+
+				// set the last-update so we don't keep polling
+				$fields = array('last-update' => datetime_convert(), 'failure_update' => datetime_convert());
+				dba::update('contact', $fields, array('id' => $contact['id']));
+
+				return;
+			}
+
+			if (!strstr($handshake_xml, '<')) {
+				logger('poller: response from ' . $url . ' did not contain XML.');
+
+				mark_for_death($contact);
+
+				$fields = array('last-update' => datetime_convert(), 'failure_update' => datetime_convert());
+				dba::update('contact', $fields, array('id' => $contact['id']));
+
+				return;
+			}
+
+
+			$res = parse_xml_string($handshake_xml);
+
+			if (intval($res->status) == 1) {
+				logger("poller: $url replied status 1 - marking for death ");
+
+				// we may not be friends anymore. Will keep trying for one month.
+				// set the last-update so we don't keep polling
+				$fields = array('last-update' => datetime_convert(), 'failure_update' => datetime_convert());
+				dba::update('contact', $fields, array('id' => $contact['id']));
+
+				mark_for_death($contact);
+			} elseif ($contact['term-date'] > NULL_DATE) {
+				logger("poller: $url back from the dead - removing mark for death");
+				unmark_for_death($contact);
+			}
+
+			if ((intval($res->status) != 0) || !strlen($res->challenge) || !strlen($res->dfrn_id)) {
+				return;
+			}
+
+			if (((float)$res->dfrn_version > 2.21) && ($contact['poco'] == '')) {
+				$fields = array('poco' => str_replace('/profile/', '/poco/', $contact['url']));
+				dba::update('contact', $fields, array('id' => $contact['id']));
+			}
+
+			$postvars = array();
+
+			$sent_dfrn_id = hex2bin((string) $res->dfrn_id);
+			$challenge    = hex2bin((string) $res->challenge);
+
+			$final_dfrn_id = '';
+
+			if ($contact['duplex'] && strlen($contact['prvkey'])) {
+				openssl_private_decrypt($sent_dfrn_id, $final_dfrn_id, $contact['prvkey']);
+				openssl_private_decrypt($challenge, $postvars['challenge'], $contact['prvkey']);
+			} else {
+				openssl_public_decrypt($sent_dfrn_id, $final_dfrn_id, $contact['pubkey']);
+				openssl_public_decrypt($challenge, $postvars['challenge'], $contact['pubkey']);
+			}
+
+			$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('poller: ID did not decode: ' . $contact['id'] . ' orig: ' . $orig_id . ' final: ' . $final_dfrn_id);
+				// did not decode properly - cannot trust this site
+				return;
+			}
+
+			$postvars['dfrn_id'] = $idtosend;
+			$postvars['dfrn_version'] = DFRN_PROTOCOL_VERSION;
+			$postvars['perm'] = 'rw';
+
+			$xml = post_url($contact['poll'], $postvars);
+
+		} elseif (($contact['network'] === NETWORK_OSTATUS)
+			|| ($contact['network'] === NETWORK_DIASPORA)
+			|| ($contact['network'] === NETWORK_FEED)) {
+
+			// Upgrading DB fields from an older Friendica version
+			// Will only do this once per notify-enabled OStatus contact
+			// or if relationship changes
+
+			$stat_writeable = ((($contact['notify']) && ($contact['rel'] == CONTACT_IS_FOLLOWER || $contact['rel'] == CONTACT_IS_FRIEND)) ? 1 : 0);
+
+			// Contacts from OStatus are always writable
+			if ($contact['network'] === NETWORK_OSTATUS) {
+				$stat_writeable = 1;
+			}
+
+			if ($stat_writeable != $contact['writable']) {
+				$fields = array('writable' => $stat_writeable);
+				dba::update('contact', $fields, array('id' => $contact['id']));
+			}
+
+			// Are we allowed to import from this person?
+
+			if ($contact['rel'] == CONTACT_IS_FOLLOWER || $contact['blocked'] || $contact['readonly']) {
+				return;
+			}
+
+			$cookiejar = tempnam(get_temppath(), 'cookiejar-onepoll-');
+			$ret = z_fetch_url($contact['poll'], false, $redirects, array('cookiejar' => $cookiejar));
+
+			if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
+				return;
+			}
+
+			$xml = $ret['body'];
+
+			unlink($cookiejar);
+		} elseif ($contact['network'] === NETWORK_MAIL || $contact['network'] === NETWORK_MAIL2) {
+
+			logger("Mail: Fetching for ".$contact['addr'], LOGGER_DEBUG);
+
+			$mail_disabled = ((function_exists('imap_open') && (! Config::get('system', 'imap_disabled'))) ? 0 : 1);
+			if ($mail_disabled) {
+				return;
+			}
+
+			logger("Mail: Enabled", LOGGER_DEBUG);
+
+			$mbox = null;
+			$x = dba::select('user', array('prvkey'), array('uid' => $importer_uid), array('limit' => 1));
+
+			$condition = array("`server` != '' AND `uid` = ?", $importer_uid);
+			$mailconf = dba::select('mailacct', array(), $condition, array('limit' => 1));
+			if (DBM::is_result($x) && DBM::is_result($mailconf)) {
+				$mailbox = construct_mailbox_name($mailconf);
+				$password = '';
+				openssl_private_decrypt(hex2bin($mailconf['pass']), $password, $x['prvkey']);
+				$mbox = email_connect($mailbox, $mailconf['user'], $password);
+				unset($password);
+				logger("Mail: Connect to " . $mailconf['user']);
+				if ($mbox) {
+					$fields = array('last_check' => datetime_convert());
+					dba::update('mailacct', $fields, array('id' => $mailconf['id']));
+					logger("Mail: Connected to " . $mailconf['user']);
+				} else {
+					logger("Mail: Connection error ".$mailconf['user']." ".print_r(imap_errors(), true));
+				}
+			}
+
+			if ($mbox) {
+				$msgs = email_poll($mbox, $contact['addr']);
+
+				if (count($msgs)) {
+					logger("Mail: Parsing ".count($msgs)." mails from ".$contact['addr']." for ".$mailconf['user'], LOGGER_DEBUG);
+
+					$metas = email_msg_meta($mbox,implode(',', $msgs));
+					if (count($metas) != count($msgs)) {
+						logger("onepoll: for " . $mailconf['user'] . " there are ". count($msgs) . " messages but received " . count($metas) . " metas", LOGGER_DEBUG);
+					} else {
+						$msgs = array_combine($msgs, $metas);
+
+						foreach ($msgs as $msg_uid => $meta) {
+							logger("Mail: Parsing mail ".$msg_uid, LOGGER_DATA);
+
+							$datarray = array();
+							$datarray['verb'] = ACTIVITY_POST;
+							$datarray['object-type'] = ACTIVITY_OBJ_NOTE;
+		//					$meta = email_msg_meta($mbox, $msg_uid);
+		//					$headers = email_msg_headers($mbox, $msg_uid);
+
+							$datarray['uri'] = msgid2iri(trim($meta->message_id, '<>'));
+
+							// Have we seen it before?
+							$fields = array('deleted', 'id');
+							$condition = array('uid' => $importer_uid, 'uri' => $datarray['uri']);
+							$r = dba::select('item', $fields, $condition, array('limit' => 1));
+
+							if (DBM::is_result($r)) {
+								logger("Mail: Seen before ".$msg_uid." for ".$mailconf['user']." UID: ".$importer_uid." URI: ".$datarray['uri'],LOGGER_DEBUG);
+
+								// Only delete when mails aren't automatically moved or deleted
+								if (($mailconf['action'] != 1) && ($mailconf['action'] != 3))
+									if ($meta->deleted && ! $r['deleted']) {
+										$fields = array('deleted' => true, 'changed' => datetime_convert());
+										dba::update('item', $fields, array('id' => $r['id']));
+									}
+
+								switch ($mailconf['action']) {
+									case 0:
+										logger("Mail: Seen before ".$msg_uid." for ".$mailconf['user'].". Doing nothing.", LOGGER_DEBUG);
+										break;
+									case 1:
+										logger("Mail: Deleting ".$msg_uid." for ".$mailconf['user']);
+										imap_delete($mbox, $msg_uid, FT_UID);
+										break;
+									case 2:
+										logger("Mail: Mark as seen ".$msg_uid." for ".$mailconf['user']);
+										imap_setflag_full($mbox, $msg_uid, "\\Seen", ST_UID);
+										break;
+									case 3:
+										logger("Mail: Moving ".$msg_uid." to ".$mailconf['movetofolder']." for ".$mailconf['user']);
+										imap_setflag_full($mbox, $msg_uid, "\\Seen", ST_UID);
+										if ($mailconf['movetofolder'] != "") {
+											imap_mail_move($mbox, $msg_uid, $mailconf['movetofolder'], FT_UID);
+										}
+										break;
+								}
+								continue;
+							}
+
+
+							// look for a 'references' or an 'in-reply-to' header and try to match with a parent item we have locally.
+							$raw_refs = ((property_exists($meta, 'references')) ? str_replace("\t", '', $meta->references) : '');
+							if (!trim($raw_refs)) {
+								$raw_refs = ((property_exists($meta, 'in_reply_to')) ? str_replace("\t", '', $meta->in_reply_to) : '');
+							}
+							$raw_refs = trim($raw_refs);  // Don't allow a blank reference in $refs_arr
+
+							if ($raw_refs) {
+								$refs_arr = explode(' ', $raw_refs);
+								if (count($refs_arr)) {
+									for ($x = 0; $x < count($refs_arr); $x ++) {
+										$refs_arr[$x] = "'" . msgid2iri(str_replace(array('<', '>', ' '),array('', '', ''),dbesc($refs_arr[$x]))) . "'";
+									}
+								}
+								$qstr = implode(',', $refs_arr);
+								$r = q("SELECT `parent-uri` FROM `item` USE INDEX (`uid_uri`) WHERE `uri` IN ($qstr) AND `uid` = %d LIMIT 1",
+									intval($importer_uid)
+								);
+								if (DBM::is_result($r)) {
+									$datarray['parent-uri'] = $r[0]['parent-uri'];  // Set the parent as the top-level item
+								}
+							}
+
+							// Decoding the header
+							$subject = imap_mime_header_decode($meta->subject);
+							$datarray['title'] = "";
+							foreach ($subject as $subpart) {
+								if ($subpart->charset != "default") {
+									$datarray['title'] .= iconv($subpart->charset, 'UTF-8//IGNORE', $subpart->text);
+								} else {
+									$datarray['title'] .= $subpart->text;
+								}
+							}
+							$datarray['title'] = notags(trim($datarray['title']));
+
+							//$datarray['title'] = notags(trim($meta->subject));
+							$datarray['created'] = datetime_convert('UTC', 'UTC', $meta->date);
+
+							// Is it a reply?
+							$reply = ((substr(strtolower($datarray['title']), 0, 3) == "re:") ||
+								(substr(strtolower($datarray['title']), 0, 3) == "re-") ||
+								($raw_refs != ""));
+
+							// Remove Reply-signs in the subject
+							$datarray['title'] = self::RemoveReply($datarray['title']);
+
+							// If it seems to be a reply but a header couldn't be found take the last message with matching subject
+							if (empty($datarray['parent-uri']) && $reply) {
+								$r = q("SELECT `parent-uri` FROM `item` WHERE `title` = \"%s\" AND `uid` = %d AND `network` = '%s' ORDER BY `created` DESC LIMIT 1",
+									dbesc(protect_sprintf($datarray['title'])),
+									intval($importer_uid),
+									dbesc(NETWORK_MAIL));
+								if (DBM::is_result($r)) {
+									$datarray['parent-uri'] = $r[0]['parent-uri'];
+								}
+							}
+
+							if (empty($datarray['parent-uri'])) {
+								$datarray['parent-uri'] = $datarray['uri'];
+							}
+
+							$r = email_get_msg($mbox, $msg_uid, $reply);
+							if (!$r) {
+								logger("Mail: can't fetch msg ".$msg_uid." for ".$mailconf['user']);
+								continue;
+							}
+							$datarray['body'] = escape_tags($r['body']);
+							$datarray['body'] = limit_body_size($datarray['body']);
+
+							logger("Mail: Importing ".$msg_uid." for ".$mailconf['user']);
+
+							/// @TODO Adding a gravatar for the original author would be cool
+
+							$from = imap_mime_header_decode($meta->from);
+							$fromdecoded = "";
+							foreach ($from as $frompart) {
+								if ($frompart->charset != "default") {
+									$fromdecoded .= iconv($frompart->charset, 'UTF-8//IGNORE', $frompart->text);
+								} else {
+									$fromdecoded .= $frompart->text;
+								}
+							}
+
+							$fromarr = imap_rfc822_parse_adrlist($fromdecoded, $a->get_hostname());
+
+							$frommail = $fromarr[0]->mailbox."@".$fromarr[0]->host;
+
+							if (isset($fromarr[0]->personal)) {
+								$fromname = $fromarr[0]->personal;
+							} else {
+								$fromname = $frommail;
+							}
+
+							$datarray['author-name'] = $fromname;
+							$datarray['author-link'] = "mailto:".$frommail;
+							$datarray['author-avatar'] = $contact['photo'];
+
+							$datarray['owner-name'] = $contact['name'];
+							$datarray['owner-link'] = "mailto:".$contact['addr'];
+							$datarray['owner-avatar'] = $contact['photo'];
+
+							$datarray['uid'] = $importer_uid;
+							$datarray['contact-id'] = $contact['id'];
+							if ($datarray['parent-uri'] === $datarray['uri']) {
+								$datarray['private'] = 1;
+							}
+							if (($contact['network'] === NETWORK_MAIL) && (!PConfig::get($importer_uid, 'system', 'allow_public_email_replies'))) {
+								$datarray['private'] = 1;
+								$datarray['allow_cid'] = '<' . $contact['id'] . '>';
+							}
+
+							$stored_item = item_store($datarray);
+
+							$condition = array('parent-uri' => $datarray['parent-uri'], 'uid' => $importer_uid);
+							dba::update('item', array('last-child' => false), $condition);
+
+							dba::update('item', array('last-child' => true), array('id' => $stored_item));
+
+							switch ($mailconf['action']) {
+								case 0:
+									logger("Mail: Seen before ".$msg_uid." for ".$mailconf['user'].". Doing nothing.", LOGGER_DEBUG);
+									break;
+								case 1:
+									logger("Mail: Deleting ".$msg_uid." for ".$mailconf['user']);
+									imap_delete($mbox, $msg_uid, FT_UID);
+									break;
+								case 2:
+									logger("Mail: Mark as seen ".$msg_uid." for ".$mailconf['user']);
+									imap_setflag_full($mbox, $msg_uid, "\\Seen", ST_UID);
+									break;
+								case 3:
+									logger("Mail: Moving ".$msg_uid." to ".$mailconf['movetofolder']." for ".$mailconf['user']);
+									imap_setflag_full($mbox, $msg_uid, "\\Seen", ST_UID);
+									if ($mailconf['movetofolder'] != "") {
+										imap_mail_move($mbox, $msg_uid, $mailconf['movetofolder'], FT_UID);
+									}
+									break;
+							}
+						}
+					}
+				} else {
+					logger("Mail: no mails for ".$mailconf['user']);
+				}
+
+				logger("Mail: closing connection for ".$mailconf['user']);
+				imap_close($mbox);
+			}
+		}
+
+		if ($xml) {
+			logger('poller: received xml : ' . $xml, LOGGER_DATA);
+			if (!strstr($xml, '<')) {
+				logger('poller: post_handshake: response from ' . $url . ' did not contain XML.');
+
+				$fields = array('last-update' => datetime_convert(), 'failure_update' => datetime_convert());
+				dba::update('contact', $fields, array('id' => $contact['id']));
+
+				return;
+			}
+
+
+			logger("Consume feed of contact ".$contact['id']);
+
+			consume_feed($xml, $importer, $contact, $hub, 1, 1);
+
+			// do it twice. Ensures that children of parents which may be later in the stream aren't tossed
+
+			consume_feed($xml, $importer, $contact, $hub, 1, 2);
+
+			$hubmode = 'subscribe';
+			if ($contact['network'] === NETWORK_DFRN || $contact['blocked'] || $contact['readonly']) {
+				$hubmode = 'unsubscribe';
+			}
+
+			if (($contact['network'] === NETWORK_OSTATUS ||  $contact['network'] == NETWORK_FEED) && (! $contact['hub-verify'])) {
+				$hub_update = true;
+			}
+
+			if ($force) {
+				$hub_update = true;
+			}
+
+			logger("Contact ".$contact['id']." returned hub: ".$hub." Network: ".$contact['network']." Relation: ".$contact['rel']." Update: ".$hub_update);
+
+			if (strlen($hub) && $hub_update && (($contact['rel'] != CONTACT_IS_FOLLOWER) || $contact['network'] == NETWORK_FEED)) {
+				logger('poller: hub ' . $hubmode . ' : ' . $hub . ' contact name : ' . $contact['name'] . ' local user : ' . $importer['name']);
+				$hubs = explode(',', $hub);
+				if (count($hubs)) {
+					foreach ($hubs as $h) {
+						$h = trim($h);
+						if (!strlen($h)) {
+							continue;
+						}
+						subscribe_to_hub($h, $importer, $contact, $hubmode);
+					}
+				}
+			}
+
+			$updated = datetime_convert();
+
+			dba::update('contact', array('last-update' => $updated, 'success_update' => $updated), array('id' => $contact['id']));
+			dba::update('gcontact', array('last_contact' => $updated), array('nurl' => $contact['nurl']));
+		} elseif (in_array($contact["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, NETWORK_FEED))) {
+			$updated = datetime_convert();
+
+			dba::update('contact', array('last-update' => $updated, 'failure_update' => $updated), array('id' => $contact['id']));
+			dba::update('gcontact', array('last_failure' => $updated), array('nurl' => $contact['nurl']));
+		} else {
+			dba::update('contact', array('last-update' => $updated), array('id' => $contact['id']));
+		}
+
+		return;
+	}
+
+	private static function RemoveReply($subject) {
+		while (in_array(strtolower(substr($subject, 0, 3)), array("re:", "aw:"))) {
+			$subject = trim(substr($subject, 4));
+		}
+
+		return $subject;
+	}
+}

From 42a89b101b9e9ab5aaa1c5023f9a0b06641d4581 Mon Sep 17 00:00:00 2001
From: Michael 
Date: Sun, 12 Nov 2017 21:32:10 +0000
Subject: [PATCH 007/175] CronHooks now works again.

---
 src/Worker/CronHooks.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Worker/CronHooks.php b/src/Worker/CronHooks.php
index e44aa9190..42670eb23 100644
--- a/src/Worker/CronHooks.php
+++ b/src/Worker/CronHooks.php
@@ -14,7 +14,7 @@ Class CronHooks {
 			foreach ($a->hooks["cron"] as $single_hook) {
 				if ($single_hook[1] == $hook) {
 					logger("Calling cron hook '" . $hook . "'", LOGGER_DEBUG);
-					call_single_hook($a, $name, $hook, $data);
+					call_single_hook($a, $name, $single_hook, $data);
 				}
 			}
 			return;

From 405753d1c335cfda94bdf1c8799f7e7b3e94a177 Mon Sep 17 00:00:00 2001
From: Michael 
Date: Tue, 14 Nov 2017 21:50:16 +0000
Subject: [PATCH 008/175] cron.php is reworked, other worker files had been
 moved temporarily

---
 include/cli_startup.php                    |  29 ---
 include/cron.php                           | 258 --------------------
 src/Core/Worker.php                        |   4 +-
 src/Worker/Cron.php                        | 263 +++++++++++++++++++++
 {include => worker}/checkversion.php       |   0
 {include => worker}/create_shadowentry.php |   0
 {include => worker}/cronjobs.php           |   0
 {include => worker}/dbclean.php            |   0
 {include => worker}/dbupdate.php           |   0
 {include => worker}/delivery.php           |   0
 {include => worker}/directory.php          |   0
 {include => worker}/discover_poco.php      |   0
 {include => worker}/expire.php             |   0
 {include => worker}/gprobe.php             |   0
 {include => worker}/notifier.php           |   0
 {include => worker}/profile_update.php     |   0
 {include => worker}/pubsubpublish.php      |   0
 {include => worker}/queue.php              |   0
 {include => worker}/remove_contact.php     |   0
 {include => worker}/shadowupdate.php       |   0
 {include => worker}/spool_post.php         |   0
 {include => worker}/tagupdate.php          |   0
 {include => worker}/threadupdate.php       |   0
 {include => worker}/update_gcontact.php    |   0
 24 files changed, 265 insertions(+), 289 deletions(-)
 delete mode 100644 include/cli_startup.php
 delete mode 100644 include/cron.php
 create mode 100644 src/Worker/Cron.php
 rename {include => worker}/checkversion.php (100%)
 rename {include => worker}/create_shadowentry.php (100%)
 rename {include => worker}/cronjobs.php (100%)
 rename {include => worker}/dbclean.php (100%)
 rename {include => worker}/dbupdate.php (100%)
 rename {include => worker}/delivery.php (100%)
 rename {include => worker}/directory.php (100%)
 rename {include => worker}/discover_poco.php (100%)
 rename {include => worker}/expire.php (100%)
 rename {include => worker}/gprobe.php (100%)
 rename {include => worker}/notifier.php (100%)
 rename {include => worker}/profile_update.php (100%)
 rename {include => worker}/pubsubpublish.php (100%)
 rename {include => worker}/queue.php (100%)
 rename {include => worker}/remove_contact.php (100%)
 rename {include => worker}/shadowupdate.php (100%)
 rename {include => worker}/spool_post.php (100%)
 rename {include => worker}/tagupdate.php (100%)
 rename {include => worker}/threadupdate.php (100%)
 rename {include => worker}/update_gcontact.php (100%)

diff --git a/include/cli_startup.php b/include/cli_startup.php
deleted file mode 100644
index 8cbc7db37..000000000
--- a/include/cli_startup.php
+++ /dev/null
@@ -1,29 +0,0 @@
-set_baseurl(Config::get('system','url'));
-
-	load_hooks();
-}
diff --git a/include/cron.php b/include/cron.php
deleted file mode 100644
index 01989826d..000000000
--- a/include/cron.php
+++ /dev/null
@@ -1,258 +0,0 @@
- 1) {
-		cron_poll_contacts($argc, $argv);
-		return;
-	}
-
-	$last = Config::get('system', 'last_cron');
-
-	$poll_interval = intval(Config::get('system', 'cron_interval'));
-	if (! $poll_interval) {
-		$poll_interval = 10;
-	}
-
-	if ($last) {
-		$next = $last + ($poll_interval * 60);
-		if ($next > time()) {
-			logger('cron intervall not reached');
-			return;
-		}
-	}
-
-	logger('cron: start');
-
-	// run queue delivery process in the background
-	Worker::add(PRIORITY_NEGLIGIBLE, "queue");
-
-	// run the process to discover global contacts in the background
-	Worker::add(PRIORITY_LOW, "discover_poco");
-
-	// run the process to update locally stored global contacts in the background
-	Worker::add(PRIORITY_LOW, "discover_poco", "checkcontact");
-
-	// Expire and remove user entries
-	Worker::add(PRIORITY_MEDIUM, "cronjobs", "expire_and_remove_users");
-
-	// Call possible post update functions
-	Worker::add(PRIORITY_LOW, "cronjobs", "post_update");
-
-	// update nodeinfo data
-	Worker::add(PRIORITY_LOW, "cronjobs", "nodeinfo");
-
-	// Clear cache entries
-	Worker::add(PRIORITY_LOW, "cronjobs", "clear_cache");
-
-	// Repair missing Diaspora values in contacts
-	Worker::add(PRIORITY_LOW, "cronjobs", "repair_diaspora");
-
-	// Repair entries in the database
-	Worker::add(PRIORITY_LOW, "cronjobs", "repair_database");
-
-	// once daily run birthday_updates and then expire in background
-	$d1 = Config::get('system', 'last_expire_day');
-	$d2 = intval(datetime_convert('UTC', 'UTC', 'now', 'd'));
-
-	if ($d2 != intval($d1)) {
-
-		Worker::add(PRIORITY_LOW, "cronjobs", "update_contact_birthdays");
-
-		Worker::add(PRIORITY_LOW, "discover_poco", "update_server");
-
-		Worker::add(PRIORITY_LOW, "discover_poco", "suggestions");
-
-		Config::set('system', 'last_expire_day', $d2);
-
-		Worker::add(PRIORITY_LOW, 'expire');
-
-		Worker::add(PRIORITY_MEDIUM, 'dbclean');
-
-		Worker::add(PRIORITY_LOW, "cronjobs", "update_photo_albums");
-
-		// Delete all done workerqueue entries
-		dba::delete('workerqueue', array('`done` AND `executed` < UTC_TIMESTAMP() - INTERVAL 12 HOUR'));
-
-		// check upstream version?
-		Worker::add(PRIORITY_LOW, 'checkversion');
-	}
-
-	// Poll contacts
-	cron_poll_contacts($argc, $argv);
-
-	logger('cron: end');
-
-	Config::set('system', 'last_cron', time());
-
-	return;
-}
-
-/**
- * @brief Poll contacts for unreceived messages
- *
- * @param Integer $argc Number of command line arguments
- * @param Array $argv Array of command line arguments
- */
-function cron_poll_contacts($argc, $argv) {
-	$manual_id  = 0;
-	$generation = 0;
-	$force      = false;
-	$restart    = false;
-
-	if (($argc > 1) && ($argv[1] == 'force')) {
-		$force = true;
-	}
-	if (($argc > 1) && ($argv[1] == 'restart')) {
-		$restart = true;
-		$generation = intval($argv[2]);
-		if (!$generation) {
-			killme();
-		}
-	}
-
-	if (($argc > 1) && intval($argv[1])) {
-		$manual_id = intval($argv[1]);
-		$force     = true;
-	}
-
-	$min_poll_interval = Config::get('system', 'min_poll_interval', 1);
-
-	$sql_extra = (($manual_id) ? " AND `id` = $manual_id " : "");
-
-	reload_plugins();
-
-	$d = datetime_convert();
-
-	// Only poll from those with suitable relationships,
-	// and which have a polling address and ignore Diaspora since
-	// we are unable to match those posts with a Diaspora GUID and prevent duplicates.
-
-	$abandon_days = intval(Config::get('system', 'account_abandon_days'));
-	if ($abandon_days < 1) {
-		$abandon_days = 0;
-	}
-	$abandon_sql = (($abandon_days)
-		? sprintf(" AND `user`.`login_date` > UTC_TIMESTAMP() - INTERVAL %d DAY ", intval($abandon_days))
-		: ''
-	);
-
-	$contacts = q("SELECT `contact`.`id` FROM `user`
-			STRAIGHT_JOIN `contact`
-			ON `contact`.`uid` = `user`.`uid` AND `contact`.`rel` IN (%d, %d) AND `contact`.`poll` != ''
-				AND `contact`.`network` IN ('%s', '%s', '%s', '%s', '%s', '%s') $sql_extra
-				AND NOT `contact`.`self` AND NOT `contact`.`blocked` AND NOT `contact`.`readonly`
-				AND NOT `contact`.`archive`
-			WHERE NOT `user`.`account_expired` AND NOT `user`.`account_removed` $abandon_sql ORDER BY RAND()",
-		intval(CONTACT_IS_SHARING),
-		intval(CONTACT_IS_FRIEND),
-		dbesc(NETWORK_DFRN),
-		dbesc(NETWORK_ZOT),
-		dbesc(NETWORK_OSTATUS),
-		dbesc(NETWORK_FEED),
-		dbesc(NETWORK_MAIL),
-		dbesc(NETWORK_MAIL2)
-	);
-
-	if (!DBM::is_result($contacts)) {
-		return;
-	}
-
-	foreach ($contacts as $c) {
-
-		$res = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1",
-			intval($c['id'])
-		);
-
-		if (!DBM::is_result($res)) {
-			continue;
-		}
-
-		foreach ($res as $contact) {
-
-			$xml = false;
-
-			if ($manual_id) {
-				$contact['last-update'] = NULL_DATE;
-			}
-
-			if (in_array($contact['network'], array(NETWORK_DFRN, NETWORK_ZOT, NETWORK_OSTATUS))) {
-				$contact['priority'] = 2;
-			}
-
-			if ($contact['subhub'] && in_array($contact['network'], array(NETWORK_DFRN, NETWORK_ZOT, NETWORK_OSTATUS))) {
-				/*
-				 * We should be getting everything via a hub. But just to be sure, let's check once a day.
-				 * (You can make this more or less frequent if desired by setting 'pushpoll_frequency' appropriately)
-				 * This also lets us update our subscription to the hub, and add or replace hubs in case it
-				 * changed. We will only update hubs once a day, regardless of 'pushpoll_frequency'.
-				 */
-				$poll_interval = Config::get('system', 'pushpoll_frequency');
-				$contact['priority'] = (($poll_interval !== false) ? intval($poll_interval) : 3);
-			}
-
-			if (($contact['priority'] >= 0) && !$force) {
-				$update = false;
-
-				$t = $contact['last-update'];
-
-				/*
-				 * Based on $contact['priority'], should we poll this site now? Or later?
-				 */
-				switch ($contact['priority']) {
-					case 5:
-						if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 month")) {
-							$update = true;
-						}
-						break;
-					case 4:
-						if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 week")) {
-							$update = true;
-						}
-						break;
-					case 3:
-						if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 day")) {
-							$update = true;
-						}
-						break;
-					case 2:
-						if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 12 hour")) {
-							$update = true;
-						}
-						break;
-					case 1:
-						if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 hour")) {
-							$update = true;
-						}
-						break;
-					case 0:
-					default:
-						if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + ".$min_poll_interval." minute")) {
-							$update = true;
-						}
-						break;
-				}
-				if (!$update) {
-					continue;
-				}
-			}
-
-			logger("Polling " . $contact["network"] . " " . $contact["id"] . " " . $contact["nick"] . " " . $contact["name"]);
-
-			if (($contact['network'] == NETWORK_FEED) && ($contact['priority'] <= 3)) {
-				$priority = PRIORITY_MEDIUM;
-			} else {
-				$priority = PRIORITY_LOW;
-			}
-			Worker::add(array('priority' => $priority, 'dont_fork' => true), 'OnePoll', (int)$contact['id']);
-		}
-	}
-}
diff --git a/src/Core/Worker.php b/src/Core/Worker.php
index ffc6b29db..db93addda 100644
--- a/src/Core/Worker.php
+++ b/src/Core/Worker.php
@@ -241,7 +241,7 @@ class Worker {
 
 		// The script could be provided as full path or only with the function name
 		if ($include == basename($include)) {
-			$include = "include/".$include.".php";
+			$include = "worker/".$include.".php";
 		}
 
 		if (!validate_include($include)) {
@@ -902,7 +902,7 @@ class Worker {
 		self::add(PRIORITY_HIGH, "spool_post");
 
 		// Run the cron job that calls all other jobs
-		self::add(PRIORITY_MEDIUM, "cron");
+		self::add(PRIORITY_MEDIUM, "Cron");
 
 		// Run the cronhooks job separately from cron for being able to use a different timing
 		self::add(PRIORITY_MEDIUM, "CronHooks");
diff --git a/src/Worker/Cron.php b/src/Worker/Cron.php
new file mode 100644
index 000000000..c85982475
--- /dev/null
+++ b/src/Worker/Cron.php
@@ -0,0 +1,263 @@
+ time()) {
+				logger('cron intervall not reached');
+				return;
+			}
+		}
+
+		logger('cron: start');
+
+		// run queue delivery process in the background
+		Worker::add(PRIORITY_NEGLIGIBLE, "queue");
+
+		// run the process to discover global contacts in the background
+		Worker::add(PRIORITY_LOW, "discover_poco");
+
+		// run the process to update locally stored global contacts in the background
+		Worker::add(PRIORITY_LOW, "discover_poco", "checkcontact");
+
+		// Expire and remove user entries
+		Worker::add(PRIORITY_MEDIUM, "cronjobs", "expire_and_remove_users");
+
+		// Call possible post update functions
+		Worker::add(PRIORITY_LOW, "cronjobs", "post_update");
+
+		// update nodeinfo data
+		Worker::add(PRIORITY_LOW, "cronjobs", "nodeinfo");
+
+		// Clear cache entries
+		Worker::add(PRIORITY_LOW, "cronjobs", "clear_cache");
+
+		// Repair missing Diaspora values in contacts
+		Worker::add(PRIORITY_LOW, "cronjobs", "repair_diaspora");
+
+		// Repair entries in the database
+		Worker::add(PRIORITY_LOW, "cronjobs", "repair_database");
+
+		// once daily run birthday_updates and then expire in background
+		$d1 = Config::get('system', 'last_expire_day');
+		$d2 = intval(datetime_convert('UTC', 'UTC', 'now', 'd'));
+
+		if ($d2 != intval($d1)) {
+
+			Worker::add(PRIORITY_LOW, "cronjobs", "update_contact_birthdays");
+
+			Worker::add(PRIORITY_LOW, "discover_poco", "update_server");
+
+			Worker::add(PRIORITY_LOW, "discover_poco", "suggestions");
+
+			Config::set('system', 'last_expire_day', $d2);
+
+			Worker::add(PRIORITY_LOW, 'expire');
+
+			Worker::add(PRIORITY_MEDIUM, 'dbclean');
+
+			Worker::add(PRIORITY_LOW, "cronjobs", "update_photo_albums");
+
+			// Delete all done workerqueue entries
+			dba::delete('workerqueue', array('`done` AND `executed` < UTC_TIMESTAMP() - INTERVAL 12 HOUR'));
+
+			// check upstream version?
+			Worker::add(PRIORITY_LOW, 'checkversion');
+		}
+
+		// Poll contacts
+		self::pollContacts($parameter, $generation);
+
+		logger('cron: end');
+
+		Config::set('system', 'last_cron', time());
+
+		return;
+	}
+
+	/**
+	 * @brief Poll contacts for unreceived messages
+	 *
+	 * @todo Currently it seems as if the following parameter aren't used at all ...
+	 *
+	 * @param string $parameter Parameter (force, restart, ...) for the contact polling
+	 * @param integer $generation
+	 */
+	private static function pollContacts($parameter, $generation) {
+		$manual_id  = 0;
+		$generation = 0;
+		$force      = false;
+		$restart    = false;
+
+		if ($parameter == 'force') {
+			$force = true;
+		}
+		if ($parameter == 'restart') {
+			$restart = true;
+			$generation = intval($generation);
+			if (!$generation) {
+				killme();
+			}
+		}
+
+		if (intval($parameter)) {
+			$manual_id = intval($parameter);
+			$force     = true;
+		}
+
+		$min_poll_interval = Config::get('system', 'min_poll_interval', 1);
+
+		$sql_extra = (($manual_id) ? " AND `id` = $manual_id " : "");
+
+		reload_plugins();
+
+		$d = datetime_convert();
+
+		// Only poll from those with suitable relationships,
+		// and which have a polling address and ignore Diaspora since
+		// we are unable to match those posts with a Diaspora GUID and prevent duplicates.
+
+		$abandon_days = intval(Config::get('system', 'account_abandon_days'));
+		if ($abandon_days < 1) {
+			$abandon_days = 0;
+		}
+		$abandon_sql = (($abandon_days)
+			? sprintf(" AND `user`.`login_date` > UTC_TIMESTAMP() - INTERVAL %d DAY ", intval($abandon_days))
+			: ''
+		);
+
+		$contacts = q("SELECT `contact`.`id` FROM `user`
+				STRAIGHT_JOIN `contact`
+				ON `contact`.`uid` = `user`.`uid` AND `contact`.`rel` IN (%d, %d) AND `contact`.`poll` != ''
+					AND `contact`.`network` IN ('%s', '%s', '%s', '%s', '%s', '%s') $sql_extra
+					AND NOT `contact`.`self` AND NOT `contact`.`blocked` AND NOT `contact`.`readonly`
+					AND NOT `contact`.`archive`
+				WHERE NOT `user`.`account_expired` AND NOT `user`.`account_removed` $abandon_sql ORDER BY RAND()",
+			intval(CONTACT_IS_SHARING),
+			intval(CONTACT_IS_FRIEND),
+			dbesc(NETWORK_DFRN),
+			dbesc(NETWORK_ZOT),
+			dbesc(NETWORK_OSTATUS),
+			dbesc(NETWORK_FEED),
+			dbesc(NETWORK_MAIL),
+			dbesc(NETWORK_MAIL2)
+		);
+
+		if (!DBM::is_result($contacts)) {
+			return;
+		}
+
+		foreach ($contacts as $c) {
+
+			$res = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1",
+				intval($c['id'])
+			);
+
+			if (!DBM::is_result($res)) {
+				continue;
+			}
+
+			foreach ($res as $contact) {
+
+				$xml = false;
+
+				if ($manual_id) {
+					$contact['last-update'] = NULL_DATE;
+				}
+
+				if (in_array($contact['network'], array(NETWORK_DFRN, NETWORK_ZOT, NETWORK_OSTATUS))) {
+					$contact['priority'] = 2;
+				}
+
+				if ($contact['subhub'] && in_array($contact['network'], array(NETWORK_DFRN, NETWORK_ZOT, NETWORK_OSTATUS))) {
+					/*
+					 * We should be getting everything via a hub. But just to be sure, let's check once a day.
+					 * (You can make this more or less frequent if desired by setting 'pushpoll_frequency' appropriately)
+					 * This also lets us update our subscription to the hub, and add or replace hubs in case it
+					 * changed. We will only update hubs once a day, regardless of 'pushpoll_frequency'.
+					 */
+					$poll_interval = Config::get('system', 'pushpoll_frequency');
+					$contact['priority'] = (($poll_interval !== false) ? intval($poll_interval) : 3);
+				}
+
+				if (($contact['priority'] >= 0) && !$force) {
+					$update = false;
+
+					$t = $contact['last-update'];
+
+					/*
+					 * Based on $contact['priority'], should we poll this site now? Or later?
+					 */
+					switch ($contact['priority']) {
+						case 5:
+							if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 month")) {
+								$update = true;
+							}
+							break;
+						case 4:
+							if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 week")) {
+								$update = true;
+							}
+							break;
+						case 3:
+							if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 day")) {
+								$update = true;
+							}
+							break;
+						case 2:
+							if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 12 hour")) {
+								$update = true;
+							}
+							break;
+						case 1:
+							if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 hour")) {
+								$update = true;
+							}
+							break;
+						case 0:
+						default:
+							if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + ".$min_poll_interval." minute")) {
+								$update = true;
+							}
+							break;
+					}
+					if (!$update) {
+						continue;
+					}
+				}
+
+				logger("Polling " . $contact["network"] . " " . $contact["id"] . " " . $contact["nick"] . " " . $contact["name"]);
+
+				if (($contact['network'] == NETWORK_FEED) && ($contact['priority'] <= 3)) {
+					$priority = PRIORITY_MEDIUM;
+				} else {
+					$priority = PRIORITY_LOW;
+				}
+				Worker::add(array('priority' => $priority, 'dont_fork' => true), 'OnePoll', (int)$contact['id']);
+			}
+		}
+	}
+}
diff --git a/include/checkversion.php b/worker/checkversion.php
similarity index 100%
rename from include/checkversion.php
rename to worker/checkversion.php
diff --git a/include/create_shadowentry.php b/worker/create_shadowentry.php
similarity index 100%
rename from include/create_shadowentry.php
rename to worker/create_shadowentry.php
diff --git a/include/cronjobs.php b/worker/cronjobs.php
similarity index 100%
rename from include/cronjobs.php
rename to worker/cronjobs.php
diff --git a/include/dbclean.php b/worker/dbclean.php
similarity index 100%
rename from include/dbclean.php
rename to worker/dbclean.php
diff --git a/include/dbupdate.php b/worker/dbupdate.php
similarity index 100%
rename from include/dbupdate.php
rename to worker/dbupdate.php
diff --git a/include/delivery.php b/worker/delivery.php
similarity index 100%
rename from include/delivery.php
rename to worker/delivery.php
diff --git a/include/directory.php b/worker/directory.php
similarity index 100%
rename from include/directory.php
rename to worker/directory.php
diff --git a/include/discover_poco.php b/worker/discover_poco.php
similarity index 100%
rename from include/discover_poco.php
rename to worker/discover_poco.php
diff --git a/include/expire.php b/worker/expire.php
similarity index 100%
rename from include/expire.php
rename to worker/expire.php
diff --git a/include/gprobe.php b/worker/gprobe.php
similarity index 100%
rename from include/gprobe.php
rename to worker/gprobe.php
diff --git a/include/notifier.php b/worker/notifier.php
similarity index 100%
rename from include/notifier.php
rename to worker/notifier.php
diff --git a/include/profile_update.php b/worker/profile_update.php
similarity index 100%
rename from include/profile_update.php
rename to worker/profile_update.php
diff --git a/include/pubsubpublish.php b/worker/pubsubpublish.php
similarity index 100%
rename from include/pubsubpublish.php
rename to worker/pubsubpublish.php
diff --git a/include/queue.php b/worker/queue.php
similarity index 100%
rename from include/queue.php
rename to worker/queue.php
diff --git a/include/remove_contact.php b/worker/remove_contact.php
similarity index 100%
rename from include/remove_contact.php
rename to worker/remove_contact.php
diff --git a/include/shadowupdate.php b/worker/shadowupdate.php
similarity index 100%
rename from include/shadowupdate.php
rename to worker/shadowupdate.php
diff --git a/include/spool_post.php b/worker/spool_post.php
similarity index 100%
rename from include/spool_post.php
rename to worker/spool_post.php
diff --git a/include/tagupdate.php b/worker/tagupdate.php
similarity index 100%
rename from include/tagupdate.php
rename to worker/tagupdate.php
diff --git a/include/threadupdate.php b/worker/threadupdate.php
similarity index 100%
rename from include/threadupdate.php
rename to worker/threadupdate.php
diff --git a/include/update_gcontact.php b/worker/update_gcontact.php
similarity index 100%
rename from include/update_gcontact.php
rename to worker/update_gcontact.php

From 9576f6743d79153caed60f6a81c260fc041bef06 Mon Sep 17 00:00:00 2001
From: Michael 
Date: Tue, 14 Nov 2017 22:13:33 +0000
Subject: [PATCH 009/175] Command back ...

---
 {worker => include}/checkversion.php       | 0
 {worker => include}/create_shadowentry.php | 0
 {worker => include}/cronjobs.php           | 0
 {worker => include}/dbclean.php            | 0
 {worker => include}/dbupdate.php           | 0
 {worker => include}/delivery.php           | 0
 {worker => include}/directory.php          | 0
 {worker => include}/discover_poco.php      | 0
 {worker => include}/expire.php             | 0
 {worker => include}/gprobe.php             | 0
 {worker => include}/notifier.php           | 0
 {worker => include}/profile_update.php     | 0
 {worker => include}/pubsubpublish.php      | 0
 {worker => include}/queue.php              | 0
 {worker => include}/remove_contact.php     | 0
 {worker => include}/shadowupdate.php       | 0
 {worker => include}/spool_post.php         | 0
 {worker => include}/tagupdate.php          | 0
 {worker => include}/threadupdate.php       | 0
 {worker => include}/update_gcontact.php    | 0
 src/Core/Worker.php                        | 2 +-
 21 files changed, 1 insertion(+), 1 deletion(-)
 rename {worker => include}/checkversion.php (100%)
 rename {worker => include}/create_shadowentry.php (100%)
 rename {worker => include}/cronjobs.php (100%)
 rename {worker => include}/dbclean.php (100%)
 rename {worker => include}/dbupdate.php (100%)
 rename {worker => include}/delivery.php (100%)
 rename {worker => include}/directory.php (100%)
 rename {worker => include}/discover_poco.php (100%)
 rename {worker => include}/expire.php (100%)
 rename {worker => include}/gprobe.php (100%)
 rename {worker => include}/notifier.php (100%)
 rename {worker => include}/profile_update.php (100%)
 rename {worker => include}/pubsubpublish.php (100%)
 rename {worker => include}/queue.php (100%)
 rename {worker => include}/remove_contact.php (100%)
 rename {worker => include}/shadowupdate.php (100%)
 rename {worker => include}/spool_post.php (100%)
 rename {worker => include}/tagupdate.php (100%)
 rename {worker => include}/threadupdate.php (100%)
 rename {worker => include}/update_gcontact.php (100%)

diff --git a/worker/checkversion.php b/include/checkversion.php
similarity index 100%
rename from worker/checkversion.php
rename to include/checkversion.php
diff --git a/worker/create_shadowentry.php b/include/create_shadowentry.php
similarity index 100%
rename from worker/create_shadowentry.php
rename to include/create_shadowentry.php
diff --git a/worker/cronjobs.php b/include/cronjobs.php
similarity index 100%
rename from worker/cronjobs.php
rename to include/cronjobs.php
diff --git a/worker/dbclean.php b/include/dbclean.php
similarity index 100%
rename from worker/dbclean.php
rename to include/dbclean.php
diff --git a/worker/dbupdate.php b/include/dbupdate.php
similarity index 100%
rename from worker/dbupdate.php
rename to include/dbupdate.php
diff --git a/worker/delivery.php b/include/delivery.php
similarity index 100%
rename from worker/delivery.php
rename to include/delivery.php
diff --git a/worker/directory.php b/include/directory.php
similarity index 100%
rename from worker/directory.php
rename to include/directory.php
diff --git a/worker/discover_poco.php b/include/discover_poco.php
similarity index 100%
rename from worker/discover_poco.php
rename to include/discover_poco.php
diff --git a/worker/expire.php b/include/expire.php
similarity index 100%
rename from worker/expire.php
rename to include/expire.php
diff --git a/worker/gprobe.php b/include/gprobe.php
similarity index 100%
rename from worker/gprobe.php
rename to include/gprobe.php
diff --git a/worker/notifier.php b/include/notifier.php
similarity index 100%
rename from worker/notifier.php
rename to include/notifier.php
diff --git a/worker/profile_update.php b/include/profile_update.php
similarity index 100%
rename from worker/profile_update.php
rename to include/profile_update.php
diff --git a/worker/pubsubpublish.php b/include/pubsubpublish.php
similarity index 100%
rename from worker/pubsubpublish.php
rename to include/pubsubpublish.php
diff --git a/worker/queue.php b/include/queue.php
similarity index 100%
rename from worker/queue.php
rename to include/queue.php
diff --git a/worker/remove_contact.php b/include/remove_contact.php
similarity index 100%
rename from worker/remove_contact.php
rename to include/remove_contact.php
diff --git a/worker/shadowupdate.php b/include/shadowupdate.php
similarity index 100%
rename from worker/shadowupdate.php
rename to include/shadowupdate.php
diff --git a/worker/spool_post.php b/include/spool_post.php
similarity index 100%
rename from worker/spool_post.php
rename to include/spool_post.php
diff --git a/worker/tagupdate.php b/include/tagupdate.php
similarity index 100%
rename from worker/tagupdate.php
rename to include/tagupdate.php
diff --git a/worker/threadupdate.php b/include/threadupdate.php
similarity index 100%
rename from worker/threadupdate.php
rename to include/threadupdate.php
diff --git a/worker/update_gcontact.php b/include/update_gcontact.php
similarity index 100%
rename from worker/update_gcontact.php
rename to include/update_gcontact.php
diff --git a/src/Core/Worker.php b/src/Core/Worker.php
index db93addda..b06c4920e 100644
--- a/src/Core/Worker.php
+++ b/src/Core/Worker.php
@@ -241,7 +241,7 @@ class Worker {
 
 		// The script could be provided as full path or only with the function name
 		if ($include == basename($include)) {
-			$include = "worker/".$include.".php";
+			$include = "include/".$include.".php";
 		}
 
 		if (!validate_include($include)) {

From 47db624105182194b11f0039742deda6fc12c54d Mon Sep 17 00:00:00 2001
From: Adam Magness 
Date: Wed, 15 Nov 2017 09:47:28 -0500
Subject: [PATCH 010/175] GlobalContact created

Moved DirSearch and GlobalContact related functions to Friendica\Model namespace
---
 include/DirSearch.php            |   64 -
 include/acl_selectors.php        |    9 +-
 include/contact_widgets.php      |   20 +-
 include/cronjobs.php             |    7 +-
 include/discover_poco.php        |   35 +-
 include/gprobe.php               |   23 +-
 include/items.php                |    5 +-
 include/ostatus.php              |    5 +-
 include/post_update.php          |    3 +-
 include/socgraph.php             | 2446 ------------------------------
 mod/allfriends.php               |   17 +-
 mod/common.php                   |   22 +-
 mod/contacts.php                 |   11 +-
 mod/dirfind.php                  |    3 +-
 mod/fsuggest.php                 |   26 +-
 mod/hovercard.php                |    7 +-
 mod/item.php                     |    5 +-
 mod/profiles.php                 |    7 +-
 mod/settings.php                 |    2 +-
 mod/suggest.php                  |   11 +-
 src/Model/GlobalContact.php      | 1004 ++++++++++++
 src/Protocol/DFRN.php            |    5 +-
 src/Protocol/Diaspora.php        |    5 +-
 src/Protocol/PortableContact.php | 1572 +++++++++++++++++++
 src/Worker/OnePoll.php           |    7 +-
 view/theme/vier/theme.php        |    4 +-
 26 files changed, 2715 insertions(+), 2610 deletions(-)
 delete mode 100644 include/DirSearch.php
 delete mode 100644 include/socgraph.php
 create mode 100644 src/Model/GlobalContact.php
 create mode 100644 src/Protocol/PortableContact.php

diff --git a/include/DirSearch.php b/include/DirSearch.php
deleted file mode 100644
index 259e436cb..000000000
--- a/include/DirSearch.php
+++ /dev/null
@@ -1,64 +0,0 @@
- 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`.`addr` LIKE '%s' OR `gcontact`.`name` LIKE '%s' OR `gcontact`.`nick` LIKE '%s') $extra_sql
-							GROUP BY `gcontact`.`nurl`
-							ORDER BY `gcontact`.`nurl` DESC
-							LIMIT 1000",
-						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)));
-
-			return $results;
-		}
-
-	}
-}
diff --git a/include/acl_selectors.php b/include/acl_selectors.php
index 956c2a9f6..a18a1b33a 100644
--- a/include/acl_selectors.php
+++ b/include/acl_selectors.php
@@ -7,10 +7,10 @@
 use Friendica\App;
 use Friendica\Core\Config;
 use Friendica\Database\DBM;
+use Friendica\Model\GlobalContact;
 
 require_once "include/contact_selectors.php";
 require_once "include/contact_widgets.php";
-require_once "include/DirSearch.php";
 require_once "include/features.php";
 require_once "mod/proxy.php";
 
@@ -59,10 +59,9 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) {
 	return $o;
 }
 
-/// @TODO after an optional parameter, no mandadory parameter can follow
 /// @TODO find proper type-hints
-function contact_selector($selname, $selclass, $preselected = false, $options) {
-
+function contact_selector($selname, $selclass, $options, $preselected = false)
+{
 	$a = get_app();
 
 	$mutual = false;
@@ -779,7 +778,7 @@ function navbar_complete(App $a) {
 	}
 
 	if ($localsearch) {
-		$x = DirSearch::global_search_by_name($search, $mode);
+		$x = GlobalContact::searchByName($search, $mode);
 		return $x;
 	}
 
diff --git a/include/contact_widgets.php b/include/contact_widgets.php
index d47cf86c3..efb258eca 100644
--- a/include/contact_widgets.php
+++ b/include/contact_widgets.php
@@ -5,6 +5,7 @@ use Friendica\Core\System;
 use Friendica\Core\Config;
 use Friendica\Core\PConfig;
 use Friendica\Database\DBM;
+use Friendica\Model\GlobalContact;
 
 require_once 'include/contact_selectors.php';
 
@@ -248,31 +249,28 @@ function common_friends_visitor_widget($profile_uid) {
 		return;
 	}
 
-	require_once 'include/socgraph.php';
-
 	if ($cid) {
-		$t = count_common_friends($profile_uid, $cid);
+		$t = GlobalContact::countCommonFriends($profile_uid, $cid);
 	} else {
-		$t = count_common_friends_zcid($profile_uid, $zcid);
+		$t = GlobalContact::countCommonFriendsZcid($profile_uid, $zcid);
 	}
 	if (! $t) {
 		return;
 	}
 
 	if ($cid) {
-		$r = common_friends($profile_uid, $cid, 0, 5, true);
+		$r = GlobalContact::commonFriends($profile_uid, $cid, 0, 5, true);
 	} else {
-		$r = common_friends_zcid($profile_uid, $zcid, 0, 5, true);
+		$r = GlobalContact::commonFriendsZcid($profile_uid, $zcid, 0, 5, true);
 	}
 
 	return replace_macros(get_markup_template('remote_friends_common.tpl'), array(
-		'$desc' =>  sprintf( tt("%d contact in common", "%d contacts in common", $t), $t),
+		'$desc' =>  sprintf(tt("%d contact in common", "%d contacts in common", $t), $t),
 		'$base' => System::baseUrl(),
 		'$uid' => $profile_uid,
 		'$cid' => (($cid) ? $cid : '0'),
 		'$linkmore' => (($t > 5) ? 'true' : ''),
 		'$more' => t('show more'),
-		'$items' => $r
-	));
-
-};
+		'$items' => $r)
+	);
+}
diff --git a/include/cronjobs.php b/include/cronjobs.php
index 00064b112..0b0aa7f33 100644
--- a/include/cronjobs.php
+++ b/include/cronjobs.php
@@ -1,9 +1,12 @@
 : Searches for "search pattern" in the directory. "search pattern" is url encoded.
@@ -18,7 +22,7 @@ function discover_poco_run(&$argv, &$argc) {
 	- server : Searches for the poco server list. "poco url" is base64 encoded.
 	- update_server: Frequently check the first 250 servers for vitality.
 	- update_server_directory: Discover the given server id for their contacts
-	- poco_load: Load POCO data from a given POCO address
+	- PortableContact::load: Load POCO data from a given POCO address
 	- check_profile: Update remote profile data
 	*/
 
@@ -35,7 +39,7 @@ function discover_poco_run(&$argv, &$argc) {
 		$mode = 5;
 	} elseif (($argc == 3) && ($argv[1] == "update_server_directory")) {
 		$mode = 6;
-	} elseif (($argc > 5) && ($argv[1] == "poco_load")) {
+	} elseif (($argc > 5) && ($argv[1] == "load")) {
 		$mode = 7;
 	} elseif (($argc == 3) && ($argv[1] == "check_profile")) {
 		$mode = 8;
@@ -43,7 +47,8 @@ function discover_poco_run(&$argv, &$argc) {
 		$search = "";
 		$mode = 0;
 	} else {
-		die("Unknown or missing parameter ".$argv[1]."\n");
+		logger("Unknown or missing parameter ".$argv[1]."\n");
+		return;
 	}
 
 	logger('start '.$search);
@@ -58,7 +63,7 @@ function discover_poco_run(&$argv, &$argc) {
 		} else {
 			$url = '';
 		}
-		poco_load_worker(intval($argv[2]), intval($argv[3]), intval($argv[4]), $url);
+		PortableContact::load(intval($argv[2]), intval($argv[3]), intval($argv[4]), $url);
 	} elseif ($mode == 6) {
 		poco_discover_single_server(intval($argv[2]));
 	} elseif ($mode == 5) {
@@ -81,19 +86,19 @@ function discover_poco_run(&$argv, &$argc) {
 		}
 		logger($result, LOGGER_DEBUG);
 	} elseif ($mode == 3) {
-		update_suggestions();
-	} elseif (($mode == 2) && Config::get('system','poco_completion')) {
+		GlobalContact::updateSuggestions();
+	} elseif (($mode == 2) && Config::get('system', 'poco_completion')) {
 		discover_users();
-	} elseif (($mode == 1) && ($search != "") && Config::get('system','poco_local_search')) {
+	} elseif (($mode == 1) && ($search != "") && Config::get('system', 'poco_local_search')) {
 		discover_directory($search);
 		gs_search_user($search);
-	} elseif (($mode == 0) && ($search == "") && (Config::get('system','poco_discovery') > 0)) {
+	} elseif (($mode == 0) && ($search == "") && (Config::get('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 (!Config::get('system','ostatus_disabled'))
-			gs_discover();
+		if (!Config::get('system', 'ostatus_disabled'))
+			GlobalContact::gsDiscover();
 	}
 
 	logger('end '.$search);
@@ -246,7 +251,7 @@ function discover_directory($search) {
 
 				$data["server_url"] = $data["baseurl"];
 
-				update_gcontact($data);
+				GlobalContact::update($data);
 			} else {
 				logger("Profile ".$jj->url." is not responding or no Friendica contact - but network ".$data["network"], LOGGER_DEBUG);
 			}
@@ -287,7 +292,7 @@ function gs_search_user($search) {
 		$contact = Probe::uri($user->site_address."/".$user->name);
 		if ($contact["network"] != NETWORK_PHANTOM) {
 			$contact["about"] = $user->description;
-			update_gcontact($contact);
+			GlobalContact::update($contact);
 		}
 	}
 }
diff --git a/include/gprobe.php b/include/gprobe.php
index 700305185..30c81aa81 100644
--- a/include/gprobe.php
+++ b/include/gprobe.php
@@ -1,26 +1,31 @@
  $arr['owner-link'], "network" => $arr['network'],
+			$arr["gcontact-id"] = GlobalContact::getId(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'],
+			$arr["gcontact-id"] = GlobalContact::getId(array("url" => $arr['author-link'], "network" => $arr['network'],
 								 "photo" => $arr['author-avatar'], "name" => $arr['author-name']));
 		}
 	}
diff --git a/include/ostatus.php b/include/ostatus.php
index a58d0102a..091b3e80d 100644
--- a/include/ostatus.php
+++ b/include/ostatus.php
@@ -8,6 +8,7 @@ use Friendica\Core\Cache;
 use Friendica\Core\System;
 use Friendica\Core\Config;
 use Friendica\Database\DBM;
+use Friendica\Model\GlobalContact;
 use Friendica\Network\Probe;
 use Friendica\Util\Lock;
 use Friendica\Util\XML;
@@ -225,9 +226,9 @@ class ostatus
 			$contact["generation"] = 2;
 			$contact["hide"] = false; // OStatus contacts are never hidden
 			$contact["photo"] = $author["author-avatar"];
-			$gcid = update_gcontact($contact);
+			$gcid = GlobalContact::update($contact);
 
-			link_gcontact($gcid, $contact["uid"], $contact["id"]);
+			GlobalContact::link($gcid, $contact["uid"], $contact["id"]);
 		}
 
 		return $author;
diff --git a/include/post_update.php b/include/post_update.php
index 1d27f3399..8a346b7a2 100644
--- a/include/post_update.php
+++ b/include/post_update.php
@@ -5,6 +5,7 @@
 
 use Friendica\Core\Config;
 use Friendica\Database\DBM;
+use Friendica\Model\GlobalContact;
 
 /**
  * @brief Calls the post update functions
@@ -72,7 +73,7 @@ function post_update_1192() {
 
 	// 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'],
+		$gcontact_id = GlobalContact::getId(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"]));
diff --git a/include/socgraph.php b/include/socgraph.php
deleted file mode 100644
index 551fcfe2d..000000000
--- a/include/socgraph.php
+++ /dev/null
@@ -1,2446 +0,0 @@
-get_curl_code(), LOGGER_DEBUG);
-
-	if (($a->get_curl_code() > 299) || (! $s)) {
-		return;
-	}
-
-	$j = json_decode($s);
-
-	logger('poco_load: json: ' . print_r($j,true),LOGGER_DATA);
-
-	if (! isset($j->entry)) {
-		return;
-	}
-
-	$total = 0;
-	foreach ($j->entry as $entry) {
-
-		$total ++;
-		$profile_url = '';
-		$profile_photo = '';
-		$connect_url = '';
-		$name = '';
-		$network = '';
-		$updated = NULL_DATE;
-		$location = '';
-		$about = '';
-		$keywords = '';
-		$gender = '';
-		$contact_type = -1;
-		$generation = 0;
-
-		$name = $entry->displayName;
-
-		if (isset($entry->urls)) {
-			foreach ($entry->urls as $url) {
-				if ($url->type == 'profile') {
-					$profile_url = $url->value;
-					continue;
-				}
-				if ($url->type == 'webfinger') {
-					$connect_url = str_replace('acct:' , '', $url->value);
-					continue;
-				}
-			}
-		}
-		if (isset($entry->photos)) {
-			foreach ($entry->photos as $photo) {
-				if ($photo->type == 'profile') {
-					$profile_photo = $photo->value;
-					continue;
-				}
-			}
-		}
-
-		if (isset($entry->updated)) {
-			$updated = date("Y-m-d H:i:s", strtotime($entry->updated));
-		}
-
-		if (isset($entry->network)) {
-			$network = $entry->network;
-		}
-
-		if (isset($entry->currentLocation)) {
-			$location = $entry->currentLocation;
-		}
-
-		if (isset($entry->aboutMe)) {
-			$about = html2bbcode($entry->aboutMe);
-		}
-
-		if (isset($entry->gender)) {
-			$gender = $entry->gender;
-		}
-
-		if (isset($entry->generation) && ($entry->generation > 0)) {
-			$generation = ++$entry->generation;
-		}
-
-		if (isset($entry->tags)) {
-			foreach ($entry->tags as $tag) {
-				$keywords = implode(", ", $tag);
-			}
-		}
-
-		if (isset($entry->contactType) && ($entry->contactType >= 0)) {
-			$contact_type = $entry->contactType;
-		}
-
-		$gcontact = array("url" => $profile_url,
-				"name" => $name,
-				"network" => $network,
-				"photo" => $profile_photo,
-				"about" => $about,
-				"location" => $location,
-				"gender" => $gender,
-				"keywords" => $keywords,
-				"connect" => $connect_url,
-				"updated" => $updated,
-				"contact-type" => $contact_type,
-				"generation" => $generation);
-
-		try {
-			$gcontact = sanitize_gcontact($gcontact);
-			$gcid = update_gcontact($gcontact);
-
-			link_gcontact($gcid, $uid, $cid, $zcid);
-		} catch (Exception $e) {
-			logger($e->getMessage(), LOGGER_DEBUG);
-		}
-	}
-	logger("poco_load: loaded $total entries",LOGGER_DEBUG);
-
-	q("DELETE FROM `glink` WHERE `cid` = %d AND `uid` = %d AND `zcid` = %d AND `updated` < UTC_TIMESTAMP - INTERVAL 2 DAY",
-		intval($cid),
-		intval($uid),
-		intval($zcid)
-	);
-
-}
-/**
- * @brief Sanitize the given gcontact data
- *
- * @param array $gcontact array with gcontact data
- * @throw Exception
- *
- * Generation:
- *  0: No definition
- *  1: Profiles on this server
- *  2: Contacts of profiles on this server
- *  3: Contacts of contacts of profiles on this server
- *  4: ...
- *
- */
-function sanitize_gcontact($gcontact) {
-
-	if ($gcontact['url'] == "") {
-		throw new Exception('URL is empty');
-	}
-
-	$urlparts = parse_url($gcontact['url']);
-	if (!isset($urlparts["scheme"])) {
-		throw new Exception("This (".$gcontact['url'].") doesn't seem to be an url.");
-	}
-
-	if (in_array($urlparts["host"], array("www.facebook.com", "facebook.com", "twitter.com",
-						"identi.ca", "alpha.app.net"))) {
-		throw new Exception('Contact from a non federated network ignored. ('.$gcontact['url'].')');
-	}
-
-	// Don't store the statusnet connector as network
-	// We can't simply set this to NETWORK_OSTATUS since the connector could have fetched posts from friendica as well
-	if ($gcontact['network'] == NETWORK_STATUSNET) {
-		$gcontact['network'] = "";
-	}
-
-	// Assure that there are no parameter fragments in the profile url
-	if (in_array($gcontact['network'], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""))) {
-		$gcontact['url'] = clean_contact_url($gcontact['url']);
-	}
-
-	$alternate = poco_alternate_ostatus_url($gcontact['url']);
-
-	// The global contacts should contain the original picture, not the cached one
-	if (($gcontact['generation'] != 1) && stristr(normalise_link($gcontact['photo']), normalise_link(System::baseUrl()."/photo/"))) {
-		$gcontact['photo'] = "";
-	}
-
-	if (!isset($gcontact['network'])) {
-		$r = q("SELECT `network` FROM `contact` WHERE `uid` = 0 AND `nurl` = '%s' AND `network` != '' AND `network` != '%s' LIMIT 1",
-			dbesc(normalise_link($gcontact['url'])), dbesc(NETWORK_STATUSNET)
-		);
-		if (DBM::is_result($r)) {
-			$gcontact['network'] = $r[0]["network"];
-		}
-
-		if (($gcontact['network'] == "") || ($gcontact['network'] == NETWORK_OSTATUS)) {
-			$r = q("SELECT `network`, `url` FROM `contact` WHERE `uid` = 0 AND `alias` IN ('%s', '%s') AND `network` != '' AND `network` != '%s' LIMIT 1",
-				dbesc($gcontact['url']), dbesc(normalise_link($gcontact['url'])), dbesc(NETWORK_STATUSNET)
-			);
-			if (DBM::is_result($r)) {
-				$gcontact['network'] = $r[0]["network"];
-			}
-		}
-	}
-
-	$gcontact['server_url'] = '';
-	$gcontact['network'] = '';
-
-	$x = q("SELECT * FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1",
-		dbesc(normalise_link($gcontact['url']))
-	);
-
-	if (DBM::is_result($x)) {
-		if (!isset($gcontact['network']) && ($x[0]["network"] != NETWORK_STATUSNET)) {
-			$gcontact['network'] = $x[0]["network"];
-		}
-		if ($gcontact['updated'] <= NULL_DATE) {
-			$gcontact['updated'] = $x[0]["updated"];
-		}
-		if (!isset($gcontact['server_url']) && (normalise_link($x[0]["server_url"]) != normalise_link($x[0]["url"]))) {
-			$gcontact['server_url'] = $x[0]["server_url"];
-		}
-		if (!isset($gcontact['addr'])) {
-			$gcontact['addr'] = $x[0]["addr"];
-		}
-	}
-
-	if ((!isset($gcontact['network']) || !isset($gcontact['name']) || !isset($gcontact['addr']) || !isset($gcontact['photo']) || !isset($gcontact['server_url']) || $alternate)
-		&& poco_reachable($gcontact['url'], $gcontact['server_url'], $gcontact['network'], false)) {
-		$data = Probe::uri($gcontact['url']);
-
-		if ($data["network"] == NETWORK_PHANTOM) {
-			throw new Exception('Probing for URL '.$gcontact['url'].' failed');
-		}
-
-		$orig_profile = $gcontact['url'];
-
-		$gcontact["server_url"] = $data["baseurl"];
-
-		$gcontact = array_merge($gcontact, $data);
-
-		if ($alternate && ($gcontact['network'] == NETWORK_OSTATUS)) {
-			// Delete the old entry - if it exists
-			$r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($orig_profile)));
-			if (DBM::is_result($r)) {
-				q("DELETE FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($orig_profile)));
-				q("DELETE FROM `glink` WHERE `gcid` = %d", intval($r[0]["id"]));
-			}
-		}
-	}
-
-	if (!isset($gcontact['name']) || !isset($gcontact['photo'])) {
-		throw new Exception('No name and photo for URL '.$gcontact['url']);
-	}
-
-	if (!in_array($gcontact['network'], array(NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_DIASPORA))) {
-		throw new Exception('No federated network ('.$gcontact['network'].') detected for URL '.$gcontact['url']);
-	}
-
-	if (!isset($gcontact['server_url'])) {
-		// We check the server url to be sure that it is a real one
-		$server_url = poco_detect_server($gcontact['url']);
-
-		// We are now sure that it is a correct URL. So we use it in the future
-		if ($server_url != "") {
-			$gcontact['server_url'] = $server_url;
-		}
-	}
-
-	// The server URL doesn't seem to be valid, so we don't store it.
-	if (!poco_check_server($gcontact['server_url'], $gcontact['network'])) {
-		$gcontact['server_url'] = "";
-	}
-
-	return $gcontact;
-}
-
-/**
- * @brief Link the gcontact entry with user, contact and global contact
- *
- * @param integer $gcid Global contact ID
- * @param integer $cid Contact ID
- * @param integer $uid User ID
- * @param integer $zcid Global Contact ID
- * *
- */
-function link_gcontact($gcid, $uid = 0, $cid = 0, $zcid = 0) {
-
-	if ($gcid <= 0) {
-		return;
-	}
-
-	$r = q("SELECT * FROM `glink` WHERE `cid` = %d AND `uid` = %d AND `gcid` = %d AND `zcid` = %d LIMIT 1",
-		intval($cid),
-		intval($uid),
-		intval($gcid),
-		intval($zcid)
-	);
-
-	if (!DBM::is_result($r)) {
-		q("INSERT INTO `glink` (`cid`, `uid`, `gcid`, `zcid`, `updated`) VALUES (%d, %d, %d, %d, '%s') ",
-			intval($cid),
-			intval($uid),
-			intval($gcid),
-			intval($zcid),
-			dbesc(datetime_convert())
-		);
-	} else {
-		q("UPDATE `glink` SET `updated` = '%s' WHERE `cid` = %d AND `uid` = %d AND `gcid` = %d AND `zcid` = %d",
-			dbesc(datetime_convert()),
-			intval($cid),
-			intval($uid),
-			intval($gcid),
-			intval($zcid)
-		);
-	}
-}
-
-function poco_reachable($profile, $server = "", $network = "", $force = false) {
-
-	if ($server == "") {
-		$server = poco_detect_server($profile);
-	}
-
-	if ($server == "") {
-		return true;
-	}
-
-	return poco_check_server($server, $network, $force);
-}
-
-function poco_detect_server($profile) {
-
-	// Try to detect the server path based upon some known standard paths
-	$server_url = "";
-
-	if ($server_url == "") {
-		$friendica = preg_replace("=(https?://)(.*)/profile/(.*)=ism", "$1$2", $profile);
-		if ($friendica != $profile) {
-			$server_url = $friendica;
-			$network = NETWORK_DFRN;
-		}
-	}
-
-	if ($server_url == "") {
-		$diaspora = preg_replace("=(https?://)(.*)/u/(.*)=ism", "$1$2", $profile);
-		if ($diaspora != $profile) {
-			$server_url = $diaspora;
-			$network = NETWORK_DIASPORA;
-		}
-	}
-
-	if ($server_url == "") {
-		$red = preg_replace("=(https?://)(.*)/channel/(.*)=ism", "$1$2", $profile);
-		if ($red != $profile) {
-			$server_url = $red;
-			$network = NETWORK_DIASPORA;
-		}
-	}
-
-	// Mastodon
-	if ($server_url == "") {
-		$mastodon = preg_replace("=(https?://)(.*)/users/(.*)=ism", "$1$2", $profile);
-		if ($mastodon != $profile) {
-			$server_url = $mastodon;
-			$network = NETWORK_OSTATUS;
-		}
-	}
-
-	// Numeric OStatus variant
-	if ($server_url == "") {
-		$ostatus = preg_replace("=(https?://)(.*)/user/(.*)=ism", "$1$2", $profile);
-		if ($ostatus != $profile) {
-			$server_url = $ostatus;
-			$network = NETWORK_OSTATUS;
-		}
-	}
-
-	// Wild guess
-	if ($server_url == "") {
-		$base = preg_replace("=(https?://)(.*?)/(.*)=ism", "$1$2", $profile);
-		if ($base != $profile) {
-			$server_url = $base;
-			$network = NETWORK_PHANTOM;
-		}
-	}
-
-	if ($server_url == "") {
-		return "";
-	}
-
-	$r = q("SELECT `id` FROM `gserver` WHERE `nurl` = '%s' AND `last_contact` > `last_failure`",
-		dbesc(normalise_link($server_url)));
-	if (DBM::is_result($r)) {
-		return $server_url;
-	}
-
-	// Fetch the host-meta to check if this really is a server
-	$serverret = z_fetch_url($server_url."/.well-known/host-meta");
-	if (!$serverret["success"]) {
-		return "";
-	}
-
-	return $server_url;
-}
-
-function poco_alternate_ostatus_url($url) {
-	return(preg_match("=https?://.+/user/\d+=ism", $url, $matches));
-}
-
-function poco_last_updated($profile, $force = false) {
-
-	$gcontacts = q("SELECT * FROM `gcontact` WHERE `nurl` = '%s'",
-			dbesc(normalise_link($profile)));
-
-	if (!DBM::is_result($gcontacts)) {
-		return false;
-	}
-
-	$contact = array("url" => $profile);
-
-	if ($gcontacts[0]["created"] <= NULL_DATE) {
-		$contact['created'] = datetime_convert();
-	}
-
-	if ($force) {
-		$server_url = normalise_link(poco_detect_server($profile));
-	}
-
-	if (($server_url == '') && ($gcontacts[0]["server_url"] != "")) {
-		$server_url = $gcontacts[0]["server_url"];
-	}
-
-	if (!$force && (($server_url == '') || ($gcontacts[0]["server_url"] == $gcontacts[0]["nurl"]))) {
-		$server_url = normalise_link(poco_detect_server($profile));
-	}
-
-	if (!in_array($gcontacts[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_FEED, NETWORK_OSTATUS, ""))) {
-		logger("Profile ".$profile.": Network type ".$gcontacts[0]["network"]." can't be checked", LOGGER_DEBUG);
-		return false;
-	}
-
-	if ($server_url != "") {
-		if (!poco_check_server($server_url, $gcontacts[0]["network"], $force)) {
-			if ($force) {
-				q("UPDATE `gcontact` SET `last_failure` = '%s' WHERE `nurl` = '%s'",
-					dbesc(datetime_convert()), dbesc(normalise_link($profile)));
-			}
-
-			logger("Profile ".$profile.": Server ".$server_url." wasn't reachable.", LOGGER_DEBUG);
-			return false;
-		}
-		$contact['server_url'] = $server_url;
-	}
-
-	if (in_array($gcontacts[0]["network"], array("", NETWORK_FEED))) {
-		$server = q("SELECT `network` FROM `gserver` WHERE `nurl` = '%s' AND `network` != ''",
-			dbesc(normalise_link($server_url)));
-
-		if ($server) {
-			$contact['network'] = $server[0]["network"];
-		} else {
-			return false;
-		}
-	}
-
-	// noscrape is really fast so we don't cache the call.
-	if (($server_url != "") && ($gcontacts[0]["nick"] != "")) {
-
-		//  Use noscrape if possible
-		$server = q("SELECT `noscrape`, `network` FROM `gserver` WHERE `nurl` = '%s' AND `noscrape` != ''", dbesc(normalise_link($server_url)));
-
-		if ($server) {
-			$noscraperet = z_fetch_url($server[0]["noscrape"]."/".$gcontacts[0]["nick"]);
-
-			if ($noscraperet["success"] && ($noscraperet["body"] != "")) {
-
-				$noscrape = json_decode($noscraperet["body"], true);
-
-				if (is_array($noscrape)) {
-					$contact["network"] = $server[0]["network"];
-
-					if (isset($noscrape["fn"])) {
-						$contact["name"] = $noscrape["fn"];
-					}
-					if (isset($noscrape["comm"])) {
-						$contact["community"] = $noscrape["comm"];
-					}
-					if (isset($noscrape["tags"])) {
-						$keywords = implode(" ", $noscrape["tags"]);
-						if ($keywords != "") {
-							$contact["keywords"] = $keywords;
-						}
-					}
-
-					$location = formatted_location($noscrape);
-					if ($location) {
-						$contact["location"] = $location;
-					}
-					if (isset($noscrape["dfrn-notify"])) {
-						$contact["notify"] = $noscrape["dfrn-notify"];
-					}
-					// Remove all fields that are not present in the gcontact table
-					unset($noscrape["fn"]);
-					unset($noscrape["key"]);
-					unset($noscrape["homepage"]);
-					unset($noscrape["comm"]);
-					unset($noscrape["tags"]);
-					unset($noscrape["locality"]);
-					unset($noscrape["region"]);
-					unset($noscrape["country-name"]);
-					unset($noscrape["contacts"]);
-					unset($noscrape["dfrn-request"]);
-					unset($noscrape["dfrn-confirm"]);
-					unset($noscrape["dfrn-notify"]);
-					unset($noscrape["dfrn-poll"]);
-
-					// Set the date of the last contact
-					/// @todo By now the function "update_gcontact" doesn't work with this field
-					//$contact["last_contact"] = datetime_convert();
-
-					$contact = array_merge($contact, $noscrape);
-
-					update_gcontact($contact);
-
-					if (trim($noscrape["updated"]) != "") {
-						q("UPDATE `gcontact` SET `last_contact` = '%s' WHERE `nurl` = '%s'",
-							dbesc(datetime_convert()), dbesc(normalise_link($profile)));
-
-						logger("Profile ".$profile." was last updated at ".$noscrape["updated"]." (noscrape)", LOGGER_DEBUG);
-
-						return $noscrape["updated"];
-					}
-				}
-			}
-		}
-	}
-
-	// If we only can poll the feed, then we only do this once a while
-	if (!$force && !poco_do_update($gcontacts[0]["created"], $gcontacts[0]["updated"], $gcontacts[0]["last_failure"], $gcontacts[0]["last_contact"])) {
-		logger("Profile ".$profile." was last updated at ".$gcontacts[0]["updated"]." (cached)", LOGGER_DEBUG);
-
-		update_gcontact($contact);
-		return $gcontacts[0]["updated"];
-	}
-
-	$data = Probe::uri($profile);
-
-	// Is the profile link the alternate OStatus link notation? (http://domain.tld/user/4711)
-	// Then check the other link and delete this one
-	if (($data["network"] == NETWORK_OSTATUS) && poco_alternate_ostatus_url($profile) &&
-		(normalise_link($profile) == normalise_link($data["alias"])) &&
-		(normalise_link($profile) != normalise_link($data["url"]))) {
-
-		// Delete the old entry
-		q("DELETE FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($profile)));
-		q("DELETE FROM `glink` WHERE `gcid` = %d", intval($gcontacts[0]["id"]));
-
-		$gcontact = array_merge($gcontacts[0], $data);
-
-		$gcontact["server_url"] = $data["baseurl"];
-
-		try {
-			$gcontact = sanitize_gcontact($gcontact);
-			update_gcontact($gcontact);
-
-			poco_last_updated($data["url"], $force);
-		} catch (Exception $e) {
-			logger($e->getMessage(), LOGGER_DEBUG);
-		}
-
-		logger("Profile ".$profile." was deleted", LOGGER_DEBUG);
-		return false;
-	}
-
-	if (($data["poll"] == "") || (in_array($data["network"], array(NETWORK_FEED, NETWORK_PHANTOM)))) {
-		q("UPDATE `gcontact` SET `last_failure` = '%s' WHERE `nurl` = '%s'",
-			dbesc(datetime_convert()), dbesc(normalise_link($profile)));
-
-		logger("Profile ".$profile." wasn't reachable (profile)", LOGGER_DEBUG);
-		return false;
-	}
-
-	$contact = array_merge($contact, $data);
-
-	$contact["server_url"] = $data["baseurl"];
-
-	update_gcontact($contact);
-
-	$feedret = z_fetch_url($data["poll"]);
-
-	if (!$feedret["success"]) {
-		q("UPDATE `gcontact` SET `last_failure` = '%s' WHERE `nurl` = '%s'",
-			dbesc(datetime_convert()), dbesc(normalise_link($profile)));
-
-		logger("Profile ".$profile." wasn't reachable (no feed)", LOGGER_DEBUG);
-		return false;
-	}
-
-	$doc = new DOMDocument();
-	@$doc->loadXML($feedret["body"]);
-
-	$xpath = new DomXPath($doc);
-	$xpath->registerNamespace('atom', "http://www.w3.org/2005/Atom");
-
-	$entries = $xpath->query('/atom:feed/atom:entry');
-
-	$last_updated = "";
-
-	foreach ($entries as $entry) {
-		$published = $xpath->query('atom:published/text()', $entry)->item(0)->nodeValue;
-		$updated = $xpath->query('atom:updated/text()', $entry)->item(0)->nodeValue;
-
-		if ($last_updated < $published)
-			$last_updated = $published;
-
-		if ($last_updated < $updated)
-			$last_updated = $updated;
-	}
-
-	// Maybe there aren't any entries. Then check if it is a valid feed
-	if ($last_updated == "") {
-		if ($xpath->query('/atom:feed')->length > 0) {
-			$last_updated = NULL_DATE;
-		}
-	}
-	q("UPDATE `gcontact` SET `updated` = '%s', `last_contact` = '%s' WHERE `nurl` = '%s'",
-		dbesc(DBM::date($last_updated)), dbesc(DBM::date()), dbesc(normalise_link($profile)));
-
-	if (($gcontacts[0]["generation"] == 0)) {
-		q("UPDATE `gcontact` SET `generation` = 9 WHERE `nurl` = '%s'",
-			dbesc(normalise_link($profile)));
-	}
-
-	logger("Profile ".$profile." was last updated at ".$last_updated, LOGGER_DEBUG);
-
-	return($last_updated);
-}
-
-function poco_do_update($created, $updated, $last_failure,  $last_contact) {
-	$now = strtotime(datetime_convert());
-
-	if ($updated > $last_contact) {
-		$contact_time = strtotime($updated);
-	} else {
-		$contact_time = strtotime($last_contact);
-	}
-
-	$failure_time = strtotime($last_failure);
-	$created_time = strtotime($created);
-
-	// If there is no "created" time then use the current time
-	if ($created_time <= 0) {
-		$created_time = $now;
-	}
-
-	// If the last contact was less than 24 hours then don't update
-	if (($now - $contact_time) < (60 * 60 * 24)) {
-		return false;
-	}
-
-	// If the last failure was less than 24 hours then don't update
-	if (($now - $failure_time) < (60 * 60 * 24)) {
-		return false;
-	}
-
-	// If the last contact was less than a week ago and the last failure is older than a week then don't update
-	//if ((($now - $contact_time) < (60 * 60 * 24 * 7)) && ($contact_time > $failure_time))
-	//	return false;
-
-	// If the last contact time was more than a week ago and the contact was created more than a week ago, then only try once a week
-	if ((($now - $contact_time) > (60 * 60 * 24 * 7)) && (($now - $created_time) > (60 * 60 * 24 * 7)) && (($now - $failure_time) < (60 * 60 * 24 * 7))) {
-		return false;
-	}
-
-	// If the last contact time was more than a month ago and the contact was created more than a month ago, then only try once a month
-	if ((($now - $contact_time) > (60 * 60 * 24 * 30)) && (($now - $created_time) > (60 * 60 * 24 * 30)) && (($now - $failure_time) < (60 * 60 * 24 * 30))) {
-		return false;
-	}
-
-	return true;
-}
-
-function poco_to_boolean($val) {
-	if (($val == "true") || ($val == 1)) {
-		return true;
-	} elseif (($val == "false") || ($val == 0)) {
-		return false;
-	}
-
-	return $val;
-}
-
-/**
- * @brief Detect server type (Hubzilla or Friendica) via the poco data
- *
- * @param object $data POCO data
- * @return array Server data
- */
-function poco_detect_poco_data($data) {
-	$server = false;
-
-	if (!isset($data->entry)) {
-		return false;
-	}
-
-	if (count($data->entry) == 0) {
-		return false;
-	}
-
-	if (!isset($data->entry[0]->urls)) {
-		return false;
-	}
-
-	if (count($data->entry[0]->urls) == 0) {
-		return false;
-	}
-
-	foreach ($data->entry[0]->urls as $url) {
-		if ($url->type == 'zot') {
-			$server = array();
-			$server["platform"] = 'Hubzilla';
-			$server["network"] = NETWORK_DIASPORA;
-			return $server;
-		}
-	}
-	return false;
-}
-
-/**
- * @brief Detect server type by using the nodeinfo data
- *
- * @param string $server_url address of the server
- * @return array Server data
- */
-function poco_fetch_nodeinfo($server_url) {
-	$serverret = z_fetch_url($server_url."/.well-known/nodeinfo");
-	if (!$serverret["success"]) {
-		return false;
-	}
-
-	$nodeinfo = json_decode($serverret['body']);
-
-	if (!is_object($nodeinfo)) {
-		return false;
-	}
-
-	if (!is_array($nodeinfo->links)) {
-		return false;
-	}
-
-	$nodeinfo_url = '';
-
-	foreach ($nodeinfo->links as $link) {
-		if ($link->rel == 'http://nodeinfo.diaspora.software/ns/schema/1.0') {
-			$nodeinfo_url = $link->href;
-		}
-	}
-
-	if ($nodeinfo_url == '') {
-		return false;
-	}
-
-	$serverret = z_fetch_url($nodeinfo_url);
-	if (!$serverret["success"]) {
-		return false;
-	}
-
-	$nodeinfo = json_decode($serverret['body']);
-
-	if (!is_object($nodeinfo)) {
-		return false;
-	}
-
-	$server = array();
-
-	$server['register_policy'] = REGISTER_CLOSED;
-
-	if (is_bool($nodeinfo->openRegistrations) && $nodeinfo->openRegistrations) {
-		$server['register_policy'] = REGISTER_OPEN;
-	}
-
-	if (is_object($nodeinfo->software)) {
-		if (isset($nodeinfo->software->name)) {
-			$server['platform'] = $nodeinfo->software->name;
-		}
-
-		if (isset($nodeinfo->software->version)) {
-			$server['version'] = $nodeinfo->software->version;
-			// Version numbers on Nodeinfo are presented with additional info, e.g.:
-			// 0.6.3.0-p1702cc1c, 0.6.99.0-p1b9ab160 or 3.4.3-2-1191.
-			$server['version'] = preg_replace("=(.+)-(.{4,})=ism", "$1", $server['version']);
-		}
-	}
-
-	if (is_object($nodeinfo->metadata)) {
-		if (isset($nodeinfo->metadata->nodeName)) {
-			$server['site_name'] = $nodeinfo->metadata->nodeName;
-		}
-	}
-
-	$diaspora = false;
-	$friendica = false;
-	$gnusocial = false;
-
-	if (is_array($nodeinfo->protocols->inbound)) {
-		foreach ($nodeinfo->protocols->inbound as $inbound) {
-			if ($inbound == 'diaspora') {
-				$diaspora = true;
-			}
-			if ($inbound == 'friendica') {
-				$friendica = true;
-			}
-			if ($inbound == 'gnusocial') {
-				$gnusocial = true;
-			}
-		}
-	}
-
-	if ($gnusocial) {
-		$server['network'] = NETWORK_OSTATUS;
-	}
-	if ($diaspora) {
-		$server['network'] = NETWORK_DIASPORA;
-	}
-	if ($friendica) {
-		$server['network'] = NETWORK_DFRN;
-	}
-
-	if (!$server) {
-		return false;
-	}
-
-	return $server;
-}
-
-/**
- * @brief Detect server type (Hubzilla or Friendica) via the front page body
- *
- * @param string $body Front page of the server
- * @return array Server data
- */
-function poco_detect_server_type($body) {
-	$server = false;
-
-	$doc = new DOMDocument();
-	@$doc->loadHTML($body);
-	$xpath = new DomXPath($doc);
-
-	$list = $xpath->query("//meta[@name]");
-
-	foreach ($list as $node) {
-		$attr = array();
-		if ($node->attributes->length) {
-			foreach ($node->attributes as $attribute) {
-				$attr[$attribute->name] = $attribute->value;
-			}
-		}
-		if ($attr['name'] == 'generator') {
-			$version_part = explode(" ", $attr['content']);
-			if (count($version_part) == 2) {
-				if (in_array($version_part[0], array("Friendika", "Friendica"))) {
-					$server = array();
-					$server["platform"] = $version_part[0];
-					$server["version"] = $version_part[1];
-					$server["network"] = NETWORK_DFRN;
-				}
-			}
-		}
-	}
-
-	if (!$server) {
-		$list = $xpath->query("//meta[@property]");
-
-		foreach ($list as $node) {
-			$attr = array();
-			if ($node->attributes->length) {
-				foreach ($node->attributes as $attribute) {
-					$attr[$attribute->name] = $attribute->value;
-				}
-			}
-			if ($attr['property'] == 'generator' && in_array($attr['content'], array("hubzilla", "BlaBlaNet"))) {
-				$server = array();
-				$server["platform"] = $attr['content'];
-				$server["version"] = "";
-				$server["network"] = NETWORK_DIASPORA;
-			}
-		}
-	}
-
-	if (!$server) {
-		return false;
-	}
-
-	$server["site_name"] = $xpath->evaluate($element."//head/title/text()", $context)->item(0)->nodeValue;
-	return $server;
-}
-
-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;
-	}
-
-	$servers = q("SELECT * FROM `gserver` WHERE `nurl` = '%s'", dbesc(normalise_link($server_url)));
-	if (DBM::is_result($servers)) {
-
-		if ($servers[0]["created"] <= NULL_DATE) {
-			q("UPDATE `gserver` SET `created` = '%s' WHERE `nurl` = '%s'",
-				dbesc(datetime_convert()), dbesc(normalise_link($server_url)));
-		}
-		$poco = $servers[0]["poco"];
-		$noscrape = $servers[0]["noscrape"];
-
-		if ($network == "") {
-			$network = $servers[0]["network"];
-		}
-
-		$last_contact = $servers[0]["last_contact"];
-		$last_failure = $servers[0]["last_failure"];
-		$version = $servers[0]["version"];
-		$platform = $servers[0]["platform"];
-		$site_name = $servers[0]["site_name"];
-		$info = $servers[0]["info"];
-		$register_policy = $servers[0]["register_policy"];
-
-		if (!$force && !poco_do_update($servers[0]["created"], "", $last_failure, $last_contact)) {
-			logger("Use cached data for server ".$server_url, LOGGER_DEBUG);
-			return ($last_contact >= $last_failure);
-		}
-	} else {
-		$poco = "";
-		$noscrape = "";
-		$version = "";
-		$platform = "";
-		$site_name = "";
-		$info = "";
-		$register_policy = -1;
-
-		$last_contact = NULL_DATE;
-		$last_failure = NULL_DATE;
-	}
-	logger("Server ".$server_url." is outdated or unknown. Start discovery. Force: ".$force." Created: ".$servers[0]["created"]." Failure: ".$last_failure." Contact: ".$last_contact, LOGGER_DEBUG);
-
-	$failure = false;
-	$possible_failure = false;
-	$orig_last_failure = $last_failure;
-	$orig_last_contact = $last_contact;
-
-	// Check if the page is accessible via SSL.
-	$orig_server_url = $server_url;
-	$server_url = str_replace("http://", "https://", $server_url);
-
-	// We set the timeout to 20 seconds since this operation should be done in no time if the server was vital
-	$serverret = z_fetch_url($server_url."/.well-known/host-meta", false, $redirects, array('timeout' => 20));
-
-	// Quit if there is a timeout.
-	// But we want to make sure to only quit if we are mostly sure that this server url fits.
-	if (DBM::is_result($servers) && ($orig_server_url == $server_url) &&
-		($serverret['errno'] == CURLE_OPERATION_TIMEDOUT)) {
-		logger("Connection to server ".$server_url." timed out.", LOGGER_DEBUG);
-		dba::update('gserver', array('last_failure' => datetime_convert()), array('nurl' => normalise_link($server_url)));
-		return false;
-	}
-
-	// Maybe the page is unencrypted only?
-	$xmlobj = @simplexml_load_string($serverret["body"],'SimpleXMLElement',0, "http://docs.oasis-open.org/ns/xri/xrd-1.0");
-	if (!$serverret["success"] || ($serverret["body"] == "") || (@sizeof($xmlobj) == 0) || !is_object($xmlobj)) {
-		$server_url = str_replace("https://", "http://", $server_url);
-
-		// We set the timeout to 20 seconds since this operation should be done in no time if the server was vital
-		$serverret = z_fetch_url($server_url."/.well-known/host-meta", false, $redirects, array('timeout' => 20));
-
-		// Quit if there is a timeout
-		if ($serverret['errno'] == CURLE_OPERATION_TIMEDOUT) {
-			logger("Connection to server ".$server_url." timed out.", LOGGER_DEBUG);
-			dba::update('gserver', array('last_failure' => datetime_convert()), array('nurl' => normalise_link($server_url)));
-			return false;
-		}
-
-		$xmlobj = @simplexml_load_string($serverret["body"],'SimpleXMLElement',0, "http://docs.oasis-open.org/ns/xri/xrd-1.0");
-	}
-
-	if (!$serverret["success"] || ($serverret["body"] == "") || (sizeof($xmlobj) == 0) || !is_object($xmlobj)) {
-		// Workaround for bad configured servers (known nginx problem)
-		if (!in_array($serverret["debug"]["http_code"], array("403", "404"))) {
-			$failure = true;
-		}
-		$possible_failure = true;
-	}
-
-	// If the server has no possible failure we reset the cached data
-	if (!$possible_failure) {
-		$version = "";
-		$platform = "";
-		$site_name = "";
-		$info = "";
-		$register_policy = -1;
-	}
-
-	// Look for poco
-	if (!$failure) {
-		$serverret = z_fetch_url($server_url."/poco");
-		if ($serverret["success"]) {
-			$data = json_decode($serverret["body"]);
-			if (isset($data->totalResults)) {
-				$poco = $server_url."/poco";
-				$server = poco_detect_poco_data($data);
-				if ($server) {
-					$platform = $server['platform'];
-					$network = $server['network'];
-					$version = '';
-					$site_name = '';
-				}
-			}
-		}
-	}
-
-	if (!$failure) {
-		// Test for Diaspora, Hubzilla, Mastodon or older Friendica servers
-		$serverret = z_fetch_url($server_url);
-
-		if (!$serverret["success"] || ($serverret["body"] == "")) {
-			$failure = true;
-		} else {
-			$server = poco_detect_server_type($serverret["body"]);
-			if ($server) {
-				$platform = $server['platform'];
-				$network = $server['network'];
-				$version = $server['version'];
-				$site_name = $server['site_name'];
-			}
-
-			$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 (stristr($line,'Server: Mastodon')) {
-						$platform = "Mastodon";
-						$network = NETWORK_OSTATUS;
-					}
-				}
-			}
-		}
-	}
-
-	if (!$failure && ($poco == "")) {
-		// Test for Statusnet
-		// Will also return data for Friendica and GNU Social - but it will be overwritten later
-		// The "not implemented" is a special treatment for really, really old Friendica versions
-		$serverret = z_fetch_url($server_url."/api/statusnet/version.json");
-		if ($serverret["success"] && ($serverret["body"] != '{"error":"not implemented"}') &&
-			($serverret["body"] != '') && (strlen($serverret["body"]) < 30)) {
-			$platform = "StatusNet";
-			// Remove junk that some GNU Social servers return
-			$version = str_replace(chr(239).chr(187).chr(191), "", $serverret["body"]);
-			$version = trim($version, '"');
-			$network = NETWORK_OSTATUS;
-		}
-
-		// Test for GNU Social
-		$serverret = z_fetch_url($server_url."/api/gnusocial/version.json");
-		if ($serverret["success"] && ($serverret["body"] != '{"error":"not implemented"}') &&
-			($serverret["body"] != '') && (strlen($serverret["body"]) < 30)) {
-			$platform = "GNU Social";
-			// Remove junk that some GNU Social servers return
-			$version = str_replace(chr(239).chr(187).chr(191), "", $serverret["body"]);
-			$version = trim($version, '"');
-			$network = NETWORK_OSTATUS;
-		}
-
-		// Test for Mastodon
-		$orig_version = $version;
-		$serverret = z_fetch_url($server_url."/api/v1/instance");
-		if ($serverret["success"] && ($serverret["body"] != '')) {
-			$data = json_decode($serverret["body"]);
-			if (isset($data->version)) {
-				$platform = "Mastodon";
-				$version = $data->version;
-				$site_name = $data->title;
-				$info = $data->description;
-				$network = NETWORK_OSTATUS;
-			}
-		}
-		if (strstr($orig_version.$version, 'Pleroma')) {
-			$platform = 'Pleroma';
-			$version = trim(str_replace('Pleroma', '', $version));
-		}
-	}
-
-	if (!$failure) {
-		// Test for Hubzilla and Red
-		$serverret = z_fetch_url($server_url."/siteinfo.json");
-		if ($serverret["success"]) {
-			$data = json_decode($serverret["body"]);
-			if (isset($data->url)) {
-				$platform = $data->platform;
-				$version = $data->version;
-				$network = NETWORK_DIASPORA;
-			}
-			if (!empty($data->site_name)) {
-				$site_name = $data->site_name;
-			}
-			switch ($data->register_policy) {
-				case "REGISTER_OPEN":
-					$register_policy = REGISTER_OPEN;
-					break;
-				case "REGISTER_APPROVE":
-					$register_policy = REGISTER_APPROVE;
-					break;
-				case "REGISTER_CLOSED":
-				default:
-					$register_policy = REGISTER_CLOSED;
-					break;
-			}
-		} else {
-			// Test for Hubzilla, Redmatrix or Friendica
-			$serverret = z_fetch_url($server_url."/api/statusnet/config.json");
-			if ($serverret["success"]) {
-				$data = json_decode($serverret["body"]);
-				if (isset($data->site->server)) {
-					if (isset($data->site->platform)) {
-						$platform = $data->site->platform->PLATFORM_NAME;
-						$version = $data->site->platform->STD_VERSION;
-						$network = NETWORK_DIASPORA;
-					}
-					if (isset($data->site->BlaBlaNet)) {
-						$platform = $data->site->BlaBlaNet->PLATFORM_NAME;
-						$version = $data->site->BlaBlaNet->STD_VERSION;
-						$network = NETWORK_DIASPORA;
-					}
-					if (isset($data->site->hubzilla)) {
-						$platform = $data->site->hubzilla->PLATFORM_NAME;
-						$version = $data->site->hubzilla->RED_VERSION;
-						$network = NETWORK_DIASPORA;
-					}
-					if (isset($data->site->redmatrix)) {
-						if (isset($data->site->redmatrix->PLATFORM_NAME)) {
-							$platform = $data->site->redmatrix->PLATFORM_NAME;
-						} elseif (isset($data->site->redmatrix->RED_PLATFORM)) {
-							$platform = $data->site->redmatrix->RED_PLATFORM;
-						}
-
-						$version = $data->site->redmatrix->RED_VERSION;
-						$network = NETWORK_DIASPORA;
-					}
-					if (isset($data->site->friendica)) {
-						$platform = $data->site->friendica->FRIENDICA_PLATFORM;
-						$version = $data->site->friendica->FRIENDICA_VERSION;
-						$network = NETWORK_DFRN;
-					}
-
-					$site_name = $data->site->name;
-
-					$data->site->closed = poco_to_boolean($data->site->closed);
-					$data->site->private = poco_to_boolean($data->site->private);
-					$data->site->inviteonly = poco_to_boolean($data->site->inviteonly);
-
-					if (!$data->site->closed && !$data->site->private and $data->site->inviteonly) {
-						$register_policy = REGISTER_APPROVE;
-					} elseif (!$data->site->closed && !$data->site->private) {
-						$register_policy = REGISTER_OPEN;
-					} else {
-						$register_policy = REGISTER_CLOSED;
-					}
-				}
-			}
-		}
-	}
-
-	// Query statistics.json. Optional package for Diaspora, Friendica and Redmatrix
-	if (!$failure) {
-		$serverret = z_fetch_url($server_url."/statistics.json");
-		if ($serverret["success"]) {
-			$data = json_decode($serverret["body"]);
-			if (isset($data->version)) {
-				$version = $data->version;
-				// Version numbers on statistics.json are presented with additional info, e.g.:
-				// 0.6.3.0-p1702cc1c, 0.6.99.0-p1b9ab160 or 3.4.3-2-1191.
-				$version = preg_replace("=(.+)-(.{4,})=ism", "$1", $version);
-			}
-
-			if (!empty($data->name)) {
-				$site_name = $data->name;
-			}
-
-			if (!empty($data->network)) {
-				$platform = $data->network;
-			}
-
-			if ($platform == "Diaspora") {
-				$network = NETWORK_DIASPORA;
-			}
-
-			if ($data->registrations_open) {
-				$register_policy = REGISTER_OPEN;
-			} else {
-				$register_policy = REGISTER_CLOSED;
-			}
-		}
-	}
-
-	// Query nodeinfo. Working for (at least) Diaspora and Friendica.
-	if (!$failure) {
-		$server = poco_fetch_nodeinfo($server_url);
-		if ($server) {
-			$register_policy = $server['register_policy'];
-
-			if (isset($server['platform'])) {
-				$platform = $server['platform'];
-			}
-
-			if (isset($server['network'])) {
-				$network = $server['network'];
-			}
-
-			if (isset($server['version'])) {
-				$version = $server['version'];
-			}
-
-			if (isset($server['site_name'])) {
-				$site_name = $server['site_name'];
-			}
-		}
-	}
-
-	// Check for noscrape
-	// Friendica servers could be detected as OStatus servers
-	if (!$failure && in_array($network, array(NETWORK_DFRN, NETWORK_OSTATUS))) {
-		$serverret = z_fetch_url($server_url."/friendica/json");
-
-		if (!$serverret["success"]) {
-			$serverret = z_fetch_url($server_url."/friendika/json");
-		}
-
-		if ($serverret["success"]) {
-			$data = json_decode($serverret["body"]);
-
-			if (isset($data->version)) {
-				$network = NETWORK_DFRN;
-
-				$noscrape = $data->no_scrape_url;
-				$version = $data->version;
-				$site_name = $data->site_name;
-				$info = $data->info;
-				$register_policy_str = $data->register_policy;
-				$platform = $data->platform;
-
-				switch ($register_policy_str) {
-					case "REGISTER_CLOSED":
-						$register_policy = REGISTER_CLOSED;
-						break;
-					case "REGISTER_APPROVE":
-						$register_policy = REGISTER_APPROVE;
-						break;
-					case "REGISTER_OPEN":
-						$register_policy = REGISTER_OPEN;
-						break;
-				}
-			}
-		}
-	}
-
-	if ($possible_failure && !$failure) {
-		$failure = true;
-	}
-
-	if ($failure) {
-		$last_contact = $orig_last_contact;
-		$last_failure = datetime_convert();
-	} else {
-		$last_contact = datetime_convert();
-		$last_failure = $orig_last_failure;
-	}
-
-	if (($last_contact <= $last_failure) && !$failure) {
-		logger("Server ".$server_url." seems to be alive, but last contact wasn't set - could be a bug", LOGGER_DEBUG);
-	} elseif (($last_contact >= $last_failure) && $failure) {
-		logger("Server ".$server_url." seems to be dead, but last failure wasn't set - could be a bug", LOGGER_DEBUG);
-	}
-
-	// Check again if the server exists
-	$servers = q("SELECT `nurl` FROM `gserver` WHERE `nurl` = '%s'", dbesc(normalise_link($server_url)));
-
-	$version = strip_tags($version);
-	$site_name = strip_tags($site_name);
-	$info = strip_tags($info);
-	$platform = strip_tags($platform);
-
-	if ($servers) {
-		 q("UPDATE `gserver` SET `url` = '%s', `version` = '%s', `site_name` = '%s', `info` = '%s', `register_policy` = %d, `poco` = '%s', `noscrape` = '%s',
-			`network` = '%s', `platform` = '%s', `last_contact` = '%s', `last_failure` = '%s' WHERE `nurl` = '%s'",
-			dbesc($server_url),
-			dbesc($version),
-			dbesc($site_name),
-			dbesc($info),
-			intval($register_policy),
-			dbesc($poco),
-			dbesc($noscrape),
-			dbesc($network),
-			dbesc($platform),
-			dbesc($last_contact),
-			dbesc($last_failure),
-			dbesc(normalise_link($server_url))
-		);
-	} elseif (!$failure) {
-		q("INSERT INTO `gserver` (`url`, `nurl`, `version`, `site_name`, `info`, `register_policy`, `poco`, `noscrape`, `network`, `platform`, `created`, `last_contact`, `last_failure`)
-					VALUES ('%s', '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s')",
-				dbesc($server_url),
-				dbesc(normalise_link($server_url)),
-				dbesc($version),
-				dbesc($site_name),
-				dbesc($info),
-				intval($register_policy),
-				dbesc($poco),
-				dbesc($noscrape),
-				dbesc($network),
-				dbesc($platform),
-				dbesc(datetime_convert()),
-				dbesc($last_contact),
-				dbesc($last_failure),
-				dbesc(datetime_convert())
-		);
-	}
-	logger("End discovery for server " . $server_url, LOGGER_DEBUG);
-
-	return !$failure;
-}
-
-function count_common_friends($uid, $cid) {
-
-	$r = q("SELECT count(*) as `total`
-		FROM `glink` INNER JOIN `gcontact` on `glink`.`gcid` = `gcontact`.`id`
-		WHERE `glink`.`cid` = %d AND `glink`.`uid` = %d AND
-		((`gcontact`.`last_contact` >= `gcontact`.`last_failure`) OR (`gcontact`.`updated` >= `gcontact`.`last_failure`))
-		AND `gcontact`.`nurl` IN (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 and id != %d ) ",
-		intval($cid),
-		intval($uid),
-		intval($uid),
-		intval($cid)
-	);
-
-	// logger("count_common_friends: $uid $cid {$r[0]['total']}");
-	if (DBM::is_result($r)) {
-		return $r[0]['total'];
-	}
-	return 0;
-
-}
-
-
-function common_friends($uid, $cid, $start = 0, $limit = 9999, $shuffle = false) {
-
-	if ($shuffle) {
-		$sql_extra = " order by rand() ";
-	} else {
-		$sql_extra = " order by `gcontact`.`name` asc ";
-	}
-
-	$r = q("SELECT `gcontact`.*, `contact`.`id` AS `cid`
-		FROM `glink`
-		INNER JOIN `gcontact` ON `glink`.`gcid` = `gcontact`.`id`
-		INNER JOIN `contact` ON `gcontact`.`nurl` = `contact`.`nurl`
-		WHERE `glink`.`cid` = %d and `glink`.`uid` = %d
-			AND `contact`.`uid` = %d AND `contact`.`self` = 0 AND `contact`.`blocked` = 0
-			AND `contact`.`hidden` = 0 AND `contact`.`id` != %d
-			AND ((`gcontact`.`last_contact` >= `gcontact`.`last_failure`) OR (`gcontact`.`updated` >= `gcontact`.`last_failure`))
-			$sql_extra LIMIT %d, %d",
-		intval($cid),
-		intval($uid),
-		intval($uid),
-		intval($cid),
-		intval($start),
-		intval($limit)
-	);
-
-	/// @TODO Check all calling-findings of this function if they properly use DBM::is_result()
-	return $r;
-
-}
-
-
-function count_common_friends_zcid($uid, $zcid) {
-
-	$r = q("SELECT count(*) as `total`
-		FROM `glink` INNER JOIN `gcontact` on `glink`.`gcid` = `gcontact`.`id`
-		where `glink`.`zcid` = %d
-		and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 ) ",
-		intval($zcid),
-		intval($uid)
-	);
-
-	if (DBM::is_result($r)) {
-		return $r[0]['total'];
-	}
-	return 0;
-
-}
-
-function common_friends_zcid($uid, $zcid, $start = 0, $limit = 9999, $shuffle = false) {
-
-	if ($shuffle) {
-		$sql_extra = " order by rand() ";
-	} else {
-		$sql_extra = " order by `gcontact`.`name` asc ";
-	}
-
-	$r = q("SELECT `gcontact`.*
-		FROM `glink` INNER JOIN `gcontact` on `glink`.`gcid` = `gcontact`.`id`
-		where `glink`.`zcid` = %d
-		and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 )
-		$sql_extra limit %d, %d",
-		intval($zcid),
-		intval($uid),
-		intval($start),
-		intval($limit)
-	);
-
-	/// @TODO Check all calling-findings of this function if they properly use DBM::is_result()
-	return $r;
-
-}
-
-
-function count_all_friends($uid, $cid) {
-
-	$r = q("SELECT count(*) as `total`
-		FROM `glink` INNER JOIN `gcontact` on `glink`.`gcid` = `gcontact`.`id`
-		where `glink`.`cid` = %d and `glink`.`uid` = %d AND
-		((`gcontact`.`last_contact` >= `gcontact`.`last_failure`) OR (`gcontact`.`updated` >= `gcontact`.`last_failure`))",
-		intval($cid),
-		intval($uid)
-	);
-
-	if (DBM::is_result($r)) {
-		return $r[0]['total'];
-	}
-	return 0;
-
-}
-
-
-function all_friends($uid, $cid, $start = 0, $limit = 80) {
-
-	$r = q("SELECT `gcontact`.*, `contact`.`id` AS `cid`
-		FROM `glink`
-		INNER JOIN `gcontact` on `glink`.`gcid` = `gcontact`.`id`
-		LEFT JOIN `contact` ON `contact`.`nurl` = `gcontact`.`nurl` AND `contact`.`uid` = %d
-		WHERE `glink`.`cid` = %d AND `glink`.`uid` = %d AND
-		((`gcontact`.`last_contact` >= `gcontact`.`last_failure`) OR (`gcontact`.`updated` >= `gcontact`.`last_failure`))
-		ORDER BY `gcontact`.`name` ASC LIMIT %d, %d ",
-		intval($uid),
-		intval($cid),
-		intval($uid),
-		intval($start),
-		intval($limit)
-	);
-
-	/// @TODO Check all calling-findings of this function if they properly use DBM::is_result()
-	return $r;
-}
-
-
-
-function suggestion_query($uid, $start = 0, $limit = 80) {
-
-	if (!$uid) {
-		return array();
-	}
-
-	/*
-	 * Uncommented because the result of the queries are to big to store it in the cache.
-	 * We need to decide if we want to change the db column type or if we want to delete it.
-	 */
-	//$list = Cache::get("suggestion_query:".$uid.":".$start.":".$limit);
-	//if (!is_null($list)) {
-	//	return $list;
-	//}
-
-	$network = array(NETWORK_DFRN);
-
-	if (Config::get('system','diaspora_enabled')) {
-		$network[] = NETWORK_DIASPORA;
-	}
-
-	if (!Config::get('system','ostatus_disabled')) {
-		$network[] = NETWORK_OSTATUS;
-	}
-
-	$sql_network = implode("', '", $network);
-	$sql_network = "'".$sql_network."'";
-
-	/// @todo This query is really slow
-	// By now we cache the data for five minutes
-	$r = q("SELECT count(glink.gcid) as `total`, gcontact.* from gcontact
-		INNER JOIN `glink` ON `glink`.`gcid` = `gcontact`.`id`
-		where uid = %d and not gcontact.nurl in ( select nurl from contact where uid = %d )
-		AND NOT `gcontact`.`name` IN (SELECT `name` FROM `contact` WHERE `uid` = %d)
-		AND NOT `gcontact`.`id` IN (SELECT `gcid` FROM `gcign` WHERE `uid` = %d)
-		AND `gcontact`.`updated` >= '%s'
-		AND `gcontact`.`last_contact` >= `gcontact`.`last_failure`
-		AND `gcontact`.`network` IN (%s)
-		GROUP BY `glink`.`gcid` ORDER BY `gcontact`.`updated` DESC,`total` DESC LIMIT %d, %d",
-		intval($uid),
-		intval($uid),
-		intval($uid),
-		intval($uid),
-		dbesc(NULL_DATE),
-		$sql_network,
-		intval($start),
-		intval($limit)
-	);
-
-	if (DBM::is_result($r) && count($r) >= ($limit -1)) {
-		/*
-		 * Uncommented because the result of the queries are to big to store it in the cache.
-		 * We need to decide if we want to change the db column type or if we want to delete it.
-		 */
-		//Cache::set("suggestion_query:".$uid.":".$start.":".$limit, $r, CACHE_FIVE_MINUTES);
-
-		return $r;
-	}
-
-	$r2 = q("SELECT gcontact.* FROM gcontact
-		INNER JOIN `glink` ON `glink`.`gcid` = `gcontact`.`id`
-		WHERE `glink`.`uid` = 0 AND `glink`.`cid` = 0 AND `glink`.`zcid` = 0 AND NOT `gcontact`.`nurl` IN (SELECT `nurl` FROM `contact` WHERE `uid` = %d)
-		AND NOT `gcontact`.`name` IN (SELECT `name` FROM `contact` WHERE `uid` = %d)
-		AND NOT `gcontact`.`id` IN (SELECT `gcid` FROM `gcign` WHERE `uid` = %d)
-		AND `gcontact`.`updated` >= '%s'
-		AND `gcontact`.`last_contact` >= `gcontact`.`last_failure`
-		AND `gcontact`.`network` IN (%s)
-		ORDER BY rand() LIMIT %d, %d",
-		intval($uid),
-		intval($uid),
-		intval($uid),
-		dbesc(NULL_DATE),
-		$sql_network,
-		intval($start),
-		intval($limit)
-	);
-
-	$list = array();
-	foreach ($r2 as $suggestion) {
-		$list[$suggestion["nurl"]] = $suggestion;
-	}
-
-	foreach ($r as $suggestion) {
-		$list[$suggestion["nurl"]] = $suggestion;
-	}
-
-	while (sizeof($list) > ($limit)) {
-		array_pop($list);
-	}
-
-	/*
-	 * Uncommented because the result of the queries are to big to store it in the cache.
-	 * We need to decide if we want to change the db column type or if we want to delete it.
-	 */
-	//Cache::set("suggestion_query:".$uid.":".$start.":".$limit, $list, CACHE_FIVE_MINUTES);
-	return $list;
-}
-
-function update_suggestions() {
-
-	$a = get_app();
-
-	$done = array();
-
-	/// @TODO Check if it is really neccessary to poll the own server
-	poco_load(0, 0, 0, System::baseUrl() . '/poco');
-
-	$done[] = System::baseUrl() . '/poco';
-
-	if (strlen(Config::get('system','directory'))) {
-		$x = fetch_url(get_server()."/pubsites");
-		if ($x) {
-			$j = json_decode($x);
-			if ($j->entries) {
-				foreach ($j->entries as $entry) {
-
-					poco_check_server($entry->url);
-
-					$url = $entry->url . '/poco';
-					if (! in_array($url,$done)) {
-						poco_load(0,0,0,$entry->url . '/poco');
-					}
-				}
-			}
-		}
-	}
-
-	// Query your contacts from Friendica and Redmatrix/Hubzilla for their contacts
-	$r = q("SELECT DISTINCT(`poco`) AS `poco` FROM `contact` WHERE `network` IN ('%s', '%s')",
-		dbesc(NETWORK_DFRN), dbesc(NETWORK_DIASPORA)
-	);
-
-	if (DBM::is_result($r)) {
-		foreach ($r as $rr) {
-			$base = substr($rr['poco'],0,strrpos($rr['poco'],'/'));
-			if (! in_array($base,$done)) {
-				poco_load(0,0,0,$base);
-			}
-		}
-	}
-}
-
-/**
- * @brief Fetch server list from remote servers and adds them when they are new.
- *
- * @param string $poco URL to the POCO endpoint
- */
-function poco_fetch_serverlist($poco) {
-	$serverret = z_fetch_url($poco."/@server");
-	if (!$serverret["success"]) {
-		return;
-	}
-	$serverlist = json_decode($serverret['body']);
-
-	if (!is_array($serverlist)) {
-		return;
-	}
-
-	foreach ($serverlist as $server) {
-		$server_url = str_replace("/index.php", "", $server->url);
-
-		$r = q("SELECT `nurl` FROM `gserver` WHERE `nurl` = '%s'", dbesc(normalise_link($server_url)));
-		if (!DBM::is_result($r)) {
-			logger("Call server check for server ".$server_url, LOGGER_DEBUG);
-			Worker::add(PRIORITY_LOW, "discover_poco", "server", $server_url);
-		}
-	}
-}
-
-function poco_discover_federation() {
-	$last = Config::get('poco','last_federation_discovery');
-
-	if ($last) {
-		$next = $last + (24 * 60 * 60);
-		if ($next > time()) {
-			return;
-		}
-	}
-
-	// Discover Friendica, Hubzilla and Diaspora servers
-	$serverdata = fetch_url("http://the-federation.info/pods.json");
-
-	if ($serverdata) {
-		$servers = json_decode($serverdata);
-
-		foreach ($servers->pods as $server) {
-			Worker::add(PRIORITY_LOW, "discover_poco", "server", "https://".$server->host);
-		}
-	}
-
-	// Disvover Mastodon servers
-	if (!Config::get('system','ostatus_disabled')) {
-		$serverdata = fetch_url("https://instances.mastodon.xyz/instances.json");
-
-		if ($serverdata) {
-			$servers = json_decode($serverdata);
-
-			foreach ($servers as $server) {
-				$url = (is_null($server->https_score) ? 'http' : 'https').'://'.$server->name;
-				Worker::add(PRIORITY_LOW, "discover_poco", "server", $url);
-			}
-		}
-	}
-
-	// Currently disabled, since the service isn't available anymore.
-	// It is not removed since I hope that there will be a successor.
-	// Discover GNU Social Servers.
-	//if (!Config::get('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);
-	//	}
-	//}
-
-	Config::set('poco','last_federation_discovery', time());
-}
-
-function poco_discover_single_server($id) {
-	$r = q("SELECT `poco`, `nurl`, `url`, `network` FROM `gserver` WHERE `id` = %d", intval($id));
-	if (!DBM::is_result($r)) {
-		return false;
-	}
-
-	$server = $r[0];
-
-	// Discover new servers out there (Works from Friendica version 3.5.2)
-	poco_fetch_serverlist($server["poco"]);
-
-	// Fetch all users from the other server
-	$url = $server["poco"]."/?fields=displayName,urls,photos,updated,network,aboutMe,currentLocation,tags,gender,contactType,generation";
-
-	logger("Fetch all users from the server ".$server["url"], LOGGER_DEBUG);
-
-	$retdata = z_fetch_url($url);
-	if ($retdata["success"]) {
-		$data = json_decode($retdata["body"]);
-
-		poco_discover_server($data, 2);
-
-		if (Config::get('system','poco_discovery') > 1) {
-
-			$timeframe = Config::get('system','poco_discovery_since');
-			if ($timeframe == 0) {
-				$timeframe = 30;
-			}
-
-			$updatedSince = date("Y-m-d H:i:s", time() - $timeframe * 86400);
-
-			// Fetch all global contacts from the other server (Not working with Redmatrix and Friendica versions before 3.3)
-			$url = $server["poco"]."/@global?updatedSince=".$updatedSince."&fields=displayName,urls,photos,updated,network,aboutMe,currentLocation,tags,gender,contactType,generation";
-
-			$success = false;
-
-			$retdata = z_fetch_url($url);
-			if ($retdata["success"]) {
-				logger("Fetch all global contacts from the server ".$server["nurl"], LOGGER_DEBUG);
-				$success = poco_discover_server(json_decode($retdata["body"]));
-			}
-
-			if (!$success && (Config::get('system','poco_discovery') > 2)) {
-				logger("Fetch contacts from users of the server ".$server["nurl"], LOGGER_DEBUG);
-				poco_discover_server_users($data, $server);
-			}
-		}
-
-		q("UPDATE `gserver` SET `last_poco_query` = '%s' WHERE `nurl` = '%s'", dbesc(datetime_convert()), dbesc($server["nurl"]));
-
-		return true;
-	} else {
-		// If the server hadn't replied correctly, then force a sanity check
-		poco_check_server($server["url"], $server["network"], true);
-
-		// If we couldn't reach the server, we will try it some time later
-		q("UPDATE `gserver` SET `last_poco_query` = '%s' WHERE `nurl` = '%s'", dbesc(datetime_convert()), dbesc($server["nurl"]));
-
-		return false;
-	}
-}
-
-function poco_discover($complete = false) {
-
-	// Update the server list
-	poco_discover_federation();
-
-	$no_of_queries = 5;
-
-	$requery_days = intval(Config::get("system", "poco_requery_days"));
-
-	if ($requery_days == 0) {
-		$requery_days = 7;
-	}
-	$last_update = date("c", time() - (60 * 60 * 24 * $requery_days));
-
-	$r = q("SELECT `id`, `url`, `network` FROM `gserver` WHERE `last_contact` >= `last_failure` AND `poco` != '' AND `last_poco_query` < '%s' ORDER BY RAND()", dbesc($last_update));
-	if (DBM::is_result($r)) {
-		foreach ($r as $server) {
-
-			if (!poco_check_server($server["url"], $server["network"])) {
-				// The server is not reachable? Okay, then we will try it later
-				q("UPDATE `gserver` SET `last_poco_query` = '%s' WHERE `nurl` = '%s'", dbesc(datetime_convert()), dbesc($server["nurl"]));
-				continue;
-			}
-
-			logger('Update directory from server '.$server['url'].' with ID '.$server['id'], LOGGER_DEBUG);
-			Worker::add(PRIORITY_LOW, "discover_poco", "update_server_directory", (int)$server['id']);
-
-			if (!$complete && (--$no_of_queries == 0)) {
-				break;
-			}
-		}
-	}
-}
-
-function poco_discover_server_users($data, $server) {
-
-	if (!isset($data->entry)) {
-		return;
-	}
-
-	foreach ($data->entry as $entry) {
-		$username = "";
-		if (isset($entry->urls)) {
-			foreach ($entry->urls as $url) {
-				if ($url->type == 'profile') {
-					$profile_url = $url->value;
-					$urlparts = parse_url($profile_url);
-					$username = end(explode("/", $urlparts["path"]));
-				}
-			}
-		}
-		if ($username != "") {
-			logger("Fetch contacts for the user ".$username." from the server ".$server["nurl"], LOGGER_DEBUG);
-
-			// Fetch all contacts from a given user from the other server
-			$url = $server["poco"]."/".$username."/?fields=displayName,urls,photos,updated,network,aboutMe,currentLocation,tags,gender,contactType,generation";
-
-			$retdata = z_fetch_url($url);
-			if ($retdata["success"]) {
-				poco_discover_server(json_decode($retdata["body"]), 3);
-			}
-		}
-	}
-}
-
-function poco_discover_server($data, $default_generation = 0) {
-
-	if (!isset($data->entry) || !count($data->entry)) {
-		return false;
-	}
-
-	$success = false;
-
-	foreach ($data->entry as $entry) {
-		$profile_url = '';
-		$profile_photo = '';
-		$connect_url = '';
-		$name = '';
-		$network = '';
-		$updated = NULL_DATE;
-		$location = '';
-		$about = '';
-		$keywords = '';
-		$gender = '';
-		$contact_type = -1;
-		$generation = $default_generation;
-
-		$name = $entry->displayName;
-
-		if (isset($entry->urls)) {
-			foreach ($entry->urls as $url) {
-				if ($url->type == 'profile') {
-					$profile_url = $url->value;
-					continue;
-				}
-				if ($url->type == 'webfinger') {
-					$connect_url = str_replace('acct:' , '', $url->value);
-					continue;
-				}
-			}
-		}
-
-		if (isset($entry->photos)) {
-			foreach ($entry->photos as $photo) {
-				if ($photo->type == 'profile') {
-					$profile_photo = $photo->value;
-					continue;
-				}
-			}
-		}
-
-		if (isset($entry->updated)) {
-			$updated = date("Y-m-d H:i:s", strtotime($entry->updated));
-		}
-
-		if (isset($entry->network)) {
-			$network = $entry->network;
-		}
-
-		if (isset($entry->currentLocation)) {
-			$location = $entry->currentLocation;
-		}
-
-		if (isset($entry->aboutMe)) {
-			$about = html2bbcode($entry->aboutMe);
-		}
-
-		if (isset($entry->gender)) {
-			$gender = $entry->gender;
-		}
-
-		if(isset($entry->generation) && ($entry->generation > 0)) {
-			$generation = ++$entry->generation;
-		}
-
-		if(isset($entry->contactType) && ($entry->contactType >= 0)) {
-			$contact_type = $entry->contactType;
-		}
-
-		if (isset($entry->tags)) {
-			foreach ($entry->tags as $tag) {
-				$keywords = implode(", ", $tag);
-			}
-		}
-
-		if ($generation > 0) {
-			$success = true;
-
-			logger("Store profile ".$profile_url, LOGGER_DEBUG);
-
-			$gcontact = array("url" => $profile_url,
-					"name" => $name,
-					"network" => $network,
-					"photo" => $profile_photo,
-					"about" => $about,
-					"location" => $location,
-					"gender" => $gender,
-					"keywords" => $keywords,
-					"connect" => $connect_url,
-					"updated" => $updated,
-					"contact-type" => $contact_type,
-					"generation" => $generation);
-
-			try {
-				$gcontact = sanitize_gcontact($gcontact);
-				update_gcontact($gcontact);
-			} catch (Exception $e) {
-				logger($e->getMessage(), LOGGER_DEBUG);
-			}
-
-			logger("Done for profile ".$profile_url, LOGGER_DEBUG);
-		}
-	}
-	return $success;
-}
-
-/**
- * @brief Removes unwanted parts from a contact url
- *
- * @param string $url Contact url
- * @return string Contact url with the wanted parts
- */
-function clean_contact_url($url) {
-	$parts = parse_url($url);
-
-	if (!isset($parts["scheme"]) || !isset($parts["host"])) {
-		return $url;
-	}
-
-	$new_url = $parts["scheme"]."://".$parts["host"];
-
-	if (isset($parts["port"])) {
-		$new_url .= ":".$parts["port"];
-	}
-
-	if (isset($parts["path"])) {
-		$new_url .= $parts["path"];
-	}
-
-	if ($new_url != $url) {
-		logger("Cleaned contact url ".$url." to ".$new_url." - Called by: ".System::callstack(), LOGGER_DEBUG);
-	}
-
-	return $new_url;
-}
-
-/**
- * @brief Replace alternate OStatus user format with the primary one
- *
- * @param arr $contact contact array (called by reference)
- */
-function fix_alternate_contact_address(&$contact) {
-	if (($contact["network"] == NETWORK_OSTATUS) && poco_alternate_ostatus_url($contact["url"])) {
-		$data = Probe::uri($contact["url"]);
-		if ($contact["network"] == NETWORK_OSTATUS) {
-			logger("Fix primary url from ".$contact["url"]." to ".$data["url"]." - Called by: ".System::callstack(), LOGGER_DEBUG);
-			$contact["url"] = $data["url"];
-			$contact["addr"] = $data["addr"];
-			$contact["alias"] = $data["alias"];
-			$contact["server_url"] = $data["baseurl"];
-		}
-	}
-}
-
-/**
- * @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;
-	$doprobing = false;
-
-	if (in_array($contact["network"], array(NETWORK_PHANTOM))) {
-		logger("Invalid network for contact url ".$contact["url"]." - Called by: ".System::callstack(), LOGGER_DEBUG);
-		return false;
-	}
-
-	if ($contact["network"] == NETWORK_STATUSNET) {
-		$contact["network"] = NETWORK_OSTATUS;
-	}
-
-	// All new contacts are hidden by default
-	if (!isset($contact["hide"])) {
-		$contact["hide"] = true;
-	}
-
-	// Replace alternate OStatus user format with the primary one
-	fix_alternate_contact_address($contact);
-
-	// Remove unwanted parts from the contact url (e.g. "?zrl=...")
-	if (in_array($contact["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) {
-		$contact["url"] = clean_contact_url($contact["url"]);
-	}
-
-	dba::lock('gcontact');
-	$r = q("SELECT `id`, `last_contact`, `last_failure`, `network` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1",
-		dbesc(normalise_link($contact["url"])));
-
-	if (DBM::is_result($r)) {
-		$gcontact_id = $r[0]["id"];
-
-		// Update every 90 days
-		if (in_array($r[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""))) {
-			$last_failure_str = $r[0]["last_failure"];
-			$last_failure = strtotime($r[0]["last_failure"]);
-			$last_contact_str = $r[0]["last_contact"];
-			$last_contact = strtotime($r[0]["last_contact"]);
-			$doprobing = (((time() - $last_contact) > (90 * 86400)) && ((time() - $last_failure) > (90 * 86400)));
-		}
-	} else {
-		q("INSERT INTO `gcontact` (`name`, `nick`, `addr` , `network`, `url`, `nurl`, `photo`, `created`, `updated`, `location`, `about`, `hide`, `generation`)
-			VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %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($contact["location"]),
-			dbesc($contact["about"]),
-			intval($contact["hide"]),
-			intval($contact["generation"])
-		);
-
-		$r = q("SELECT `id`, `network` FROM `gcontact` WHERE `nurl` = '%s' ORDER BY `id` LIMIT 2",
-			dbesc(normalise_link($contact["url"])));
-
-		if (DBM::is_result($r)) {
-			$gcontact_id = $r[0]["id"];
-
-			$doprobing = in_array($r[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""));
-		}
-	}
-	dba::unlock();
-
-	if ($doprobing) {
-		logger("Last Contact: ". $last_contact_str." - Last Failure: ".$last_failure_str." - Checking: ".$contact["url"], LOGGER_DEBUG);
-		Worker::add(PRIORITY_LOW, 'gprobe', $contact["url"]);
-	}
-
-	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) {
-
-	// Check for invalid "contact-type" value
-	if (isset($contact['contact-type']) && (intval($contact['contact-type']) < 0)) {
-		$contact['contact-type'] = 0;
-	}
-
-	/// @todo update contact table as well
-
-	$gcontact_id = get_gcontact_id($contact);
-
-	if (!$gcontact_id) {
-		return false;
-	}
-
-	$r = q("SELECT `name`, `nick`, `photo`, `location`, `about`, `addr`, `generation`, `birthday`, `gender`, `keywords`,
-			`contact-type`, `hide`, `nsfw`, `network`, `alias`, `notify`, `server_url`, `connect`, `updated`, `url`
-		FROM `gcontact` WHERE `id` = %d LIMIT 1",
-		intval($gcontact_id));
-
-	// Get all field names
-	$fields = array();
-	foreach ($r[0] as $field => $data) {
-		$fields[$field] = $data;
-	}
-
-	unset($fields["url"]);
-	unset($fields["updated"]);
-	unset($fields["hide"]);
-
-	// Bugfix: We had an error in the storing of keywords which lead to the "0"
-	// This value is still transmitted via poco.
-	if ($contact["keywords"] == "0") {
-		unset($contact["keywords"]);
-	}
-
-	if ($r[0]["keywords"] == "0") {
-		$r[0]["keywords"] = "";
-	}
-
-	// assign all unassigned fields from the database entry
-	foreach ($fields as $field => $data) {
-		if (!isset($contact[$field]) || ($contact[$field] == "")) {
-			$contact[$field] = $r[0][$field];
-		}
-	}
-
-	if (!isset($contact["hide"])) {
-		$contact["hide"] = $r[0]["hide"];
-	}
-
-	$fields["hide"] = $r[0]["hide"];
-
-	if ($contact["network"] == NETWORK_STATUSNET) {
-		$contact["network"] = NETWORK_OSTATUS;
-	}
-
-	// Replace alternate OStatus user format with the primary one
-	fix_alternate_contact_address($contact);
-
-	if (!isset($contact["updated"])) {
-		$contact["updated"] = DBM::date();
-	}
-
-	if ($contact["network"] == NETWORK_TWITTER) {
-		$contact["server_url"] = 'http://twitter.com';
-	}
-
-	if ($contact["server_url"] == "") {
-		$data = Probe::uri($contact["url"]);
-		if ($data["network"] != NETWORK_PHANTOM) {
-			$contact["server_url"] = $data['baseurl'];
-		}
-	} else {
-		$contact["server_url"] = normalise_link($contact["server_url"]);
-	}
-
-	if (($contact["addr"] == "") && ($contact["server_url"] != "") && ($contact["nick"] != "")) {
-		$hostname = str_replace("http://", "", $contact["server_url"]);
-		$contact["addr"] = $contact["nick"]."@".$hostname;
-	}
-
-	// Check if any field changed
-	$update = false;
-	unset($fields["generation"]);
-
-	if ((($contact["generation"] > 0) && ($contact["generation"] <= $r[0]["generation"])) || ($r[0]["generation"] == 0)) {
-		foreach ($fields as $field => $data) {
-			if ($contact[$field] != $r[0][$field]) {
-				logger("Difference for contact ".$contact["url"]." in field '".$field."'. New value: '".$contact[$field]."', old value '".$r[0][$field]."'", LOGGER_DEBUG);
-				$update = true;
-			}
-		}
-
-		if ($contact["generation"] < $r[0]["generation"]) {
-			logger("Difference for contact ".$contact["url"]." in field 'generation'. new value: '".$contact["generation"]."', old value '".$r[0]["generation"]."'", LOGGER_DEBUG);
-			$update = true;
-		}
-	}
-
-	if ($update) {
-		logger("Update gcontact for ".$contact["url"], LOGGER_DEBUG);
-		$condition = array('`nurl` = ? AND (`generation` = 0 OR `generation` >= ?)',
-				normalise_link($contact["url"]), $contact["generation"]);
-		$contact["updated"] = DBM::date($contact["updated"]);
-
-		$updated = array('photo' => $contact['photo'], 'name' => $contact['name'],
-				'nick' => $contact['nick'], 'addr' => $contact['addr'],
-				'network' => $contact['network'], 'birthday' => $contact['birthday'],
-				'gender' => $contact['gender'], 'keywords' => $contact['keywords'],
-				'hide' => $contact['hide'], 'nsfw' => $contact['nsfw'],
-				'contact-type' => $contact['contact-type'], 'alias' => $contact['alias'],
-				'notify' => $contact['notify'], 'url' => $contact['url'],
-				'location' => $contact['location'], 'about' => $contact['about'],
-				'generation' => $contact['generation'], 'updated' => $contact['updated'],
-				'server_url' => $contact['server_url'], 'connect' => $contact['connect']);
-
-		dba::update('gcontact', $updated, $condition, $fields);
-
-		// Now update the contact entry with the user id "0" as well.
-		// This is used for the shadow copies of public items.
-		$r = q("SELECT `id` FROM `contact` WHERE `nurl` = '%s' AND `uid` = 0 ORDER BY `id` LIMIT 1",
-			dbesc(normalise_link($contact["url"])));
-
-		if (DBM::is_result($r)) {
-			logger("Update public contact ".$r[0]["id"], LOGGER_DEBUG);
-
-			update_contact_avatar($contact["photo"], 0, $r[0]["id"]);
-
-			$fields = array('name', 'nick', 'addr',
-					'network', 'bd', 'gender',
-					'keywords', 'alias', 'contact-type',
-					'url', 'location', 'about');
-			$old_contact = dba::select('contact', $fields, array('id' => $r[0]["id"]), array('limit' => 1));
-
-			// Update it with the current values
-			$fields = array('name' => $contact['name'], 'nick' => $contact['nick'],
-					'addr' => $contact['addr'], 'network' => $contact['network'],
-					'bd' => $contact['birthday'], 'gender' => $contact['gender'],
-					'keywords' => $contact['keywords'], 'alias' => $contact['alias'],
-					'contact-type' => $contact['contact-type'], 'url' => $contact['url'],
-					'location' => $contact['location'], 'about' => $contact['about']);
-
-			dba::update('contact', $fields, array('id' => $r[0]["id"]), $old_contact);
-		}
-	}
-
-	return $gcontact_id;
-}
-
-/**
- * @brief Updates the gcontact entry from probe
- *
- * @param str $url profile link
- */
-function update_gcontact_from_probe($url) {
-	$data = Probe::uri($url);
-
-	if (in_array($data["network"], array(NETWORK_PHANTOM))) {
-		logger("Invalid network for contact url ".$data["url"]." - Called by: ".System::callstack(), LOGGER_DEBUG);
-		return;
-	}
-
-	$data["server_url"] = $data["baseurl"];
-
-	update_gcontact($data);
-}
-
-/**
- * @brief Update the gcontact entry for a given user id
- *
- * @param int $uid User ID
- */
-function update_gcontact_for_user($uid) {
-	$r = q("SELECT `profile`.`locality`, `profile`.`region`, `profile`.`country-name`,
-			`profile`.`name`, `profile`.`about`, `profile`.`gender`,
-			`profile`.`pub_keywords`, `profile`.`dob`, `profile`.`photo`,
-			`profile`.`net-publish`, `user`.`nickname`, `user`.`hidewall`,
-			`contact`.`notify`, `contact`.`url`, `contact`.`addr`
-		FROM `profile`
-			INNER JOIN `user` ON `user`.`uid` = `profile`.`uid`
-			INNER JOIN `contact` ON `contact`.`uid` = `profile`.`uid`
-		WHERE `profile`.`uid` = %d AND `profile`.`is-default` AND `contact`.`self`",
-		intval($uid));
-
-	$location = formatted_location(array("locality" => $r[0]["locality"], "region" => $r[0]["region"],
-						"country-name" => $r[0]["country-name"]));
-
-	// The "addr" field was added in 3.4.3 so it can be empty for older users
-	if ($r[0]["addr"] != "") {
-		$addr = $r[0]["nickname"].'@'.str_replace(array("http://", "https://"), "", System::baseUrl());
-	} else {
-		$addr = $r[0]["addr"];
-	}
-
-	$gcontact = array("name" => $r[0]["name"], "location" => $location, "about" => $r[0]["about"],
-			"gender" => $r[0]["gender"], "keywords" => $r[0]["pub_keywords"],
-			"birthday" => $r[0]["dob"], "photo" => $r[0]["photo"],
-			"notify" => $r[0]["notify"], "url" => $r[0]["url"],
-			"hide" => ($r[0]["hidewall"] || !$r[0]["net-publish"]),
-			"nick" => $r[0]["nickname"], "addr" => $addr,
-			"connect" => $addr, "server_url" => System::baseUrl(),
-			"generation" => 1, "network" => NETWORK_DFRN);
-
-	update_gcontact($gcontact);
-}
-
-/**
- * @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);
-
-	$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 {
-		/// @TODO is_object() above means here no object, still $statistics is being used as object
-		if ($statistics->instance_with_ssl) {
-			$server = "https://";
-		} else {
-			$server = "http://";
-		}
-
-		$server .= $statistics->instance_address;
-
-		$hostname = $statistics->instance_address;
-	}
-
-	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" => System::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(Config::get("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 (!DBM::is_result($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"]));
-	}
-}
-
-/**
- * @brief Returns a list of all known servers
- * @return array List of server urls
- */
-function poco_serverlist() {
-	$r = q("SELECT `url`, `site_name` AS `displayName`, `network`, `platform`, `version` FROM `gserver`
-		WHERE `network` IN ('%s', '%s', '%s') AND `last_contact` > `last_failure`
-		ORDER BY `last_contact`
-		LIMIT 1000",
-		dbesc(NETWORK_DFRN), dbesc(NETWORK_DIASPORA), dbesc(NETWORK_OSTATUS));
-	if (!DBM::is_result($r)) {
-		return false;
-	}
-
-	return $r;
-}
diff --git a/mod/allfriends.php b/mod/allfriends.php
index ce9e68f01..360c7d3c9 100644
--- a/mod/allfriends.php
+++ b/mod/allfriends.php
@@ -1,13 +1,16 @@
 page['aside'] = "";
 	profile_load($a, "", 0, get_contact_details_by_url($c[0]["url"]));
 
-	$total = count_all_friends(local_user(), $cid);
+	$total = GlobalContact::countAllFriends(local_user(), $cid);
 
 	if(count($total))
 		$a->set_pager_total($total);
 
-	$r = all_friends(local_user(), $cid, $a->pager['start'], $a->pager['itemspage']);
+	$r = GlobalContact::allFriends(local_user(), $cid, $a->pager['start'], $a->pager['itemspage']);
 
 	if (! DBM::is_result($r)) {
 		$o .= t('No friends to display.');
diff --git a/mod/common.php b/mod/common.php
index 12f1ba273..ab5343093 100644
--- a/mod/common.php
+++ b/mod/common.php
@@ -1,12 +1,14 @@
 set_pager_total($t);
 	} else {
-		notice( t('No contacts in common.') . EOL);
+		notice(t('No contacts in common.') . EOL);
 		return $o;
 	}
 
 
 	if ($cid) {
-		$r = common_friends($uid, $cid, $a->pager['start'], $a->pager['itemspage']);
+		$r = GlobalContact::commonFriends($uid, $cid, $a->pager['start'], $a->pager['itemspage']);
 	} else {
-		$r = common_friends_zcid($uid, $zcid, $a->pager['start'], $a->pager['itemspage']);
+		$r = GlobalContact::commonFriendsZcid($uid, $zcid, $a->pager['start'], $a->pager['itemspage']);
 	}
 
 
diff --git a/mod/contacts.php b/mod/contacts.php
index a2bb9fc0f..8da40152e 100644
--- a/mod/contacts.php
+++ b/mod/contacts.php
@@ -4,6 +4,7 @@ use Friendica\App;
 use Friendica\Core\System;
 use Friendica\Core\Worker;
 use Friendica\Database\DBM;
+use Friendica\Model\GlobalContact;
 use Friendica\Network\Probe;
 
 require_once 'include/Contact.php';
@@ -312,7 +313,7 @@ function _contact_update_profile($contact_id) {
 	update_contact_avatar($data['photo'], local_user(), $contact_id, true);
 
 	// Update the entry in the gcontact table
-	update_gcontact_from_probe($data["url"]);
+	GlobalContact::updateFromProbe($data["url"]);
 }
 
 function _contact_block($contact_id, $orig_record) {
@@ -561,12 +562,12 @@ function contacts_content(App $a) {
 
 		$nettype = sprintf( t('Network type: %s'),network_to_name($contact['network'], $contact["url"]));
 
-		//$common = count_common_friends(local_user(),$contact['id']);
+		//$common = GlobalContact::countCommonFriends(local_user(),$contact['id']);
 		//$common_text = (($common) ? sprintf( tt('%d contact in common','%d contacts in common', $common),$common) : '');
 
 		$polling = (($contact['network'] === NETWORK_MAIL | $contact['network'] === NETWORK_FEED) ? 'polling' : '');
 
-		//$x = count_all_friends(local_user(), $contact['id']);
+		//$x = GlobalContact::countAllFriends(local_user(), $contact['id']);
 		//$all_friends = (($x) ? t('View all contacts') : '');
 
 		// tabs
@@ -878,7 +879,7 @@ function contacts_tab($a, $contact_id, $active_tab) {
 	);
 
 	// Show this tab only if there is visible friend list
-	$x = count_all_friends(local_user(), $contact_id);
+	$x = GlobalContact::countAllFriends(local_user(), $contact_id);
 	if ($x)
 		$tabs[] = array('label'=>t('Contacts'),
 				'url' => "allfriends/".$contact_id,
@@ -888,7 +889,7 @@ function contacts_tab($a, $contact_id, $active_tab) {
 				'accesskey' => 't');
 
 	// Show this tab only if there is visible common friend list
-	$common = count_common_friends(local_user(),$contact_id);
+	$common = GlobalContact::countCommonFriends(local_user(), $contact_id);
 	if ($common)
 		$tabs[] = array('label'=>t('Common Friends'),
 				'url' => "common/loc/".local_user()."/".$contact_id,
diff --git a/mod/dirfind.php b/mod/dirfind.php
index 5d65813e3..e4e611699 100644
--- a/mod/dirfind.php
+++ b/mod/dirfind.php
@@ -4,6 +4,7 @@ use Friendica\App;
 use Friendica\Core\Config;
 use Friendica\Core\System;
 use Friendica\Core\Worker;
+use Friendica\Model\GlobalContact;
 use Friendica\Network\Probe;
 
 require_once 'include/contact_widgets.php';
@@ -79,7 +80,7 @@ function dirfind_content(App $a, $prefix = "") {
 
 			// Add the contact to the global contacts if it isn't already in our system
 			if (($contact["cid"] == 0) && ($contact["zid"] == 0) && ($contact["gid"] == 0)) {
-				update_gcontact($user_data);
+				GlobalContact::update($user_data);
 			}
 		} elseif ($local) {
 
diff --git a/mod/fsuggest.php b/mod/fsuggest.php
index 124abd464..c2d9455b0 100644
--- a/mod/fsuggest.php
+++ b/mod/fsuggest.php
@@ -74,38 +74,44 @@ function fsuggest_post(App $a) {
 
 
 
-function fsuggest_content(App $a) {
-
-	require_once('include/acl_selectors.php');
+function fsuggest_content(App $a)
+{
+	require_once 'include/acl_selectors.php';
 
 	if (! local_user()) {
-		notice( t('Permission denied.') . EOL);
+		notice(t('Permission denied.') . EOL);
 		return;
 	}
 
-	if($a->argc != 2)
+	if ($a->argc != 2) {
 		return;
+	}
 
 	$contact_id = intval($a->argv[1]);
 
-	$r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
+	$r = q(
+		"SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
 		intval($contact_id),
 		intval(local_user())
 	);
 	if (! DBM::is_result($r)) {
-		notice( t('Contact not found.') . EOL);
+		notice(t('Contact not found.') . EOL);
 		return;
 	}
 	$contact = $r[0];
 
 	$o = '

' . t('Suggest Friends') . '

'; - $o .= '
' . sprintf( t('Suggest a friend for %s'), $contact['name']) . '
'; + $o .= '
' . sprintf(t('Suggest a friend for %s'), $contact['name']) . '
'; $o .= '
'; - $o .= contact_selector('suggest','suggest-select', false, - array('size' => 4, 'exclude' => $contact_id, 'networks' => 'DFRN_ONLY', 'single' => true)); + $o .= contact_selector( + 'suggest', + 'suggest-select', + array('size' => 4, 'exclude' => $contact_id, 'networks' => 'DFRN_ONLY', 'single' => true), + false + ); $o .= '
'; diff --git a/mod/hovercard.php b/mod/hovercard.php index 064ccab1b..f21db31f8 100644 --- a/mod/hovercard.php +++ b/mod/hovercard.php @@ -10,9 +10,10 @@ use Friendica\App; use Friendica\Core\Config; +use Friendica\Model\GlobalContact; -require_once("include/socgraph.php"); -require_once("include/Contact.php"); +require_once "include/socgraph.php"; +require_once "include/Contact.php"; function hovercard_init(App $a) { // Just for testing purposes @@ -48,7 +49,7 @@ function hovercard_content() { } // if it's the url containing https it should be converted to http - $nurl = normalise_link(clean_contact_url($profileurl)); + $nurl = normalise_link(GlobalContact::cleanContactUrl($profileurl)); if($nurl) { // Search for contact data $contact = get_contact_details_by_url($nurl); diff --git a/mod/item.php b/mod/item.php index 587bd90ce..9a725bae4 100644 --- a/mod/item.php +++ b/mod/item.php @@ -20,6 +20,7 @@ use Friendica\Core\Config; use Friendica\Core\System; use Friendica\Core\Worker; use Friendica\Database\DBM; +use Friendica\Model\GlobalContact; use Friendica\Network\Probe; use Friendica\Protocol\Diaspora; @@ -737,7 +738,7 @@ function item_post(App $a) { $datarray['postopts'] = $postopts; $datarray['origin'] = $origin; $datarray['moderated'] = $allow_moderated; - $datarray['gcontact-id'] = get_gcontact_id(array("url" => $datarray['author-link'], "network" => $datarray['network'], + $datarray['gcontact-id'] = GlobalContact::getId(array("url" => $datarray['author-link'], "network" => $datarray['network'], "photo" => $datarray['author-avatar'], "name" => $datarray['author-name'])); $datarray['object'] = $object; @@ -1239,7 +1240,7 @@ function handle_tag(App $a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $n if (!DBM::is_result($r)) { $probed = Probe::uri($name); if ($result['network'] != NETWORK_PHANTOM) { - update_gcontact($probed); + GlobalContact::update($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/profiles.php b/mod/profiles.php index fe26d8f56..f3e71491f 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -1,11 +1,14 @@ config['register_policy'] == REGISTER_VERIFY) { diff --git a/mod/suggest.php b/mod/suggest.php index 6bc9d0e56..8451173a5 100644 --- a/mod/suggest.php +++ b/mod/suggest.php @@ -1,11 +1,14 @@ page['aside'] .= follow_widget(); - $r = suggestion_query(local_user()); + $r = GlobalContact::suggestionQuery(local_user()); if (! DBM::is_result($r)) { $o .= t('No suggestions available. If this is a new site, please try again in 24 hours.'); diff --git a/src/Model/GlobalContact.php b/src/Model/GlobalContact.php new file mode 100644 index 000000000..dc62024bc --- /dev/null +++ b/src/Model/GlobalContact.php @@ -0,0 +1,1004 @@ + 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`.`addr` LIKE '%s' OR `gcontact`.`name` LIKE '%s' OR `gcontact`.`nick` LIKE '%s') $extra_sql + GROUP BY `gcontact`.`nurl` + ORDER BY `gcontact`.`nurl` DESC + LIMIT 1000", + 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)) + ); + + return $results; + } + } + + /** + * @brief Link the gcontact entry with user, contact and global contact + * + * @param integer $gcid Global contact ID + * @param integer $uid User ID + * @param integer $cid Contact ID + * @param integer $zcid Global Contact ID + */ + public static function link($gcid, $uid = 0, $cid = 0, $zcid = 0) + { + if ($gcid <= 0) { + return; + } + + $r = q( + "SELECT * FROM `glink` WHERE `cid` = %d AND `uid` = %d AND `gcid` = %d AND `zcid` = %d LIMIT 1", + intval($cid), + intval($uid), + intval($gcid), + intval($zcid) + ); + + if (!DBM::is_result($r)) { + q( + "INSERT INTO `glink` (`cid`, `uid`, `gcid`, `zcid`, `updated`) VALUES (%d, %d, %d, %d, '%s') ", + intval($cid), + intval($uid), + intval($gcid), + intval($zcid), + dbesc(datetime_convert()) + ); + } else { + q( + "UPDATE `glink` SET `updated` = '%s' WHERE `cid` = %d AND `uid` = %d AND `gcid` = %d AND `zcid` = %d", + dbesc(datetime_convert()), + intval($cid), + intval($uid), + intval($gcid), + intval($zcid) + ); + } + } + + /** + * @brief Sanitize the given gcontact data + * + * @param array $gcontact array with gcontact data + * @throw Exception + * + * Generation: + * 0: No definition + * 1: Profiles on this server + * 2: Contacts of profiles on this server + * 3: Contacts of contacts of profiles on this server + * 4: ... + */ + public static function sanitize($gcontact) + { + if ($gcontact['url'] == "") { + throw new Exception('URL is empty'); + } + + $urlparts = parse_url($gcontact['url']); + if (!isset($urlparts["scheme"])) { + throw new Exception("This (".$gcontact['url'].") doesn't seem to be an url."); + } + + if (in_array($urlparts["host"], array("www.facebook.com", "facebook.com", "twitter.com", "identi.ca", "alpha.app.net"))) { + throw new Exception('Contact from a non federated network ignored. ('.$gcontact['url'].')'); + } + + // Don't store the statusnet connector as network + // We can't simply set this to NETWORK_OSTATUS since the connector could have fetched posts from friendica as well + if ($gcontact['network'] == NETWORK_STATUSNET) { + $gcontact['network'] = ""; + } + + // Assure that there are no parameter fragments in the profile url + if (in_array($gcontact['network'], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""))) { + $gcontact['url'] = self::cleanContactUrl($gcontact['url']); + } + + $alternate = poco_alternate_ostatus_url($gcontact['url']); + + // The global contacts should contain the original picture, not the cached one + if (($gcontact['generation'] != 1) && stristr(normalise_link($gcontact['photo']), normalise_link(System::baseUrl()."/photo/"))) { + $gcontact['photo'] = ""; + } + + if (!isset($gcontact['network'])) { + $r = q( + "SELECT `network` FROM `contact` WHERE `uid` = 0 AND `nurl` = '%s' AND `network` != '' AND `network` != '%s' LIMIT 1", + dbesc(normalise_link($gcontact['url'])), + dbesc(NETWORK_STATUSNET) + ); + if (DBM::is_result($r)) { + $gcontact['network'] = $r[0]["network"]; + } + + if (($gcontact['network'] == "") || ($gcontact['network'] == NETWORK_OSTATUS)) { + $r = q( + "SELECT `network`, `url` FROM `contact` WHERE `uid` = 0 AND `alias` IN ('%s', '%s') AND `network` != '' AND `network` != '%s' LIMIT 1", + dbesc($gcontact['url']), + dbesc(normalise_link($gcontact['url'])), + dbesc(NETWORK_STATUSNET) + ); + if (DBM::is_result($r)) { + $gcontact['network'] = $r[0]["network"]; + } + } + } + + $gcontact['server_url'] = ''; + $gcontact['network'] = ''; + + $x = q( + "SELECT * FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", + dbesc(normalise_link($gcontact['url'])) + ); + + if (DBM::is_result($x)) { + if (!isset($gcontact['network']) && ($x[0]["network"] != NETWORK_STATUSNET)) { + $gcontact['network'] = $x[0]["network"]; + } + if ($gcontact['updated'] <= NULL_DATE) { + $gcontact['updated'] = $x[0]["updated"]; + } + if (!isset($gcontact['server_url']) && (normalise_link($x[0]["server_url"]) != normalise_link($x[0]["url"]))) { + $gcontact['server_url'] = $x[0]["server_url"]; + } + if (!isset($gcontact['addr'])) { + $gcontact['addr'] = $x[0]["addr"]; + } + } + + if ((!isset($gcontact['network']) || !isset($gcontact['name']) || !isset($gcontact['addr']) || !isset($gcontact['photo']) || !isset($gcontact['server_url']) || $alternate) + && poco_reachable($gcontact['url'], $gcontact['server_url'], $gcontact['network'], false) + ) { + $data = Probe::uri($gcontact['url']); + + if ($data["network"] == NETWORK_PHANTOM) { + throw new Exception('Probing for URL '.$gcontact['url'].' failed'); + } + + $orig_profile = $gcontact['url']; + + $gcontact["server_url"] = $data["baseurl"]; + + $gcontact = array_merge($gcontact, $data); + + if ($alternate && ($gcontact['network'] == NETWORK_OSTATUS)) { + // Delete the old entry - if it exists + $r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($orig_profile))); + if (DBM::is_result($r)) { + q("DELETE FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($orig_profile))); + q("DELETE FROM `glink` WHERE `gcid` = %d", intval($r[0]["id"])); + } + } + } + + if (!isset($gcontact['name']) || !isset($gcontact['photo'])) { + throw new Exception('No name and photo for URL '.$gcontact['url']); + } + + if (!in_array($gcontact['network'], array(NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_DIASPORA))) { + throw new Exception('No federated network ('.$gcontact['network'].') detected for URL '.$gcontact['url']); + } + + if (!isset($gcontact['server_url'])) { + // We check the server url to be sure that it is a real one + $server_url = poco_detect_server($gcontact['url']); + + // We are now sure that it is a correct URL. So we use it in the future + if ($server_url != "") { + $gcontact['server_url'] = $server_url; + } + } + + // The server URL doesn't seem to be valid, so we don't store it. + if (!poco_check_server($gcontact['server_url'], $gcontact['network'])) { + $gcontact['server_url'] = ""; + } + + return $gcontact; + } + + public static function countCommonFriends($uid, $cid) + { + $r = q( + "SELECT count(*) as `total` + FROM `glink` INNER JOIN `gcontact` on `glink`.`gcid` = `gcontact`.`id` + WHERE `glink`.`cid` = %d AND `glink`.`uid` = %d AND + ((`gcontact`.`last_contact` >= `gcontact`.`last_failure`) OR + (`gcontact`.`updated` >= `gcontact`.`last_failure`)) + AND `gcontact`.`nurl` IN (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 and id != %d ) ", + intval($cid), + intval($uid), + intval($uid), + intval($cid) + ); + + // logger("countCommonFriends: $uid $cid {$r[0]['total']}"); + if (DBM::is_result($r)) { + return $r[0]['total']; + } + return 0; + } + + public static function countCommonFriendsZcid($uid, $zcid) + { + $r = q( + "SELECT count(*) as `total` + FROM `glink` INNER JOIN `gcontact` on `glink`.`gcid` = `gcontact`.`id` + where `glink`.`zcid` = %d + and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 ) ", + intval($zcid), + intval($uid) + ); + + if (DBM::is_result($r)) { + return $r[0]['total']; + } + + return 0; + } + + public static function commonFriends($uid, $cid, $start = 0, $limit = 9999, $shuffle = false) + { + if ($shuffle) { + $sql_extra = " order by rand() "; + } else { + $sql_extra = " order by `gcontact`.`name` asc "; + } + + $r = q( + "SELECT `gcontact`.*, `contact`.`id` AS `cid` + FROM `glink` + INNER JOIN `gcontact` ON `glink`.`gcid` = `gcontact`.`id` + INNER JOIN `contact` ON `gcontact`.`nurl` = `contact`.`nurl` + WHERE `glink`.`cid` = %d and `glink`.`uid` = %d + AND `contact`.`uid` = %d AND `contact`.`self` = 0 AND `contact`.`blocked` = 0 + AND `contact`.`hidden` = 0 AND `contact`.`id` != %d + AND ((`gcontact`.`last_contact` >= `gcontact`.`last_failure`) OR (`gcontact`.`updated` >= `gcontact`.`last_failure`)) + $sql_extra LIMIT %d, %d", + intval($cid), + intval($uid), + intval($uid), + intval($cid), + intval($start), + intval($limit) + ); + + /// @TODO Check all calling-findings of this function if they properly use DBM::is_result() + return $r; + } + + function commonFriendsZcid($uid, $zcid, $start = 0, $limit = 9999, $shuffle = false) + { + if ($shuffle) { + $sql_extra = " order by rand() "; + } else { + $sql_extra = " order by `gcontact`.`name` asc "; + } + + $r = q( + "SELECT `gcontact`.* + FROM `glink` INNER JOIN `gcontact` on `glink`.`gcid` = `gcontact`.`id` + where `glink`.`zcid` = %d + and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 ) + $sql_extra limit %d, %d", + intval($zcid), + intval($uid), + intval($start), + intval($limit) + ); + + /// @TODO Check all calling-findings of this function if they properly use DBM::is_result() + return $r; + } + + public static function countAllFriends($uid, $cid) + { + $r = q( + "SELECT count(*) as `total` + FROM `glink` INNER JOIN `gcontact` on `glink`.`gcid` = `gcontact`.`id` + where `glink`.`cid` = %d and `glink`.`uid` = %d AND + ((`gcontact`.`last_contact` >= `gcontact`.`last_failure`) OR (`gcontact`.`updated` >= `gcontact`.`last_failure`))", + intval($cid), + intval($uid) + ); + + if (DBM::is_result($r)) { + return $r[0]['total']; + } + + return 0; + } + + + public static function allFriends($uid, $cid, $start = 0, $limit = 80) + { + $r = q( + "SELECT `gcontact`.*, `contact`.`id` AS `cid` + FROM `glink` + INNER JOIN `gcontact` on `glink`.`gcid` = `gcontact`.`id` + LEFT JOIN `contact` ON `contact`.`nurl` = `gcontact`.`nurl` AND `contact`.`uid` = %d + WHERE `glink`.`cid` = %d AND `glink`.`uid` = %d AND + ((`gcontact`.`last_contact` >= `gcontact`.`last_failure`) OR (`gcontact`.`updated` >= `gcontact`.`last_failure`)) + ORDER BY `gcontact`.`name` ASC LIMIT %d, %d ", + intval($uid), + intval($cid), + intval($uid), + intval($start), + intval($limit) + ); + + /// @TODO Check all calling-findings of this function if they properly use DBM::is_result() + return $r; + } + + public static function suggestionQuery($uid, $start = 0, $limit = 80) + { + if (!$uid) { + return array(); + } + + /* + * Uncommented because the result of the queries are to big to store it in the cache. + * We need to decide if we want to change the db column type or if we want to delete it. + */ + //$list = Cache::get("suggestion_query:".$uid.":".$start.":".$limit); + //if (!is_null($list)) { + // return $list; + //} + + $network = array(NETWORK_DFRN); + + if (Config::get('system', 'diaspora_enabled')) { + $network[] = NETWORK_DIASPORA; + } + + if (!Config::get('system', 'ostatus_disabled')) { + $network[] = NETWORK_OSTATUS; + } + + $sql_network = implode("', '", $network); + $sql_network = "'".$sql_network."'"; + + /// @todo This query is really slow + // By now we cache the data for five minutes + $r = q( + "SELECT count(glink.gcid) as `total`, gcontact.* from gcontact + INNER JOIN `glink` ON `glink`.`gcid` = `gcontact`.`id` + where uid = %d and not gcontact.nurl in ( select nurl from contact where uid = %d ) + AND NOT `gcontact`.`name` IN (SELECT `name` FROM `contact` WHERE `uid` = %d) + AND NOT `gcontact`.`id` IN (SELECT `gcid` FROM `gcign` WHERE `uid` = %d) + AND `gcontact`.`updated` >= '%s' + AND `gcontact`.`last_contact` >= `gcontact`.`last_failure` + AND `gcontact`.`network` IN (%s) + GROUP BY `glink`.`gcid` ORDER BY `gcontact`.`updated` DESC,`total` DESC LIMIT %d, %d", + intval($uid), + intval($uid), + intval($uid), + intval($uid), + dbesc(NULL_DATE), + $sql_network, + intval($start), + intval($limit) + ); + + if (DBM::is_result($r) && count($r) >= ($limit -1)) { + /* + * Uncommented because the result of the queries are to big to store it in the cache. + * We need to decide if we want to change the db column type or if we want to delete it. + */ + //Cache::set("suggestion_query:".$uid.":".$start.":".$limit, $r, CACHE_FIVE_MINUTES); + + return $r; + } + + $r2 = q( + "SELECT gcontact.* FROM gcontact + INNER JOIN `glink` ON `glink`.`gcid` = `gcontact`.`id` + WHERE `glink`.`uid` = 0 AND `glink`.`cid` = 0 AND `glink`.`zcid` = 0 AND NOT `gcontact`.`nurl` IN (SELECT `nurl` FROM `contact` WHERE `uid` = %d) + AND NOT `gcontact`.`name` IN (SELECT `name` FROM `contact` WHERE `uid` = %d) + AND NOT `gcontact`.`id` IN (SELECT `gcid` FROM `gcign` WHERE `uid` = %d) + AND `gcontact`.`updated` >= '%s' + AND `gcontact`.`last_contact` >= `gcontact`.`last_failure` + AND `gcontact`.`network` IN (%s) + ORDER BY rand() LIMIT %d, %d", + intval($uid), + intval($uid), + intval($uid), + dbesc(NULL_DATE), + $sql_network, + intval($start), + intval($limit) + ); + + $list = array(); + foreach ($r2 as $suggestion) { + $list[$suggestion["nurl"]] = $suggestion; + } + + foreach ($r as $suggestion) { + $list[$suggestion["nurl"]] = $suggestion; + } + + while (sizeof($list) > ($limit)) { + array_pop($list); + } + + /* + * Uncommented because the result of the queries are to big to store it in the cache. + * We need to decide if we want to change the db column type or if we want to delete it. + */ + //Cache::set("suggestion_query:".$uid.":".$start.":".$limit, $list, CACHE_FIVE_MINUTES); + return $list; + } + + public static function updateSuggestions() + { + $a = get_app(); + + $done = array(); + + /// @TODO Check if it is really neccessary to poll the own server + PortableContact::loadWorker(0, 0, 0, System::baseUrl() . '/poco'); + + $done[] = System::baseUrl() . '/poco'; + + if (strlen(Config::get('system', 'directory'))) { + $x = fetch_url(get_server()."/pubsites"); + if ($x) { + $j = json_decode($x); + if ($j->entries) { + foreach ($j->entries as $entry) { + poco_check_server($entry->url); + + $url = $entry->url . '/poco'; + if (! in_array($url, $done)) { + PortableContact::loadWorker(0, 0, 0, $entry->url . '/poco'); + } + } + } + } + } + + // Query your contacts from Friendica and Redmatrix/Hubzilla for their contacts + $r = q( + "SELECT DISTINCT(`poco`) AS `poco` FROM `contact` WHERE `network` IN ('%s', '%s')", + dbesc(NETWORK_DFRN), + dbesc(NETWORK_DIASPORA) + ); + + if (DBM::is_result($r)) { + foreach ($r as $rr) { + $base = substr($rr['poco'], 0, strrpos($rr['poco'], '/')); + if (! in_array($base, $done)) { + PortableContact::loadWorker(0, 0, 0, $base); + } + } + } + } + + /** + * @brief Removes unwanted parts from a contact url + * + * @param string $url Contact url + * + * @return string Contact url with the wanted parts + */ + public static function cleanContactUrl($url) + { + $parts = parse_url($url); + + if (!isset($parts["scheme"]) || !isset($parts["host"])) { + return $url; + } + + $new_url = $parts["scheme"]."://".$parts["host"]; + + if (isset($parts["port"])) { + $new_url .= ":".$parts["port"]; + } + + if (isset($parts["path"])) { + $new_url .= $parts["path"]; + } + + if ($new_url != $url) { + logger("Cleaned contact url ".$url." to ".$new_url." - Called by: ".System::callstack(), LOGGER_DEBUG); + } + + return $new_url; + } + + /** + * @brief Replace alternate OStatus user format with the primary one + * + * @param arr $contact contact array (called by reference) + */ + public static function fixAlternateContactAddress(&$contact) + { + if (($contact["network"] == NETWORK_OSTATUS) && poco_alternate_ostatus_url($contact["url"])) { + $data = Probe::uri($contact["url"]); + if ($contact["network"] == NETWORK_OSTATUS) { + logger("Fix primary url from ".$contact["url"]." to ".$data["url"]." - Called by: ".System::callstack(), LOGGER_DEBUG); + $contact["url"] = $data["url"]; + $contact["addr"] = $data["addr"]; + $contact["alias"] = $data["alias"]; + $contact["server_url"] = $data["baseurl"]; + } + } + } + + /** + * @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 + */ + public static function getId($contact) + { + $gcontact_id = 0; + $doprobing = false; + + if (in_array($contact["network"], array(NETWORK_PHANTOM))) { + logger("Invalid network for contact url ".$contact["url"]." - Called by: ".System::callstack(), LOGGER_DEBUG); + return false; + } + + if ($contact["network"] == NETWORK_STATUSNET) { + $contact["network"] = NETWORK_OSTATUS; + } + + // All new contacts are hidden by default + if (!isset($contact["hide"])) { + $contact["hide"] = true; + } + + // Replace alternate OStatus user format with the primary one + self::fixAlternateContactAddress($contact); + + // Remove unwanted parts from the contact url (e.g. "?zrl=...") + if (in_array($contact["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) { + $contact["url"] = self::cleanContactUrl($contact["url"]); + } + + dba::lock('gcontact'); + $r = q( + "SELECT `id`, `last_contact`, `last_failure`, `network` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", + dbesc(normalise_link($contact["url"])) + ); + + if (DBM::is_result($r)) { + $gcontact_id = $r[0]["id"]; + + // Update every 90 days + if (in_array($r[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""))) { + $last_failure_str = $r[0]["last_failure"]; + $last_failure = strtotime($r[0]["last_failure"]); + $last_contact_str = $r[0]["last_contact"]; + $last_contact = strtotime($r[0]["last_contact"]); + $doprobing = (((time() - $last_contact) > (90 * 86400)) && ((time() - $last_failure) > (90 * 86400))); + } + } else { + q( + "INSERT INTO `gcontact` (`name`, `nick`, `addr` , `network`, `url`, `nurl`, `photo`, `created`, `updated`, `location`, `about`, `hide`, `generation`) + VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %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($contact["location"]), + dbesc($contact["about"]), + intval($contact["hide"]), + intval($contact["generation"]) + ); + + $r = q( + "SELECT `id`, `network` FROM `gcontact` WHERE `nurl` = '%s' ORDER BY `id` LIMIT 2", + dbesc(normalise_link($contact["url"])) + ); + + if (DBM::is_result($r)) { + $gcontact_id = $r[0]["id"]; + + $doprobing = in_array($r[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, "")); + } + } + dba::unlock(); + + if ($doprobing) { + logger("Last Contact: ". $last_contact_str." - Last Failure: ".$last_failure_str." - Checking: ".$contact["url"], LOGGER_DEBUG); + Worker::add(PRIORITY_LOW, 'gprobe', $contact["url"]); + } + + 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 + */ + public static function update($contact) + { + // Check for invalid "contact-type" value + if (isset($contact['contact-type']) && (intval($contact['contact-type']) < 0)) { + $contact['contact-type'] = 0; + } + + /// @todo update contact table as well + + $gcontact_id = self::getId($contact); + + if (!$gcontact_id) { + return false; + } + + $r = q( + "SELECT `name`, `nick`, `photo`, `location`, `about`, `addr`, `generation`, `birthday`, `gender`, `keywords`, + `contact-type`, `hide`, `nsfw`, `network`, `alias`, `notify`, `server_url`, `connect`, `updated`, `url` + FROM `gcontact` WHERE `id` = %d LIMIT 1", + intval($gcontact_id) + ); + + // Get all field names + $fields = array(); + foreach ($r[0] as $field => $data) { + $fields[$field] = $data; + } + + unset($fields["url"]); + unset($fields["updated"]); + unset($fields["hide"]); + + // Bugfix: We had an error in the storing of keywords which lead to the "0" + // This value is still transmitted via poco. + if ($contact["keywords"] == "0") { + unset($contact["keywords"]); + } + + if ($r[0]["keywords"] == "0") { + $r[0]["keywords"] = ""; + } + + // assign all unassigned fields from the database entry + foreach ($fields as $field => $data) { + if (!isset($contact[$field]) || ($contact[$field] == "")) { + $contact[$field] = $r[0][$field]; + } + } + + if (!isset($contact["hide"])) { + $contact["hide"] = $r[0]["hide"]; + } + + $fields["hide"] = $r[0]["hide"]; + + if ($contact["network"] == NETWORK_STATUSNET) { + $contact["network"] = NETWORK_OSTATUS; + } + + // Replace alternate OStatus user format with the primary one + self::fixAlternateContactAddress($contact); + + if (!isset($contact["updated"])) { + $contact["updated"] = DBM::date(); + } + + if ($contact["network"] == NETWORK_TWITTER) { + $contact["server_url"] = 'http://twitter.com'; + } + + if ($contact["server_url"] == "") { + $data = Probe::uri($contact["url"]); + if ($data["network"] != NETWORK_PHANTOM) { + $contact["server_url"] = $data['baseurl']; + } + } else { + $contact["server_url"] = normalise_link($contact["server_url"]); + } + + if (($contact["addr"] == "") && ($contact["server_url"] != "") && ($contact["nick"] != "")) { + $hostname = str_replace("http://", "", $contact["server_url"]); + $contact["addr"] = $contact["nick"]."@".$hostname; + } + + // Check if any field changed + $update = false; + unset($fields["generation"]); + + if ((($contact["generation"] > 0) && ($contact["generation"] <= $r[0]["generation"])) || ($r[0]["generation"] == 0)) { + foreach ($fields as $field => $data) { + if ($contact[$field] != $r[0][$field]) { + logger("Difference for contact ".$contact["url"]." in field '".$field."'. New value: '".$contact[$field]."', old value '".$r[0][$field]."'", LOGGER_DEBUG); + $update = true; + } + } + + if ($contact["generation"] < $r[0]["generation"]) { + logger("Difference for contact ".$contact["url"]." in field 'generation'. new value: '".$contact["generation"]."', old value '".$r[0]["generation"]."'", LOGGER_DEBUG); + $update = true; + } + } + + if ($update) { + logger("Update gcontact for ".$contact["url"], LOGGER_DEBUG); + $condition = array('`nurl` = ? AND (`generation` = 0 OR `generation` >= ?)', + normalise_link($contact["url"]), $contact["generation"]); + $contact["updated"] = DBM::date($contact["updated"]); + + $updated = array('photo' => $contact['photo'], 'name' => $contact['name'], + 'nick' => $contact['nick'], 'addr' => $contact['addr'], + 'network' => $contact['network'], 'birthday' => $contact['birthday'], + 'gender' => $contact['gender'], 'keywords' => $contact['keywords'], + 'hide' => $contact['hide'], 'nsfw' => $contact['nsfw'], + 'contact-type' => $contact['contact-type'], 'alias' => $contact['alias'], + 'notify' => $contact['notify'], 'url' => $contact['url'], + 'location' => $contact['location'], 'about' => $contact['about'], + 'generation' => $contact['generation'], 'updated' => $contact['updated'], + 'server_url' => $contact['server_url'], 'connect' => $contact['connect']); + + dba::update('gcontact', $updated, $condition, $fields); + + // Now update the contact entry with the user id "0" as well. + // This is used for the shadow copies of public items. + $r = q( + "SELECT `id` FROM `contact` WHERE `nurl` = '%s' AND `uid` = 0 ORDER BY `id` LIMIT 1", + dbesc(normalise_link($contact["url"])) + ); + + if (DBM::is_result($r)) { + logger("Update public contact ".$r[0]["id"], LOGGER_DEBUG); + + update_contact_avatar($contact["photo"], 0, $r[0]["id"]); + + $fields = array('name', 'nick', 'addr', + 'network', 'bd', 'gender', + 'keywords', 'alias', 'contact-type', + 'url', 'location', 'about'); + $old_contact = dba::select('contact', $fields, array('id' => $r[0]["id"]), array('limit' => 1)); + + // Update it with the current values + $fields = array('name' => $contact['name'], 'nick' => $contact['nick'], + 'addr' => $contact['addr'], 'network' => $contact['network'], + 'bd' => $contact['birthday'], 'gender' => $contact['gender'], + 'keywords' => $contact['keywords'], 'alias' => $contact['alias'], + 'contact-type' => $contact['contact-type'], 'url' => $contact['url'], + 'location' => $contact['location'], 'about' => $contact['about']); + + dba::update('contact', $fields, array('id' => $r[0]["id"]), $old_contact); + } + } + + return $gcontact_id; + } + + /** + * @brief Updates the gcontact entry from probe + * + * @param str $url profile link + */ + public static function updateFromProbe($url) + { + $data = Probe::uri($url); + + if (in_array($data["network"], array(NETWORK_PHANTOM))) { + logger("Invalid network for contact url ".$data["url"]." - Called by: ".System::callstack(), LOGGER_DEBUG); + return; + } + + $data["server_url"] = $data["baseurl"]; + + self::update($data); + } + + /** + * @brief Update the gcontact entry for a given user id + * + * @param int $uid User ID + */ + public static function updateForUser($uid) + { + $r = q( + "SELECT `profile`.`locality`, `profile`.`region`, `profile`.`country-name`, + `profile`.`name`, `profile`.`about`, `profile`.`gender`, + `profile`.`pub_keywords`, `profile`.`dob`, `profile`.`photo`, + `profile`.`net-publish`, `user`.`nickname`, `user`.`hidewall`, + `contact`.`notify`, `contact`.`url`, `contact`.`addr` + FROM `profile` + INNER JOIN `user` ON `user`.`uid` = `profile`.`uid` + INNER JOIN `contact` ON `contact`.`uid` = `profile`.`uid` + WHERE `profile`.`uid` = %d AND `profile`.`is-default` AND `contact`.`self`", + intval($uid) + ); + + $location = formatted_location( + array("locality" => $r[0]["locality"], "region" => $r[0]["region"], "country-name" => $r[0]["country-name"]) + ); + + // The "addr" field was added in 3.4.3 so it can be empty for older users + if ($r[0]["addr"] != "") { + $addr = $r[0]["nickname"].'@'.str_replace(array("http://", "https://"), "", System::baseUrl()); + } else { + $addr = $r[0]["addr"]; + } + + $gcontact = array("name" => $r[0]["name"], "location" => $location, "about" => $r[0]["about"], + "gender" => $r[0]["gender"], "keywords" => $r[0]["pub_keywords"], + "birthday" => $r[0]["dob"], "photo" => $r[0]["photo"], + "notify" => $r[0]["notify"], "url" => $r[0]["url"], + "hide" => ($r[0]["hidewall"] || !$r[0]["net-publish"]), + "nick" => $r[0]["nickname"], "addr" => $addr, + "connect" => $addr, "server_url" => System::baseUrl(), + "generation" => 1, "network" => NETWORK_DFRN); + + self::update($gcontact); + } + + /** + * @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 + */ + public static function gsFetchUsers($server) + { + logger("Fetching users from GNU Social server ".$server, LOGGER_DEBUG); + + $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 { + /// @TODO is_object() above means here no object, still $statistics is being used as object + if ($statistics->instance_with_ssl) { + $server = "https://"; + } else { + $server = "http://"; + } + + $server .= $statistics->instance_address; + + $hostname = $statistics->instance_address; + } + + 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" => System::baseUrl()."/images/person-175.jpg"); + self::getId($contact); + } + } + } + + /** + * @brief Asking GNU Social server on a regular base for their user data + * + */ + public static function gsDiscover() + { + $requery_days = intval(Config::get("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 (!DBM::is_result($r)) { + return; + } + + foreach ($r as $server) { + self::gsFetchUsers($server["url"]); + q("UPDATE `gserver` SET `last_poco_query` = '%s' WHERE `nurl` = '%s'", dbesc(datetime_convert()), dbesc($server["nurl"])); + } + } +} diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 080dd9ada..0788d36f4 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -12,6 +12,7 @@ use Friendica\App; use Friendica\Core\Config; use Friendica\Core\System; use Friendica\Core\Worker; +use Friendica\Model\GlobalContact; use Friendica\Database\DBM; use Friendica\Util\XML; @@ -1675,9 +1676,9 @@ class DFRN $poco["photo"] = $author["avatar"]; $poco["hide"] = $hide; $poco["contact-type"] = $contact["contact-type"]; - $gcid = update_gcontact($poco); + $gcid = GlobalContact::update($poco); - link_gcontact($gcid, $importer["uid"], $contact["id"]); + GlobalContact::link($gcid, $importer["uid"], $contact["id"]); } return($author); diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index f1fc88dbd..758a23db8 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -16,6 +16,7 @@ use Friendica\Core\Config; use Friendica\Core\PConfig; use Friendica\Core\Worker; use Friendica\Database\DBM; +use Friendica\Model\GlobalContact; use Friendica\Network\Probe; use Friendica\Util\XML; @@ -2246,9 +2247,9 @@ class Diaspora "addr" => $author, "nick" => $nick, "keywords" => $keywords, "hide" => !$searchable, "nsfw" => $nsfw); - $gcid = update_gcontact($gcontact); + $gcid = GlobalContact::update($gcontact); - link_gcontact($gcid, $importer["uid"], $contact["id"]); + GlobalContact::link($gcid, $importer["uid"], $contact["id"]); logger("Profile of contact ".$contact["id"]." stored for user ".$importer["uid"], LOGGER_DEBUG); diff --git a/src/Protocol/PortableContact.php b/src/Protocol/PortableContact.php new file mode 100644 index 000000000..f884b0f28 --- /dev/null +++ b/src/Protocol/PortableContact.php @@ -0,0 +1,1572 @@ +get_curl_code(), LOGGER_DEBUG); + + if (($a->get_curl_code() > 299) || (! $s)) { + return; + } + + $j = json_decode($s); + + logger('load: json: ' . print_r($j, true), LOGGER_DATA); + + if (! isset($j->entry)) { + return; + } + + $total = 0; + foreach ($j->entry as $entry) { + $total ++; + $profile_url = ''; + $profile_photo = ''; + $connect_url = ''; + $name = ''; + $network = ''; + $updated = NULL_DATE; + $location = ''; + $about = ''; + $keywords = ''; + $gender = ''; + $contact_type = -1; + $generation = 0; + + $name = $entry->displayName; + + if (isset($entry->urls)) { + foreach ($entry->urls as $url) { + if ($url->type == 'profile') { + $profile_url = $url->value; + continue; + } + if ($url->type == 'webfinger') { + $connect_url = str_replace('acct:', '', $url->value); + continue; + } + } + } + if (isset($entry->photos)) { + foreach ($entry->photos as $photo) { + if ($photo->type == 'profile') { + $profile_photo = $photo->value; + continue; + } + } + } + + if (isset($entry->updated)) { + $updated = date("Y-m-d H:i:s", strtotime($entry->updated)); + } + + if (isset($entry->network)) { + $network = $entry->network; + } + + if (isset($entry->currentLocation)) { + $location = $entry->currentLocation; + } + + if (isset($entry->aboutMe)) { + $about = html2bbcode($entry->aboutMe); + } + + if (isset($entry->gender)) { + $gender = $entry->gender; + } + + if (isset($entry->generation) && ($entry->generation > 0)) { + $generation = ++$entry->generation; + } + + if (isset($entry->tags)) { + foreach ($entry->tags as $tag) { + $keywords = implode(", ", $tag); + } + } + + if (isset($entry->contactType) && ($entry->contactType >= 0)) { + $contact_type = $entry->contactType; + } + + $gcontact = array("url" => $profile_url, + "name" => $name, + "network" => $network, + "photo" => $profile_photo, + "about" => $about, + "location" => $location, + "gender" => $gender, + "keywords" => $keywords, + "connect" => $connect_url, + "updated" => $updated, + "contact-type" => $contact_type, + "generation" => $generation); + + try { + $gcontact = GlobalContact::sanitize($gcontact); + $gcid = GlobalContact::update($gcontact); + + GlobalContact::link($gcid, $uid, $cid, $zcid); + } catch (Exception $e) { + logger($e->getMessage(), LOGGER_DEBUG); + } + } + logger("load: loaded $total entries", LOGGER_DEBUG); + + q( + "DELETE FROM `glink` WHERE `cid` = %d AND `uid` = %d AND `zcid` = %d AND `updated` < UTC_TIMESTAMP - INTERVAL 2 DAY", + intval($cid), + intval($uid), + intval($zcid) + ); + } + + function poco_reachable($profile, $server = "", $network = "", $force = false) { + + if ($server == "") { + $server = poco_detect_server($profile); + } + + if ($server == "") { + return true; + } + + return poco_check_server($server, $network, $force); + } + + function poco_detect_server($profile) { + + // Try to detect the server path based upon some known standard paths + $server_url = ""; + + if ($server_url == "") { + $friendica = preg_replace("=(https?://)(.*)/profile/(.*)=ism", "$1$2", $profile); + if ($friendica != $profile) { + $server_url = $friendica; + $network = NETWORK_DFRN; + } + } + + if ($server_url == "") { + $diaspora = preg_replace("=(https?://)(.*)/u/(.*)=ism", "$1$2", $profile); + if ($diaspora != $profile) { + $server_url = $diaspora; + $network = NETWORK_DIASPORA; + } + } + + if ($server_url == "") { + $red = preg_replace("=(https?://)(.*)/channel/(.*)=ism", "$1$2", $profile); + if ($red != $profile) { + $server_url = $red; + $network = NETWORK_DIASPORA; + } + } + + // Mastodon + if ($server_url == "") { + $mastodon = preg_replace("=(https?://)(.*)/users/(.*)=ism", "$1$2", $profile); + if ($mastodon != $profile) { + $server_url = $mastodon; + $network = NETWORK_OSTATUS; + } + } + + // Numeric OStatus variant + if ($server_url == "") { + $ostatus = preg_replace("=(https?://)(.*)/user/(.*)=ism", "$1$2", $profile); + if ($ostatus != $profile) { + $server_url = $ostatus; + $network = NETWORK_OSTATUS; + } + } + + // Wild guess + if ($server_url == "") { + $base = preg_replace("=(https?://)(.*?)/(.*)=ism", "$1$2", $profile); + if ($base != $profile) { + $server_url = $base; + $network = NETWORK_PHANTOM; + } + } + + if ($server_url == "") { + return ""; + } + + $r = q("SELECT `id` FROM `gserver` WHERE `nurl` = '%s' AND `last_contact` > `last_failure`", + dbesc(normalise_link($server_url))); + if (DBM::is_result($r)) { + return $server_url; + } + + // Fetch the host-meta to check if this really is a server + $serverret = z_fetch_url($server_url."/.well-known/host-meta"); + if (!$serverret["success"]) { + return ""; + } + + return $server_url; + } + + function poco_alternate_ostatus_url($url) { + return(preg_match("=https?://.+/user/\d+=ism", $url, $matches)); + } + + function poco_last_updated($profile, $force = false) { + + $gcontacts = q("SELECT * FROM `gcontact` WHERE `nurl` = '%s'", + dbesc(normalise_link($profile))); + + if (!DBM::is_result($gcontacts)) { + return false; + } + + $contact = array("url" => $profile); + + if ($gcontacts[0]["created"] <= NULL_DATE) { + $contact['created'] = datetime_convert(); + } + + if ($force) { + $server_url = normalise_link(poco_detect_server($profile)); + } + + if (($server_url == '') && ($gcontacts[0]["server_url"] != "")) { + $server_url = $gcontacts[0]["server_url"]; + } + + if (!$force && (($server_url == '') || ($gcontacts[0]["server_url"] == $gcontacts[0]["nurl"]))) { + $server_url = normalise_link(poco_detect_server($profile)); + } + + if (!in_array($gcontacts[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_FEED, NETWORK_OSTATUS, ""))) { + logger("Profile ".$profile.": Network type ".$gcontacts[0]["network"]." can't be checked", LOGGER_DEBUG); + return false; + } + + if ($server_url != "") { + if (!poco_check_server($server_url, $gcontacts[0]["network"], $force)) { + if ($force) { + q("UPDATE `gcontact` SET `last_failure` = '%s' WHERE `nurl` = '%s'", + dbesc(datetime_convert()), dbesc(normalise_link($profile))); + } + + logger("Profile ".$profile.": Server ".$server_url." wasn't reachable.", LOGGER_DEBUG); + return false; + } + $contact['server_url'] = $server_url; + } + + if (in_array($gcontacts[0]["network"], array("", NETWORK_FEED))) { + $server = q("SELECT `network` FROM `gserver` WHERE `nurl` = '%s' AND `network` != ''", + dbesc(normalise_link($server_url))); + + if ($server) { + $contact['network'] = $server[0]["network"]; + } else { + return false; + } + } + + // noscrape is really fast so we don't cache the call. + if (($server_url != "") && ($gcontacts[0]["nick"] != "")) { + + // Use noscrape if possible + $server = q("SELECT `noscrape`, `network` FROM `gserver` WHERE `nurl` = '%s' AND `noscrape` != ''", dbesc(normalise_link($server_url))); + + if ($server) { + $noscraperet = z_fetch_url($server[0]["noscrape"]."/".$gcontacts[0]["nick"]); + + if ($noscraperet["success"] && ($noscraperet["body"] != "")) { + + $noscrape = json_decode($noscraperet["body"], true); + + if (is_array($noscrape)) { + $contact["network"] = $server[0]["network"]; + + if (isset($noscrape["fn"])) { + $contact["name"] = $noscrape["fn"]; + } + if (isset($noscrape["comm"])) { + $contact["community"] = $noscrape["comm"]; + } + if (isset($noscrape["tags"])) { + $keywords = implode(" ", $noscrape["tags"]); + if ($keywords != "") { + $contact["keywords"] = $keywords; + } + } + + $location = formatted_location($noscrape); + if ($location) { + $contact["location"] = $location; + } + if (isset($noscrape["dfrn-notify"])) { + $contact["notify"] = $noscrape["dfrn-notify"]; + } + // Remove all fields that are not present in the gcontact table + unset($noscrape["fn"]); + unset($noscrape["key"]); + unset($noscrape["homepage"]); + unset($noscrape["comm"]); + unset($noscrape["tags"]); + unset($noscrape["locality"]); + unset($noscrape["region"]); + unset($noscrape["country-name"]); + unset($noscrape["contacts"]); + unset($noscrape["dfrn-request"]); + unset($noscrape["dfrn-confirm"]); + unset($noscrape["dfrn-notify"]); + unset($noscrape["dfrn-poll"]); + + // Set the date of the last contact + /// @todo By now the function "update_gcontact" doesn't work with this field + //$contact["last_contact"] = datetime_convert(); + + $contact = array_merge($contact, $noscrape); + + GlobalContact::update($contact); + + if (trim($noscrape["updated"]) != "") { + q("UPDATE `gcontact` SET `last_contact` = '%s' WHERE `nurl` = '%s'", + dbesc(datetime_convert()), dbesc(normalise_link($profile))); + + logger("Profile ".$profile." was last updated at ".$noscrape["updated"]." (noscrape)", LOGGER_DEBUG); + + return $noscrape["updated"]; + } + } + } + } + } + + // If we only can poll the feed, then we only do this once a while + if (!$force && !poco_do_update($gcontacts[0]["created"], $gcontacts[0]["updated"], $gcontacts[0]["last_failure"], $gcontacts[0]["last_contact"])) { + logger("Profile ".$profile." was last updated at ".$gcontacts[0]["updated"]." (cached)", LOGGER_DEBUG); + + GlobalContact::update($contact); + return $gcontacts[0]["updated"]; + } + + $data = Probe::uri($profile); + + // Is the profile link the alternate OStatus link notation? (http://domain.tld/user/4711) + // Then check the other link and delete this one + if (($data["network"] == NETWORK_OSTATUS) && poco_alternate_ostatus_url($profile) + && (normalise_link($profile) == normalise_link($data["alias"])) + && (normalise_link($profile) != normalise_link($data["url"])) + ) { + // Delete the old entry + q("DELETE FROM `gcontact` WHERE `nurl` = '%s'", dbesc(normalise_link($profile))); + q("DELETE FROM `glink` WHERE `gcid` = %d", intval($gcontacts[0]["id"])); + + $gcontact = array_merge($gcontacts[0], $data); + + $gcontact["server_url"] = $data["baseurl"]; + + try { + $gcontact = GlobalContact::sanitize($gcontact); + GlobalContact::update($gcontact); + + poco_last_updated($data["url"], $force); + } catch (Exception $e) { + logger($e->getMessage(), LOGGER_DEBUG); + } + + logger("Profile ".$profile." was deleted", LOGGER_DEBUG); + return false; + } + + if (($data["poll"] == "") || (in_array($data["network"], array(NETWORK_FEED, NETWORK_PHANTOM)))) { + q("UPDATE `gcontact` SET `last_failure` = '%s' WHERE `nurl` = '%s'", + dbesc(datetime_convert()), dbesc(normalise_link($profile))); + + logger("Profile ".$profile." wasn't reachable (profile)", LOGGER_DEBUG); + return false; + } + + $contact = array_merge($contact, $data); + + $contact["server_url"] = $data["baseurl"]; + + GlobalContact::update($contact); + + $feedret = z_fetch_url($data["poll"]); + + if (!$feedret["success"]) { + q("UPDATE `gcontact` SET `last_failure` = '%s' WHERE `nurl` = '%s'", + dbesc(datetime_convert()), dbesc(normalise_link($profile))); + + logger("Profile ".$profile." wasn't reachable (no feed)", LOGGER_DEBUG); + return false; + } + + $doc = new DOMDocument(); + @$doc->loadXML($feedret["body"]); + + $xpath = new DomXPath($doc); + $xpath->registerNamespace('atom', "http://www.w3.org/2005/Atom"); + + $entries = $xpath->query('/atom:feed/atom:entry'); + + $last_updated = ""; + + foreach ($entries as $entry) { + $published = $xpath->query('atom:published/text()', $entry)->item(0)->nodeValue; + $updated = $xpath->query('atom:updated/text()', $entry)->item(0)->nodeValue; + + if ($last_updated < $published) + $last_updated = $published; + + if ($last_updated < $updated) + $last_updated = $updated; + } + + // Maybe there aren't any entries. Then check if it is a valid feed + if ($last_updated == "") { + if ($xpath->query('/atom:feed')->length > 0) { + $last_updated = NULL_DATE; + } + } + q("UPDATE `gcontact` SET `updated` = '%s', `last_contact` = '%s' WHERE `nurl` = '%s'", + dbesc(DBM::date($last_updated)), dbesc(DBM::date()), dbesc(normalise_link($profile))); + + if (($gcontacts[0]["generation"] == 0)) { + q("UPDATE `gcontact` SET `generation` = 9 WHERE `nurl` = '%s'", + dbesc(normalise_link($profile))); + } + + logger("Profile ".$profile." was last updated at ".$last_updated, LOGGER_DEBUG); + + return($last_updated); + } + + function poco_do_update($created, $updated, $last_failure, $last_contact) { + $now = strtotime(datetime_convert()); + + if ($updated > $last_contact) { + $contact_time = strtotime($updated); + } else { + $contact_time = strtotime($last_contact); + } + + $failure_time = strtotime($last_failure); + $created_time = strtotime($created); + + // If there is no "created" time then use the current time + if ($created_time <= 0) { + $created_time = $now; + } + + // If the last contact was less than 24 hours then don't update + if (($now - $contact_time) < (60 * 60 * 24)) { + return false; + } + + // If the last failure was less than 24 hours then don't update + if (($now - $failure_time) < (60 * 60 * 24)) { + return false; + } + + // If the last contact was less than a week ago and the last failure is older than a week then don't update + //if ((($now - $contact_time) < (60 * 60 * 24 * 7)) && ($contact_time > $failure_time)) + // return false; + + // If the last contact time was more than a week ago and the contact was created more than a week ago, then only try once a week + if ((($now - $contact_time) > (60 * 60 * 24 * 7)) && (($now - $created_time) > (60 * 60 * 24 * 7)) && (($now - $failure_time) < (60 * 60 * 24 * 7))) { + return false; + } + + // If the last contact time was more than a month ago and the contact was created more than a month ago, then only try once a month + if ((($now - $contact_time) > (60 * 60 * 24 * 30)) && (($now - $created_time) > (60 * 60 * 24 * 30)) && (($now - $failure_time) < (60 * 60 * 24 * 30))) { + return false; + } + + return true; + } + + function poco_to_boolean($val) { + if (($val == "true") || ($val == 1)) { + return true; + } elseif (($val == "false") || ($val == 0)) { + return false; + } + + return $val; + } + + /** + * @brief Detect server type (Hubzilla or Friendica) via the poco data + * + * @param object $data POCO data + * @return array Server data + */ + function poco_detect_poco_data($data) { + $server = false; + + if (!isset($data->entry)) { + return false; + } + + if (count($data->entry) == 0) { + return false; + } + + if (!isset($data->entry[0]->urls)) { + return false; + } + + if (count($data->entry[0]->urls) == 0) { + return false; + } + + foreach ($data->entry[0]->urls as $url) { + if ($url->type == 'zot') { + $server = array(); + $server["platform"] = 'Hubzilla'; + $server["network"] = NETWORK_DIASPORA; + return $server; + } + } + return false; + } + + /** + * @brief Detect server type by using the nodeinfo data + * + * @param string $server_url address of the server + * @return array Server data + */ + function poco_fetch_nodeinfo($server_url) { + $serverret = z_fetch_url($server_url."/.well-known/nodeinfo"); + if (!$serverret["success"]) { + return false; + } + + $nodeinfo = json_decode($serverret['body']); + + if (!is_object($nodeinfo)) { + return false; + } + + if (!is_array($nodeinfo->links)) { + return false; + } + + $nodeinfo_url = ''; + + foreach ($nodeinfo->links as $link) { + if ($link->rel == 'http://nodeinfo.diaspora.software/ns/schema/1.0') { + $nodeinfo_url = $link->href; + } + } + + if ($nodeinfo_url == '') { + return false; + } + + $serverret = z_fetch_url($nodeinfo_url); + if (!$serverret["success"]) { + return false; + } + + $nodeinfo = json_decode($serverret['body']); + + if (!is_object($nodeinfo)) { + return false; + } + + $server = array(); + + $server['register_policy'] = REGISTER_CLOSED; + + if (is_bool($nodeinfo->openRegistrations) && $nodeinfo->openRegistrations) { + $server['register_policy'] = REGISTER_OPEN; + } + + if (is_object($nodeinfo->software)) { + if (isset($nodeinfo->software->name)) { + $server['platform'] = $nodeinfo->software->name; + } + + if (isset($nodeinfo->software->version)) { + $server['version'] = $nodeinfo->software->version; + // Version numbers on Nodeinfo are presented with additional info, e.g.: + // 0.6.3.0-p1702cc1c, 0.6.99.0-p1b9ab160 or 3.4.3-2-1191. + $server['version'] = preg_replace("=(.+)-(.{4,})=ism", "$1", $server['version']); + } + } + + if (is_object($nodeinfo->metadata)) { + if (isset($nodeinfo->metadata->nodeName)) { + $server['site_name'] = $nodeinfo->metadata->nodeName; + } + } + + $diaspora = false; + $friendica = false; + $gnusocial = false; + + if (is_array($nodeinfo->protocols->inbound)) { + foreach ($nodeinfo->protocols->inbound as $inbound) { + if ($inbound == 'diaspora') { + $diaspora = true; + } + if ($inbound == 'friendica') { + $friendica = true; + } + if ($inbound == 'gnusocial') { + $gnusocial = true; + } + } + } + + if ($gnusocial) { + $server['network'] = NETWORK_OSTATUS; + } + if ($diaspora) { + $server['network'] = NETWORK_DIASPORA; + } + if ($friendica) { + $server['network'] = NETWORK_DFRN; + } + + if (!$server) { + return false; + } + + return $server; + } + + /** + * @brief Detect server type (Hubzilla or Friendica) via the front page body + * + * @param string $body Front page of the server + * @return array Server data + */ + function poco_detect_server_type($body) { + $server = false; + + $doc = new DOMDocument(); + @$doc->loadHTML($body); + $xpath = new DomXPath($doc); + + $list = $xpath->query("//meta[@name]"); + + foreach ($list as $node) { + $attr = array(); + if ($node->attributes->length) { + foreach ($node->attributes as $attribute) { + $attr[$attribute->name] = $attribute->value; + } + } + if ($attr['name'] == 'generator') { + $version_part = explode(" ", $attr['content']); + if (count($version_part) == 2) { + if (in_array($version_part[0], array("Friendika", "Friendica"))) { + $server = array(); + $server["platform"] = $version_part[0]; + $server["version"] = $version_part[1]; + $server["network"] = NETWORK_DFRN; + } + } + } + } + + if (!$server) { + $list = $xpath->query("//meta[@property]"); + + foreach ($list as $node) { + $attr = array(); + if ($node->attributes->length) { + foreach ($node->attributes as $attribute) { + $attr[$attribute->name] = $attribute->value; + } + } + if ($attr['property'] == 'generator' && in_array($attr['content'], array("hubzilla", "BlaBlaNet"))) { + $server = array(); + $server["platform"] = $attr['content']; + $server["version"] = ""; + $server["network"] = NETWORK_DIASPORA; + } + } + } + + if (!$server) { + return false; + } + + $server["site_name"] = $xpath->evaluate($element."//head/title/text()", $context)->item(0)->nodeValue; + return $server; + } + + 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; + } + + $servers = q("SELECT * FROM `gserver` WHERE `nurl` = '%s'", dbesc(normalise_link($server_url))); + if (DBM::is_result($servers)) { + + if ($servers[0]["created"] <= NULL_DATE) { + q("UPDATE `gserver` SET `created` = '%s' WHERE `nurl` = '%s'", + dbesc(datetime_convert()), dbesc(normalise_link($server_url))); + } + $poco = $servers[0]["poco"]; + $noscrape = $servers[0]["noscrape"]; + + if ($network == "") { + $network = $servers[0]["network"]; + } + + $last_contact = $servers[0]["last_contact"]; + $last_failure = $servers[0]["last_failure"]; + $version = $servers[0]["version"]; + $platform = $servers[0]["platform"]; + $site_name = $servers[0]["site_name"]; + $info = $servers[0]["info"]; + $register_policy = $servers[0]["register_policy"]; + + if (!$force && !poco_do_update($servers[0]["created"], "", $last_failure, $last_contact)) { + logger("Use cached data for server ".$server_url, LOGGER_DEBUG); + return ($last_contact >= $last_failure); + } + } else { + $poco = ""; + $noscrape = ""; + $version = ""; + $platform = ""; + $site_name = ""; + $info = ""; + $register_policy = -1; + + $last_contact = NULL_DATE; + $last_failure = NULL_DATE; + } + logger("Server ".$server_url." is outdated or unknown. Start discovery. Force: ".$force." Created: ".$servers[0]["created"]." Failure: ".$last_failure." Contact: ".$last_contact, LOGGER_DEBUG); + + $failure = false; + $possible_failure = false; + $orig_last_failure = $last_failure; + $orig_last_contact = $last_contact; + + // Check if the page is accessible via SSL. + $orig_server_url = $server_url; + $server_url = str_replace("http://", "https://", $server_url); + + // We set the timeout to 20 seconds since this operation should be done in no time if the server was vital + $serverret = z_fetch_url($server_url."/.well-known/host-meta", false, $redirects, array('timeout' => 20)); + + // Quit if there is a timeout. + // But we want to make sure to only quit if we are mostly sure that this server url fits. + if (DBM::is_result($servers) && ($orig_server_url == $server_url) && + ($serverret['errno'] == CURLE_OPERATION_TIMEDOUT)) { + logger("Connection to server ".$server_url." timed out.", LOGGER_DEBUG); + dba::update('gserver', array('last_failure' => datetime_convert()), array('nurl' => normalise_link($server_url))); + return false; + } + + // Maybe the page is unencrypted only? + $xmlobj = @simplexml_load_string($serverret["body"],'SimpleXMLElement',0, "http://docs.oasis-open.org/ns/xri/xrd-1.0"); + if (!$serverret["success"] || ($serverret["body"] == "") || (@sizeof($xmlobj) == 0) || !is_object($xmlobj)) { + $server_url = str_replace("https://", "http://", $server_url); + + // We set the timeout to 20 seconds since this operation should be done in no time if the server was vital + $serverret = z_fetch_url($server_url."/.well-known/host-meta", false, $redirects, array('timeout' => 20)); + + // Quit if there is a timeout + if ($serverret['errno'] == CURLE_OPERATION_TIMEDOUT) { + logger("Connection to server ".$server_url." timed out.", LOGGER_DEBUG); + dba::update('gserver', array('last_failure' => datetime_convert()), array('nurl' => normalise_link($server_url))); + return false; + } + + $xmlobj = @simplexml_load_string($serverret["body"],'SimpleXMLElement',0, "http://docs.oasis-open.org/ns/xri/xrd-1.0"); + } + + if (!$serverret["success"] || ($serverret["body"] == "") || (sizeof($xmlobj) == 0) || !is_object($xmlobj)) { + // Workaround for bad configured servers (known nginx problem) + if (!in_array($serverret["debug"]["http_code"], array("403", "404"))) { + $failure = true; + } + $possible_failure = true; + } + + // If the server has no possible failure we reset the cached data + if (!$possible_failure) { + $version = ""; + $platform = ""; + $site_name = ""; + $info = ""; + $register_policy = -1; + } + + // Look for poco + if (!$failure) { + $serverret = z_fetch_url($server_url."/poco"); + if ($serverret["success"]) { + $data = json_decode($serverret["body"]); + if (isset($data->totalResults)) { + $poco = $server_url."/poco"; + $server = poco_detect_poco_data($data); + if ($server) { + $platform = $server['platform']; + $network = $server['network']; + $version = ''; + $site_name = ''; + } + } + } + } + + if (!$failure) { + // Test for Diaspora, Hubzilla, Mastodon or older Friendica servers + $serverret = z_fetch_url($server_url); + + if (!$serverret["success"] || ($serverret["body"] == "")) { + $failure = true; + } else { + $server = poco_detect_server_type($serverret["body"]); + if ($server) { + $platform = $server['platform']; + $network = $server['network']; + $version = $server['version']; + $site_name = $server['site_name']; + } + + $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 (stristr($line,'Server: Mastodon')) { + $platform = "Mastodon"; + $network = NETWORK_OSTATUS; + } + } + } + } + } + + if (!$failure && ($poco == "")) { + // Test for Statusnet + // Will also return data for Friendica and GNU Social - but it will be overwritten later + // The "not implemented" is a special treatment for really, really old Friendica versions + $serverret = z_fetch_url($server_url."/api/statusnet/version.json"); + if ($serverret["success"] && ($serverret["body"] != '{"error":"not implemented"}') && + ($serverret["body"] != '') && (strlen($serverret["body"]) < 30)) { + $platform = "StatusNet"; + // Remove junk that some GNU Social servers return + $version = str_replace(chr(239).chr(187).chr(191), "", $serverret["body"]); + $version = trim($version, '"'); + $network = NETWORK_OSTATUS; + } + + // Test for GNU Social + $serverret = z_fetch_url($server_url."/api/gnusocial/version.json"); + if ($serverret["success"] && ($serverret["body"] != '{"error":"not implemented"}') && + ($serverret["body"] != '') && (strlen($serverret["body"]) < 30)) { + $platform = "GNU Social"; + // Remove junk that some GNU Social servers return + $version = str_replace(chr(239).chr(187).chr(191), "", $serverret["body"]); + $version = trim($version, '"'); + $network = NETWORK_OSTATUS; + } + + // Test for Mastodon + $orig_version = $version; + $serverret = z_fetch_url($server_url."/api/v1/instance"); + if ($serverret["success"] && ($serverret["body"] != '')) { + $data = json_decode($serverret["body"]); + if (isset($data->version)) { + $platform = "Mastodon"; + $version = $data->version; + $site_name = $data->title; + $info = $data->description; + $network = NETWORK_OSTATUS; + } + } + if (strstr($orig_version.$version, 'Pleroma')) { + $platform = 'Pleroma'; + $version = trim(str_replace('Pleroma', '', $version)); + } + } + + if (!$failure) { + // Test for Hubzilla and Red + $serverret = z_fetch_url($server_url."/siteinfo.json"); + if ($serverret["success"]) { + $data = json_decode($serverret["body"]); + if (isset($data->url)) { + $platform = $data->platform; + $version = $data->version; + $network = NETWORK_DIASPORA; + } + if (!empty($data->site_name)) { + $site_name = $data->site_name; + } + switch ($data->register_policy) { + case "REGISTER_OPEN": + $register_policy = REGISTER_OPEN; + break; + case "REGISTER_APPROVE": + $register_policy = REGISTER_APPROVE; + break; + case "REGISTER_CLOSED": + default: + $register_policy = REGISTER_CLOSED; + break; + } + } else { + // Test for Hubzilla, Redmatrix or Friendica + $serverret = z_fetch_url($server_url."/api/statusnet/config.json"); + if ($serverret["success"]) { + $data = json_decode($serverret["body"]); + if (isset($data->site->server)) { + if (isset($data->site->platform)) { + $platform = $data->site->platform->PLATFORM_NAME; + $version = $data->site->platform->STD_VERSION; + $network = NETWORK_DIASPORA; + } + if (isset($data->site->BlaBlaNet)) { + $platform = $data->site->BlaBlaNet->PLATFORM_NAME; + $version = $data->site->BlaBlaNet->STD_VERSION; + $network = NETWORK_DIASPORA; + } + if (isset($data->site->hubzilla)) { + $platform = $data->site->hubzilla->PLATFORM_NAME; + $version = $data->site->hubzilla->RED_VERSION; + $network = NETWORK_DIASPORA; + } + if (isset($data->site->redmatrix)) { + if (isset($data->site->redmatrix->PLATFORM_NAME)) { + $platform = $data->site->redmatrix->PLATFORM_NAME; + } elseif (isset($data->site->redmatrix->RED_PLATFORM)) { + $platform = $data->site->redmatrix->RED_PLATFORM; + } + + $version = $data->site->redmatrix->RED_VERSION; + $network = NETWORK_DIASPORA; + } + if (isset($data->site->friendica)) { + $platform = $data->site->friendica->FRIENDICA_PLATFORM; + $version = $data->site->friendica->FRIENDICA_VERSION; + $network = NETWORK_DFRN; + } + + $site_name = $data->site->name; + + $data->site->closed = poco_to_boolean($data->site->closed); + $data->site->private = poco_to_boolean($data->site->private); + $data->site->inviteonly = poco_to_boolean($data->site->inviteonly); + + if (!$data->site->closed && !$data->site->private and $data->site->inviteonly) { + $register_policy = REGISTER_APPROVE; + } elseif (!$data->site->closed && !$data->site->private) { + $register_policy = REGISTER_OPEN; + } else { + $register_policy = REGISTER_CLOSED; + } + } + } + } + } + + // Query statistics.json. Optional package for Diaspora, Friendica and Redmatrix + if (!$failure) { + $serverret = z_fetch_url($server_url."/statistics.json"); + if ($serverret["success"]) { + $data = json_decode($serverret["body"]); + if (isset($data->version)) { + $version = $data->version; + // Version numbers on statistics.json are presented with additional info, e.g.: + // 0.6.3.0-p1702cc1c, 0.6.99.0-p1b9ab160 or 3.4.3-2-1191. + $version = preg_replace("=(.+)-(.{4,})=ism", "$1", $version); + } + + if (!empty($data->name)) { + $site_name = $data->name; + } + + if (!empty($data->network)) { + $platform = $data->network; + } + + if ($platform == "Diaspora") { + $network = NETWORK_DIASPORA; + } + + if ($data->registrations_open) { + $register_policy = REGISTER_OPEN; + } else { + $register_policy = REGISTER_CLOSED; + } + } + } + + // Query nodeinfo. Working for (at least) Diaspora and Friendica. + if (!$failure) { + $server = poco_fetch_nodeinfo($server_url); + if ($server) { + $register_policy = $server['register_policy']; + + if (isset($server['platform'])) { + $platform = $server['platform']; + } + + if (isset($server['network'])) { + $network = $server['network']; + } + + if (isset($server['version'])) { + $version = $server['version']; + } + + if (isset($server['site_name'])) { + $site_name = $server['site_name']; + } + } + } + + // Check for noscrape + // Friendica servers could be detected as OStatus servers + if (!$failure && in_array($network, array(NETWORK_DFRN, NETWORK_OSTATUS))) { + $serverret = z_fetch_url($server_url."/friendica/json"); + + if (!$serverret["success"]) { + $serverret = z_fetch_url($server_url."/friendika/json"); + } + + if ($serverret["success"]) { + $data = json_decode($serverret["body"]); + + if (isset($data->version)) { + $network = NETWORK_DFRN; + + $noscrape = $data->no_scrape_url; + $version = $data->version; + $site_name = $data->site_name; + $info = $data->info; + $register_policy_str = $data->register_policy; + $platform = $data->platform; + + switch ($register_policy_str) { + case "REGISTER_CLOSED": + $register_policy = REGISTER_CLOSED; + break; + case "REGISTER_APPROVE": + $register_policy = REGISTER_APPROVE; + break; + case "REGISTER_OPEN": + $register_policy = REGISTER_OPEN; + break; + } + } + } + } + + if ($possible_failure && !$failure) { + $failure = true; + } + + if ($failure) { + $last_contact = $orig_last_contact; + $last_failure = datetime_convert(); + } else { + $last_contact = datetime_convert(); + $last_failure = $orig_last_failure; + } + + if (($last_contact <= $last_failure) && !$failure) { + logger("Server ".$server_url." seems to be alive, but last contact wasn't set - could be a bug", LOGGER_DEBUG); + } elseif (($last_contact >= $last_failure) && $failure) { + logger("Server ".$server_url." seems to be dead, but last failure wasn't set - could be a bug", LOGGER_DEBUG); + } + + // Check again if the server exists + $servers = q("SELECT `nurl` FROM `gserver` WHERE `nurl` = '%s'", dbesc(normalise_link($server_url))); + + $version = strip_tags($version); + $site_name = strip_tags($site_name); + $info = strip_tags($info); + $platform = strip_tags($platform); + + if ($servers) { + q("UPDATE `gserver` SET `url` = '%s', `version` = '%s', `site_name` = '%s', `info` = '%s', `register_policy` = %d, `poco` = '%s', `noscrape` = '%s', + `network` = '%s', `platform` = '%s', `last_contact` = '%s', `last_failure` = '%s' WHERE `nurl` = '%s'", + dbesc($server_url), + dbesc($version), + dbesc($site_name), + dbesc($info), + intval($register_policy), + dbesc($poco), + dbesc($noscrape), + dbesc($network), + dbesc($platform), + dbesc($last_contact), + dbesc($last_failure), + dbesc(normalise_link($server_url)) + ); + } elseif (!$failure) { + q("INSERT INTO `gserver` (`url`, `nurl`, `version`, `site_name`, `info`, `register_policy`, `poco`, `noscrape`, `network`, `platform`, `created`, `last_contact`, `last_failure`) + VALUES ('%s', '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s')", + dbesc($server_url), + dbesc(normalise_link($server_url)), + dbesc($version), + dbesc($site_name), + dbesc($info), + intval($register_policy), + dbesc($poco), + dbesc($noscrape), + dbesc($network), + dbesc($platform), + dbesc(datetime_convert()), + dbesc($last_contact), + dbesc($last_failure), + dbesc(datetime_convert()) + ); + } + logger("End discovery for server " . $server_url, LOGGER_DEBUG); + + return !$failure; + } + + /** + * @brief Returns a list of all known servers + * @return array List of server urls + */ + function poco_serverlist() { + $r = q("SELECT `url`, `site_name` AS `displayName`, `network`, `platform`, `version` FROM `gserver` + WHERE `network` IN ('%s', '%s', '%s') AND `last_contact` > `last_failure` + ORDER BY `last_contact` + LIMIT 1000", + dbesc(NETWORK_DFRN), dbesc(NETWORK_DIASPORA), dbesc(NETWORK_OSTATUS)); + if (!DBM::is_result($r)) { + return false; + } + + return $r; + } + + /** + * @brief Fetch server list from remote servers and adds them when they are new. + * + * @param string $poco URL to the POCO endpoint + */ + function poco_fetch_serverlist($poco) { + $serverret = z_fetch_url($poco."/@server"); + if (!$serverret["success"]) { + return; + } + $serverlist = json_decode($serverret['body']); + + if (!is_array($serverlist)) { + return; + } + + foreach ($serverlist as $server) { + $server_url = str_replace("/index.php", "", $server->url); + + $r = q("SELECT `nurl` FROM `gserver` WHERE `nurl` = '%s'", dbesc(normalise_link($server_url))); + if (!DBM::is_result($r)) { + logger("Call server check for server ".$server_url, LOGGER_DEBUG); + Worker::add(PRIORITY_LOW, "discover_poco", "server", $server_url); + } + } + } + + function poco_discover_federation() { + $last = Config::get('poco','last_federation_discovery'); + + if ($last) { + $next = $last + (24 * 60 * 60); + if ($next > time()) { + return; + } + } + + // Discover Friendica, Hubzilla and Diaspora servers + $serverdata = fetch_url("http://the-federation.info/pods.json"); + + if ($serverdata) { + $servers = json_decode($serverdata); + + foreach ($servers->pods as $server) { + Worker::add(PRIORITY_LOW, "discover_poco", "server", "https://".$server->host); + } + } + + // Disvover Mastodon servers + if (!Config::get('system','ostatus_disabled')) { + $serverdata = fetch_url("https://instances.mastodon.xyz/instances.json"); + + if ($serverdata) { + $servers = json_decode($serverdata); + + foreach ($servers as $server) { + $url = (is_null($server->https_score) ? 'http' : 'https').'://'.$server->name; + Worker::add(PRIORITY_LOW, "discover_poco", "server", $url); + } + } + } + + // Currently disabled, since the service isn't available anymore. + // It is not removed since I hope that there will be a successor. + // Discover GNU Social Servers. + //if (!Config::get('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); + // } + //} + + Config::set('poco','last_federation_discovery', time()); + } + + function poco_discover_single_server($id) { + $r = q("SELECT `poco`, `nurl`, `url`, `network` FROM `gserver` WHERE `id` = %d", intval($id)); + if (!DBM::is_result($r)) { + return false; + } + + $server = $r[0]; + + // Discover new servers out there (Works from Friendica version 3.5.2) + poco_fetch_serverlist($server["poco"]); + + // Fetch all users from the other server + $url = $server["poco"]."/?fields=displayName,urls,photos,updated,network,aboutMe,currentLocation,tags,gender,contactType,generation"; + + logger("Fetch all users from the server ".$server["url"], LOGGER_DEBUG); + + $retdata = z_fetch_url($url); + if ($retdata["success"]) { + $data = json_decode($retdata["body"]); + + poco_discover_server($data, 2); + + if (Config::get('system','poco_discovery') > 1) { + + $timeframe = Config::get('system','poco_discovery_since'); + if ($timeframe == 0) { + $timeframe = 30; + } + + $updatedSince = date("Y-m-d H:i:s", time() - $timeframe * 86400); + + // Fetch all global contacts from the other server (Not working with Redmatrix and Friendica versions before 3.3) + $url = $server["poco"]."/@global?updatedSince=".$updatedSince."&fields=displayName,urls,photos,updated,network,aboutMe,currentLocation,tags,gender,contactType,generation"; + + $success = false; + + $retdata = z_fetch_url($url); + if ($retdata["success"]) { + logger("Fetch all global contacts from the server ".$server["nurl"], LOGGER_DEBUG); + $success = poco_discover_server(json_decode($retdata["body"])); + } + + if (!$success && (Config::get('system','poco_discovery') > 2)) { + logger("Fetch contacts from users of the server ".$server["nurl"], LOGGER_DEBUG); + poco_discover_server_users($data, $server); + } + } + + q("UPDATE `gserver` SET `last_poco_query` = '%s' WHERE `nurl` = '%s'", dbesc(datetime_convert()), dbesc($server["nurl"])); + + return true; + } else { + // If the server hadn't replied correctly, then force a sanity check + poco_check_server($server["url"], $server["network"], true); + + // If we couldn't reach the server, we will try it some time later + q("UPDATE `gserver` SET `last_poco_query` = '%s' WHERE `nurl` = '%s'", dbesc(datetime_convert()), dbesc($server["nurl"])); + + return false; + } + } + + function poco_discover($complete = false) { + + // Update the server list + poco_discover_federation(); + + $no_of_queries = 5; + + $requery_days = intval(Config::get("system", "poco_requery_days")); + + if ($requery_days == 0) { + $requery_days = 7; + } + $last_update = date("c", time() - (60 * 60 * 24 * $requery_days)); + + $r = q("SELECT `id`, `url`, `network` FROM `gserver` WHERE `last_contact` >= `last_failure` AND `poco` != '' AND `last_poco_query` < '%s' ORDER BY RAND()", dbesc($last_update)); + if (DBM::is_result($r)) { + foreach ($r as $server) { + + if (!poco_check_server($server["url"], $server["network"])) { + // The server is not reachable? Okay, then we will try it later + q("UPDATE `gserver` SET `last_poco_query` = '%s' WHERE `nurl` = '%s'", dbesc(datetime_convert()), dbesc($server["nurl"])); + continue; + } + + logger('Update directory from server '.$server['url'].' with ID '.$server['id'], LOGGER_DEBUG); + Worker::add(PRIORITY_LOW, "discover_poco", "update_server_directory", (int)$server['id']); + + if (!$complete && (--$no_of_queries == 0)) { + break; + } + } + } + } + + function poco_discover_server_users($data, $server) { + + if (!isset($data->entry)) { + return; + } + + foreach ($data->entry as $entry) { + $username = ""; + if (isset($entry->urls)) { + foreach ($entry->urls as $url) { + if ($url->type == 'profile') { + $profile_url = $url->value; + $urlparts = parse_url($profile_url); + $username = end(explode("/", $urlparts["path"])); + } + } + } + if ($username != "") { + logger("Fetch contacts for the user ".$username." from the server ".$server["nurl"], LOGGER_DEBUG); + + // Fetch all contacts from a given user from the other server + $url = $server["poco"]."/".$username."/?fields=displayName,urls,photos,updated,network,aboutMe,currentLocation,tags,gender,contactType,generation"; + + $retdata = z_fetch_url($url); + if ($retdata["success"]) { + poco_discover_server(json_decode($retdata["body"]), 3); + } + } + } + } + + function poco_discover_server($data, $default_generation = 0) { + + if (!isset($data->entry) || !count($data->entry)) { + return false; + } + + $success = false; + + foreach ($data->entry as $entry) { + $profile_url = ''; + $profile_photo = ''; + $connect_url = ''; + $name = ''; + $network = ''; + $updated = NULL_DATE; + $location = ''; + $about = ''; + $keywords = ''; + $gender = ''; + $contact_type = -1; + $generation = $default_generation; + + $name = $entry->displayName; + + if (isset($entry->urls)) { + foreach ($entry->urls as $url) { + if ($url->type == 'profile') { + $profile_url = $url->value; + continue; + } + if ($url->type == 'webfinger') { + $connect_url = str_replace('acct:' , '', $url->value); + continue; + } + } + } + + if (isset($entry->photos)) { + foreach ($entry->photos as $photo) { + if ($photo->type == 'profile') { + $profile_photo = $photo->value; + continue; + } + } + } + + if (isset($entry->updated)) { + $updated = date("Y-m-d H:i:s", strtotime($entry->updated)); + } + + if (isset($entry->network)) { + $network = $entry->network; + } + + if (isset($entry->currentLocation)) { + $location = $entry->currentLocation; + } + + if (isset($entry->aboutMe)) { + $about = html2bbcode($entry->aboutMe); + } + + if (isset($entry->gender)) { + $gender = $entry->gender; + } + + if(isset($entry->generation) && ($entry->generation > 0)) { + $generation = ++$entry->generation; + } + + if(isset($entry->contactType) && ($entry->contactType >= 0)) { + $contact_type = $entry->contactType; + } + + if (isset($entry->tags)) { + foreach ($entry->tags as $tag) { + $keywords = implode(", ", $tag); + } + } + + if ($generation > 0) { + $success = true; + + logger("Store profile ".$profile_url, LOGGER_DEBUG); + + $gcontact = array("url" => $profile_url, + "name" => $name, + "network" => $network, + "photo" => $profile_photo, + "about" => $about, + "location" => $location, + "gender" => $gender, + "keywords" => $keywords, + "connect" => $connect_url, + "updated" => $updated, + "contact-type" => $contact_type, + "generation" => $generation); + + try { + $gcontact = GlobalContact::sanitize($gcontact); + update_gcontact($gcontact); + } catch (Exception $e) { + logger($e->getMessage(), LOGGER_DEBUG); + } + + logger("Done for profile ".$profile_url, LOGGER_DEBUG); + } + } + return $success; + } + +} diff --git a/src/Worker/OnePoll.php b/src/Worker/OnePoll.php index 41cbffc2e..e4d58f66a 100644 --- a/src/Worker/OnePoll.php +++ b/src/Worker/OnePoll.php @@ -4,11 +4,13 @@ namespace Friendica\Worker; use Friendica\Core\Config; use Friendica\Core\PConfig; use Friendica\Database\DBM; +use Friendica\Protocol\PortableContact; use dba; require_once 'include/follow.php'; -Class OnePoll { +Class OnePoll +{ public static function execute($contact_id = 0, $command = '') { global $a; @@ -16,7 +18,6 @@ Class OnePoll { require_once 'include/items.php'; require_once 'include/Contact.php'; require_once 'include/email.php'; - require_once 'include/socgraph.php'; require_once 'include/queue_fn.php'; logger('onepoll: start'); @@ -72,7 +73,7 @@ Class OnePoll { ); if (DBM::is_result($r)) { if (!$r[0]['total']) { - poco_load($contact['id'], $importer_uid, 0, $contact['poco']); + PortableContact::loadWorker($contact['id'], $importer_uid, 0, $contact['poco']); } } } diff --git a/view/theme/vier/theme.php b/view/theme/vier/theme.php index 7f58b214e..525bbe9d9 100644 --- a/view/theme/vier/theme.php +++ b/view/theme/vier/theme.php @@ -14,6 +14,7 @@ use Friendica\Core\Config; use Friendica\Core\PConfig; use Friendica\Core\System; use Friendica\Database\DBM; +use Friendica\Model\GlobalContact; require_once "include/plugin.php"; require_once "include/socgraph.php"; @@ -138,8 +139,7 @@ function vier_community_info() { // comunity_profiles if ($show_profiles) { - - $r = suggestion_query(local_user(), 0, 9); + $r = GlobalContact::suggestionQuery(local_user(), 0, 9); $tpl = get_markup_template('ch_directory_item.tpl'); if (DBM::is_result($r)) { From 259f91caa9b13ed98adfaf4ac83fee56a7b1edbd Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Wed, 15 Nov 2017 10:53:16 -0500 Subject: [PATCH 011/175] PortableContact created Create PortableContact and remove socgraph, update references, and calls --- include/cronjobs.php | 4 +- include/discover_poco.php | 23 +-- include/follow.php | 8 +- include/gprobe.php | 2 +- include/items.php | 5 +- include/ostatus.php | 3 +- include/pubsubpublish.php | 2 +- include/queue.php | 6 +- include/update_gcontact.php | 11 +- mod/allfriends.php | 1 - mod/contacts.php | 1 - mod/dirfind.php | 8 +- mod/hovercard.php | 1 - mod/item.php | 5 +- mod/match.php | 69 +++++---- mod/nogroup.php | 42 ++--- mod/poco.php | 4 +- mod/profiles.php | 2 - mod/settings.php | 8 +- mod/suggest.php | 1 - src/Model/GlobalContact.php | 13 +- src/Protocol/DFRN.php | 1 - src/Protocol/Diaspora.php | 1 - src/Protocol/PortableContact.php | 254 ++++++++++++++++++------------- src/Worker/OnePoll.php | 9 +- view/theme/vier/theme.php | 1 - 26 files changed, 266 insertions(+), 219 deletions(-) diff --git a/include/cronjobs.php b/include/cronjobs.php index 0b0aa7f33..2f6ade9c9 100644 --- a/include/cronjobs.php +++ b/include/cronjobs.php @@ -8,6 +8,7 @@ use Friendica\Core\Config; use Friendica\Database\DBM; use Friendica\Model\GlobalContact; use Friendica\Network\Probe; +use Friendica\Protocol\PortableContact; function cronjobs_run(&$argv, &$argc){ global $a; @@ -17,7 +18,6 @@ function cronjobs_run(&$argv, &$argc){ require_once 'mod/nodeinfo.php'; require_once 'include/photos.php'; require_once 'include/user.php'; - require_once 'include/socgraph.php'; // No parameter set? So return if ($argc <= 1) { @@ -226,7 +226,7 @@ function cron_repair_diaspora(App $a) { return; } - if (!poco_reachable($contact["url"])) { + if (!PortableContact::reachable($contact["url"])) { continue; } diff --git a/include/discover_poco.php b/include/discover_poco.php index 90d55075f..3e374de94 100644 --- a/include/discover_poco.php +++ b/include/discover_poco.php @@ -55,7 +55,7 @@ function discover_poco_run(&$argv, &$argc) if ($mode == 8) { if ($argv[2] != "") { - poco_last_updated($argv[2], true); + PortableContact::lastUpdated($argv[2], true); } } elseif ($mode == 7) { if ($argc == 6) { @@ -65,7 +65,7 @@ function discover_poco_run(&$argv, &$argc) } PortableContact::load(intval($argv[2]), intval($argv[3]), intval($argv[4]), $url); } elseif ($mode == 6) { - poco_discover_single_server(intval($argv[2])); + PortableContact::discoverSingleServer(intval($argv[2])); } elseif ($mode == 5) { update_server(); } elseif ($mode == 4) { @@ -78,7 +78,7 @@ function discover_poco_run(&$argv, &$argc) return; } $result = "Checking server ".$server_url." - "; - $ret = poco_check_server($server_url); + $ret = PortableContact::checkServer($server_url); if ($ret) { $result .= "success"; } else { @@ -94,11 +94,12 @@ function discover_poco_run(&$argv, &$argc) gs_search_user($search); } elseif (($mode == 0) && ($search == "") && (Config::get('system', 'poco_discovery') > 0)) { // Query Friendica and Hubzilla servers for their users - poco_discover(); + PortableContact::discover(); // Query GNU Social servers for their users ("statistics" addon has to be enabled on the GS server) - if (!Config::get('system', 'ostatus_disabled')) + if (!Config::get('system', 'ostatus_disabled')) { GlobalContact::gsDiscover(); + } } logger('end '.$search); @@ -120,7 +121,7 @@ function update_server() { $updated = 0; foreach ($r AS $server) { - if (!poco_do_update($server["created"], "", $server["last_failure"], $server["last_contact"])) { + if (!PortableContact::updateNeeded($server["created"], "", $server["last_failure"], $server["last_contact"])) { continue; } logger('Update server status for server '.$server["url"], LOGGER_DEBUG); @@ -172,7 +173,7 @@ function discover_users() { continue; } - $server_url = poco_detect_server($user["url"]); + $server_url = PortableContact::detectServer($user["url"]); $force_update = false; if ($user["server_url"] != "") { @@ -182,7 +183,7 @@ function discover_users() { $server_url = $user["server_url"]; } - if ((($server_url == "") && ($user["network"] == NETWORK_FEED)) || $force_update || poco_check_server($server_url, $user["network"])) { + if ((($server_url == "") && ($user["network"] == NETWORK_FEED)) || $force_update || PortableContact::checkServer($server_url, $user["network"])) { logger('Check profile '.$user["url"]); Worker::add(PRIORITY_LOW, "discover_poco", "check_profile", $user["url"]); @@ -227,13 +228,13 @@ function discover_directory($search) { continue; } // Update the contact - poco_last_updated($jj->url); + PortableContact::lastUpdated($jj->url); continue; } - $server_url = poco_detect_server($jj->url); + $server_url = PortableContact::detectServer($jj->url); if ($server_url != '') { - if (!poco_check_server($server_url)) { + if (!PortableContact::checkServer($server_url)) { logger("Friendica server ".$server_url." doesn't answer.", LOGGER_DEBUG); continue; } diff --git a/include/follow.php b/include/follow.php index 7dced7156..0f52a5bd8 100644 --- a/include/follow.php +++ b/include/follow.php @@ -1,5 +1,7 @@ 1) && (intval($argv[1]))) { @@ -34,7 +35,7 @@ function update_gcontact_run(&$argv, &$argc) { if (!in_array($data["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) { if ($r[0]["server_url"] != "") - poco_check_server($r[0]["server_url"], $r[0]["network"]); + PortableContact::checkServer($r[0]["server_url"], $r[0]["network"]); q("UPDATE `gcontact` SET `last_failure` = '%s' WHERE `id` = %d", dbesc(datetime_convert()), intval($contact_id)); diff --git a/mod/allfriends.php b/mod/allfriends.php index 360c7d3c9..0a6989e4d 100644 --- a/mod/allfriends.php +++ b/mod/allfriends.php @@ -7,7 +7,6 @@ use Friendica\Core\System; use Friendica\Database\DBM; use Friendica\Model\GlobalContact; -require_once 'include/socgraph.php'; require_once 'include/Contact.php'; require_once 'include/contact_selectors.php'; require_once 'mod/contacts.php'; diff --git a/mod/contacts.php b/mod/contacts.php index 8da40152e..10a4f6b1b 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -8,7 +8,6 @@ use Friendica\Model\GlobalContact; use Friendica\Network\Probe; require_once 'include/Contact.php'; -require_once 'include/socgraph.php'; require_once 'include/contact_selectors.php'; require_once 'mod/proxy.php'; require_once 'include/Photo.php'; diff --git a/mod/dirfind.php b/mod/dirfind.php index e4e611699..84fe6f0ff 100644 --- a/mod/dirfind.php +++ b/mod/dirfind.php @@ -1,14 +1,16 @@ items_page = $perpage; $j->page = $a->pager['page']; foreach ($results AS $result) { - if (poco_alternate_ostatus_url($result["url"])) { + if (PortableContact::alternateOStatusUrl($result["url"])) { continue; } diff --git a/mod/hovercard.php b/mod/hovercard.php index f21db31f8..a5a41e263 100644 --- a/mod/hovercard.php +++ b/mod/hovercard.php @@ -12,7 +12,6 @@ use Friendica\App; use Friendica\Core\Config; use Friendica\Model\GlobalContact; -require_once "include/socgraph.php"; require_once "include/Contact.php"; function hovercard_init(App $a) { diff --git a/mod/item.php b/mod/item.php index 9a725bae4..400acfc97 100644 --- a/mod/item.php +++ b/mod/item.php @@ -1133,9 +1133,8 @@ function item_content(App $a) { * * @return boolean true if replaced, false if not replaced */ -function handle_tag(App $a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $network = "") { - require_once 'include/socgraph.php'; - +function handle_tag(App $a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $network = "") +{ $replaced = false; $r = null; $tag_type = '@'; diff --git a/mod/match.php b/mod/match.php index 2824e6b71..7258fd9c7 100644 --- a/mod/match.php +++ b/mod/match.php @@ -1,14 +1,15 @@ cmd; - $r = q("SELECT `pub_keywords`, `prv_keywords` FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1", + $r = q( + "SELECT `pub_keywords`, `prv_keywords` FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1", intval(local_user()) ); if (! DBM::is_result($r)) { return; } - if(! $r[0]['pub_keywords'] && (! $r[0]['prv_keywords'])) { - notice( t('No keywords to match. Please add keywords to your default profile.') . EOL); + if (! $r[0]['pub_keywords'] && (! $r[0]['prv_keywords'])) { + notice(t('No keywords to match. Please add keywords to your default profile.') . EOL); return; } $params = array(); $tags = trim($r[0]['pub_keywords'] . ' ' . $r[0]['prv_keywords']); - if($tags) { + if ($tags) { $params['s'] = $tags; - if($a->pager['page'] != 1) + if ($a->pager['page'] != 1) { $params['p'] = $a->pager['page']; + } - if(strlen(Config::get('system','directory'))) + if (strlen(Config::get('system', 'directory'))) { $x = post_url(get_server().'/msearch', $params); - else + } else { $x = post_url(System::baseUrl() . '/msearch', $params); + } $j = json_decode($x); - if($j->total) { + if ($j->total) { $a->set_pager_total($j->total); $a->set_pager_itemspage($j->items_page); } - if(count($j->results)) { - + if (count($j->results)) { $id = 0; - foreach($j->results as $jj) { + foreach ($j->results as $jj) { $match_nurl = normalise_link($jj->url); - $match = q("SELECT `nurl` FROM `contact` WHERE `uid` = '%d' AND nurl='%s' LIMIT 1", + $match = q( + "SELECT `nurl` FROM `contact` WHERE `uid` = '%d' AND nurl='%s' LIMIT 1", intval(local_user()), - dbesc($match_nurl)); + dbesc($match_nurl) + ); if (!count($match)) { $jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo); @@ -102,19 +108,18 @@ function match_content(App $a) { } } - $tpl = get_markup_template('viewcontact_template.tpl'); - - $o .= replace_macros($tpl,array( - '$title' => t('Profile Match'), - '$contacts' => $entries, - '$paginate' => paginate($a), - )); + $tpl = get_markup_template('viewcontact_template.tpl'); + $o .= replace_macros( + $tpl, + array( + '$title' => t('Profile Match'), + '$contacts' => $entries, + '$paginate' => paginate($a)) + ); + } else { + info(t('No matches') . EOL); } - else { - info( t('No matches') . EOL); - } - } return $o; diff --git a/mod/nogroup.php b/mod/nogroup.php index 048666328..e212b30dc 100644 --- a/mod/nogroup.php +++ b/mod/nogroup.php @@ -1,45 +1,44 @@ page,'aside')) { + if (! x($a->page, 'aside')) { $a->page['aside'] = ''; } - $a->page['aside'] .= group_side('contacts','group','extended',0,$contact_id); + $a->page['aside'] .= group_side('contacts', 'group', 'extended', 0, $contact_id); } - -function nogroup_content(App $a) { - +function nogroup_content(App $a) +{ if (! local_user()) { - notice( t('Permission denied.') . EOL); + notice(t('Permission denied.') . EOL); return ''; } - require_once('include/Contact.php'); + require_once 'include/Contact.php'; $r = contacts_not_grouped(local_user()); if (DBM::is_result($r)) { $a->set_pager_total($r[0]['total']); } - $r = contacts_not_grouped(local_user(),$a->pager['start'],$a->pager['itemspage']); + $r = contacts_not_grouped(local_user(), $a->pager['start'], $a->pager['itemspage']); if (DBM::is_result($r)) { foreach ($r as $rr) { - $contact_details = get_contact_details_by_url($rr['url'], local_user(), $rr); $contacts[] = array( @@ -64,12 +63,13 @@ function nogroup_content(App $a) { } $tpl = get_markup_template("nogroup-template.tpl"); - $o .= replace_macros($tpl, array( + $o .= replace_macros( + $tpl, + array( '$header' => t('Contacts who are not members of a group'), '$contacts' => $contacts, - '$paginate' => paginate($a), - )); + '$paginate' => paginate($a)) + ); return $o; - } diff --git a/mod/poco.php b/mod/poco.php index a32972f9e..2e2791fc1 100644 --- a/mod/poco.php +++ b/mod/poco.php @@ -7,6 +7,7 @@ use Friendica\App; use Friendica\Core\Cache; use Friendica\Core\Config; use Friendica\Database\DBM; +use Friendica\Protocol\PortableContact; function poco_init(App $a) { $system_mode = false; @@ -32,9 +33,8 @@ function poco_init(App $a) { $global = false; if ($a->argc > 1 && $a->argv[1] === '@server') { - require_once 'include/socgraph.php'; // List of all servers that this server knows - $ret = poco_serverlist(); + $ret = PortableContact::serverlist(); header('Content-type: application/json'); echo json_encode($ret); killme(); diff --git a/mod/profiles.php b/mod/profiles.php index f3e71491f..4263897d0 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -12,7 +12,6 @@ use Friendica\Model\GlobalContact; use Friendica\Network\Probe; require_once 'include/Contact.php'; -require_once 'include/socgraph.php'; function profiles_init(App $a) { @@ -755,7 +754,6 @@ function profiles_content(App $a) { return $o; } else { - // If we don't support multi profiles, don't display this list. if (!feature_enabled(local_user(), 'multi_profiles')) { $r = q("SELECT * FROM `profile` WHERE `uid` = %d AND `is-default`=1", diff --git a/mod/settings.php b/mod/settings.php index 296e8684c..e693f7759 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -1,14 +1,16 @@ entries) { foreach ($j->entries as $entry) { - poco_check_server($entry->url); + PortableContact::checkServer($entry->url); $url = $entry->url . '/poco'; if (! in_array($url, $done)) { @@ -591,7 +590,7 @@ class GlobalContact */ public static function fixAlternateContactAddress(&$contact) { - if (($contact["network"] == NETWORK_OSTATUS) && poco_alternate_ostatus_url($contact["url"])) { + if (($contact["network"] == NETWORK_OSTATUS) && PortableContact::alternateOStatusUrl($contact["url"])) { $data = Probe::uri($contact["url"]); if ($contact["network"] == NETWORK_OSTATUS) { logger("Fix primary url from ".$contact["url"]." to ".$data["url"]." - Called by: ".System::callstack(), LOGGER_DEBUG); diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 0788d36f4..86f009f31 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -24,7 +24,6 @@ use ostatus; require_once "include/Contact.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"; diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 758a23db8..0c0c3bb2f 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -27,7 +27,6 @@ require_once 'include/items.php'; require_once 'include/bb2diaspora.php'; require_once 'include/Contact.php'; require_once 'include/Photo.php'; -require_once 'include/socgraph.php'; require_once 'include/group.php'; require_once 'include/datetime.php'; require_once 'include/queue_fn.php'; diff --git a/src/Protocol/PortableContact.php b/src/Protocol/PortableContact.php index f884b0f28..f4f20dc08 100644 --- a/src/Protocol/PortableContact.php +++ b/src/Protocol/PortableContact.php @@ -17,6 +17,10 @@ use Friendica\Core\Worker; use Friendica\Database\DBM; use Friendica\Model\GlobalContact; use Friendica\Network\Probe; +use dba; +use DOMDocument; +use DomXPath; +use Exception; require_once 'include/datetime.php'; require_once 'include/network.php'; @@ -210,21 +214,21 @@ class PortableContact ); } - function poco_reachable($profile, $server = "", $network = "", $force = false) { - + public static function reachable($profile, $server = "", $network = "", $force = false) + { if ($server == "") { - $server = poco_detect_server($profile); + $server = self::detectServer($profile); } if ($server == "") { return true; } - return poco_check_server($server, $network, $force); + return self::checkServer($server, $network, $force); } - function poco_detect_server($profile) { - + public static function detectServer($profile) + { // Try to detect the server path based upon some known standard paths $server_url = ""; @@ -283,8 +287,11 @@ class PortableContact return ""; } - $r = q("SELECT `id` FROM `gserver` WHERE `nurl` = '%s' AND `last_contact` > `last_failure`", - dbesc(normalise_link($server_url))); + $r = q( + "SELECT `id` FROM `gserver` WHERE `nurl` = '%s' AND `last_contact` > `last_failure`", + dbesc(normalise_link($server_url)) + ); + if (DBM::is_result($r)) { return $server_url; } @@ -298,14 +305,17 @@ class PortableContact return $server_url; } - function poco_alternate_ostatus_url($url) { + public static function alternateOStatusUrl($url) + { return(preg_match("=https?://.+/user/\d+=ism", $url, $matches)); } - function poco_last_updated($profile, $force = false) { - - $gcontacts = q("SELECT * FROM `gcontact` WHERE `nurl` = '%s'", - dbesc(normalise_link($profile))); + public static function lastUpdated($profile, $force = false) + { + $gcontacts = q( + "SELECT * FROM `gcontact` WHERE `nurl` = '%s'", + dbesc(normalise_link($profile)) + ); if (!DBM::is_result($gcontacts)) { return false; @@ -318,7 +328,7 @@ class PortableContact } if ($force) { - $server_url = normalise_link(poco_detect_server($profile)); + $server_url = normalise_link(self::detectServer($profile)); } if (($server_url == '') && ($gcontacts[0]["server_url"] != "")) { @@ -326,7 +336,7 @@ class PortableContact } if (!$force && (($server_url == '') || ($gcontacts[0]["server_url"] == $gcontacts[0]["nurl"]))) { - $server_url = normalise_link(poco_detect_server($profile)); + $server_url = normalise_link(self::detectServer($profile)); } if (!in_array($gcontacts[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_FEED, NETWORK_OSTATUS, ""))) { @@ -335,10 +345,13 @@ class PortableContact } if ($server_url != "") { - if (!poco_check_server($server_url, $gcontacts[0]["network"], $force)) { + if (!self::checkServer($server_url, $gcontacts[0]["network"], $force)) { if ($force) { - q("UPDATE `gcontact` SET `last_failure` = '%s' WHERE `nurl` = '%s'", - dbesc(datetime_convert()), dbesc(normalise_link($profile))); + q( + "UPDATE `gcontact` SET `last_failure` = '%s' WHERE `nurl` = '%s'", + dbesc(datetime_convert()), + dbesc(normalise_link($profile)) + ); } logger("Profile ".$profile.": Server ".$server_url." wasn't reachable.", LOGGER_DEBUG); @@ -348,8 +361,10 @@ class PortableContact } if (in_array($gcontacts[0]["network"], array("", NETWORK_FEED))) { - $server = q("SELECT `network` FROM `gserver` WHERE `nurl` = '%s' AND `network` != ''", - dbesc(normalise_link($server_url))); + $server = q( + "SELECT `network` FROM `gserver` WHERE `nurl` = '%s' AND `network` != ''", + dbesc(normalise_link($server_url)) + ); if ($server) { $contact['network'] = $server[0]["network"]; @@ -360,7 +375,6 @@ class PortableContact // noscrape is really fast so we don't cache the call. if (($server_url != "") && ($gcontacts[0]["nick"] != "")) { - // Use noscrape if possible $server = q("SELECT `noscrape`, `network` FROM `gserver` WHERE `nurl` = '%s' AND `noscrape` != ''", dbesc(normalise_link($server_url))); @@ -368,7 +382,6 @@ class PortableContact $noscraperet = z_fetch_url($server[0]["noscrape"]."/".$gcontacts[0]["nick"]); if ($noscraperet["success"] && ($noscraperet["body"] != "")) { - $noscrape = json_decode($noscraperet["body"], true); if (is_array($noscrape)) { @@ -418,8 +431,11 @@ class PortableContact GlobalContact::update($contact); if (trim($noscrape["updated"]) != "") { - q("UPDATE `gcontact` SET `last_contact` = '%s' WHERE `nurl` = '%s'", - dbesc(datetime_convert()), dbesc(normalise_link($profile))); + q( + "UPDATE `gcontact` SET `last_contact` = '%s' WHERE `nurl` = '%s'", + dbesc(datetime_convert()), + dbesc(normalise_link($profile)) + ); logger("Profile ".$profile." was last updated at ".$noscrape["updated"]." (noscrape)", LOGGER_DEBUG); @@ -431,7 +447,7 @@ class PortableContact } // If we only can poll the feed, then we only do this once a while - if (!$force && !poco_do_update($gcontacts[0]["created"], $gcontacts[0]["updated"], $gcontacts[0]["last_failure"], $gcontacts[0]["last_contact"])) { + if (!$force && !self::updateNeeded($gcontacts[0]["created"], $gcontacts[0]["updated"], $gcontacts[0]["last_failure"], $gcontacts[0]["last_contact"])) { logger("Profile ".$profile." was last updated at ".$gcontacts[0]["updated"]." (cached)", LOGGER_DEBUG); GlobalContact::update($contact); @@ -442,7 +458,7 @@ class PortableContact // Is the profile link the alternate OStatus link notation? (http://domain.tld/user/4711) // Then check the other link and delete this one - if (($data["network"] == NETWORK_OSTATUS) && poco_alternate_ostatus_url($profile) + if (($data["network"] == NETWORK_OSTATUS) && self::alternateOStatusUrl($profile) && (normalise_link($profile) == normalise_link($data["alias"])) && (normalise_link($profile) != normalise_link($data["url"])) ) { @@ -458,7 +474,7 @@ class PortableContact $gcontact = GlobalContact::sanitize($gcontact); GlobalContact::update($gcontact); - poco_last_updated($data["url"], $force); + self::lastUpdated($data["url"], $force); } catch (Exception $e) { logger($e->getMessage(), LOGGER_DEBUG); } @@ -468,8 +484,11 @@ class PortableContact } if (($data["poll"] == "") || (in_array($data["network"], array(NETWORK_FEED, NETWORK_PHANTOM)))) { - q("UPDATE `gcontact` SET `last_failure` = '%s' WHERE `nurl` = '%s'", - dbesc(datetime_convert()), dbesc(normalise_link($profile))); + q( + "UPDATE `gcontact` SET `last_failure` = '%s' WHERE `nurl` = '%s'", + dbesc(datetime_convert()), + dbesc(normalise_link($profile)) + ); logger("Profile ".$profile." wasn't reachable (profile)", LOGGER_DEBUG); return false; @@ -484,8 +503,11 @@ class PortableContact $feedret = z_fetch_url($data["poll"]); if (!$feedret["success"]) { - q("UPDATE `gcontact` SET `last_failure` = '%s' WHERE `nurl` = '%s'", - dbesc(datetime_convert()), dbesc(normalise_link($profile))); + q( + "UPDATE `gcontact` SET `last_failure` = '%s' WHERE `nurl` = '%s'", + dbesc(datetime_convert()), + dbesc(normalise_link($profile)) + ); logger("Profile ".$profile." wasn't reachable (no feed)", LOGGER_DEBUG); return false; @@ -518,12 +540,18 @@ class PortableContact $last_updated = NULL_DATE; } } - q("UPDATE `gcontact` SET `updated` = '%s', `last_contact` = '%s' WHERE `nurl` = '%s'", - dbesc(DBM::date($last_updated)), dbesc(DBM::date()), dbesc(normalise_link($profile))); + q( + "UPDATE `gcontact` SET `updated` = '%s', `last_contact` = '%s' WHERE `nurl` = '%s'", + dbesc(DBM::date($last_updated)), + dbesc(DBM::date()), + dbesc(normalise_link($profile)) + ); if (($gcontacts[0]["generation"] == 0)) { - q("UPDATE `gcontact` SET `generation` = 9 WHERE `nurl` = '%s'", - dbesc(normalise_link($profile))); + q( + "UPDATE `gcontact` SET `generation` = 9 WHERE `nurl` = '%s'", + dbesc(normalise_link($profile)) + ); } logger("Profile ".$profile." was last updated at ".$last_updated, LOGGER_DEBUG); @@ -531,7 +559,8 @@ class PortableContact return($last_updated); } - function poco_do_update($created, $updated, $last_failure, $last_contact) { + public static function updateNeeded($created, $updated, $last_failure, $last_contact) + { $now = strtotime(datetime_convert()); if ($updated > $last_contact) { @@ -575,7 +604,8 @@ class PortableContact return true; } - function poco_to_boolean($val) { + public static function toBoolean($val) + { if (($val == "true") || ($val == 1)) { return true; } elseif (($val == "false") || ($val == 0)) { @@ -591,7 +621,8 @@ class PortableContact * @param object $data POCO data * @return array Server data */ - function poco_detect_poco_data($data) { + public static function detectPocoData($data) + { $server = false; if (!isset($data->entry)) { @@ -627,7 +658,8 @@ class PortableContact * @param string $server_url address of the server * @return array Server data */ - function poco_fetch_nodeinfo($server_url) { + public static function fetchNodeinfo($server_url) + { $serverret = z_fetch_url($server_url."/.well-known/nodeinfo"); if (!$serverret["success"]) { return false; @@ -734,7 +766,8 @@ class PortableContact * @param string $body Front page of the server * @return array Server data */ - function poco_detect_server_type($body) { + public static function detectServerType($body) + { $server = false; $doc = new DOMDocument(); @@ -790,8 +823,8 @@ class PortableContact return $server; } - function poco_check_server($server_url, $network = "", $force = false) { - + public static function checkServer($server_url, $network = "", $force = false) + { // Unify the server address $server_url = trim($server_url, "/"); $server_url = str_replace("/index.php", "", $server_url); @@ -802,10 +835,12 @@ class PortableContact $servers = q("SELECT * FROM `gserver` WHERE `nurl` = '%s'", dbesc(normalise_link($server_url))); if (DBM::is_result($servers)) { - if ($servers[0]["created"] <= NULL_DATE) { - q("UPDATE `gserver` SET `created` = '%s' WHERE `nurl` = '%s'", - dbesc(datetime_convert()), dbesc(normalise_link($server_url))); + q( + "UPDATE `gserver` SET `created` = '%s' WHERE `nurl` = '%s'", + dbesc(datetime_convert()), + dbesc(normalise_link($server_url)) + ); } $poco = $servers[0]["poco"]; $noscrape = $servers[0]["noscrape"]; @@ -822,7 +857,7 @@ class PortableContact $info = $servers[0]["info"]; $register_policy = $servers[0]["register_policy"]; - if (!$force && !poco_do_update($servers[0]["created"], "", $last_failure, $last_contact)) { + if (!$force && !self::updateNeeded($servers[0]["created"], "", $last_failure, $last_contact)) { logger("Use cached data for server ".$server_url, LOGGER_DEBUG); return ($last_contact >= $last_failure); } @@ -862,7 +897,7 @@ class PortableContact } // Maybe the page is unencrypted only? - $xmlobj = @simplexml_load_string($serverret["body"],'SimpleXMLElement',0, "http://docs.oasis-open.org/ns/xri/xrd-1.0"); + $xmlobj = @simplexml_load_string($serverret["body"], 'SimpleXMLElement', 0, "http://docs.oasis-open.org/ns/xri/xrd-1.0"); if (!$serverret["success"] || ($serverret["body"] == "") || (@sizeof($xmlobj) == 0) || !is_object($xmlobj)) { $server_url = str_replace("https://", "http://", $server_url); @@ -876,7 +911,7 @@ class PortableContact return false; } - $xmlobj = @simplexml_load_string($serverret["body"],'SimpleXMLElement',0, "http://docs.oasis-open.org/ns/xri/xrd-1.0"); + $xmlobj = @simplexml_load_string($serverret["body"], 'SimpleXMLElement', 0, "http://docs.oasis-open.org/ns/xri/xrd-1.0"); } if (!$serverret["success"] || ($serverret["body"] == "") || (sizeof($xmlobj) == 0) || !is_object($xmlobj)) { @@ -903,7 +938,7 @@ class PortableContact $data = json_decode($serverret["body"]); if (isset($data->totalResults)) { $poco = $server_url."/poco"; - $server = poco_detect_poco_data($data); + $server = self::detectPocoData($data); if ($server) { $platform = $server['platform']; $network = $server['network']; @@ -921,7 +956,7 @@ class PortableContact if (!$serverret["success"] || ($serverret["body"] == "")) { $failure = true; } else { - $server = poco_detect_server_type($serverret["body"]); + $server = self::detectServerType($serverret["body"]); if ($server) { $platform = $server['platform']; $network = $server['network']; @@ -929,11 +964,11 @@ class PortableContact $site_name = $server['site_name']; } - $lines = explode("\n",$serverret["header"]); + $lines = explode("\n", $serverret["header"]); if (count($lines)) { - foreach($lines as $line) { + foreach ($lines as $line) { $line = trim($line); - if (stristr($line,'X-Diaspora-Version:')) { + if (stristr($line, 'X-Diaspora-Version:')) { $platform = "Diaspora"; $version = trim(str_replace("X-Diaspora-Version:", "", $line)); $version = trim(str_replace("x-diaspora-version:", "", $version)); @@ -942,7 +977,7 @@ class PortableContact $version = $versionparts[0]; } - if (stristr($line,'Server: Mastodon')) { + if (stristr($line, 'Server: Mastodon')) { $platform = "Mastodon"; $network = NETWORK_OSTATUS; } @@ -1059,9 +1094,9 @@ class PortableContact $site_name = $data->site->name; - $data->site->closed = poco_to_boolean($data->site->closed); - $data->site->private = poco_to_boolean($data->site->private); - $data->site->inviteonly = poco_to_boolean($data->site->inviteonly); + $data->site->closed = self::toBoolean($data->site->closed); + $data->site->private = self::toBoolean($data->site->private); + $data->site->inviteonly = self::toBoolean($data->site->inviteonly); if (!$data->site->closed && !$data->site->private and $data->site->inviteonly) { $register_policy = REGISTER_APPROVE; @@ -1109,7 +1144,7 @@ class PortableContact // Query nodeinfo. Working for (at least) Diaspora and Friendica. if (!$failure) { - $server = poco_fetch_nodeinfo($server_url); + $server = self::fetchNodeinfo($server_url); if ($server) { $register_policy = $server['register_policy']; @@ -1195,7 +1230,8 @@ class PortableContact $platform = strip_tags($platform); if ($servers) { - q("UPDATE `gserver` SET `url` = '%s', `version` = '%s', `site_name` = '%s', `info` = '%s', `register_policy` = %d, `poco` = '%s', `noscrape` = '%s', + q( + "UPDATE `gserver` SET `url` = '%s', `version` = '%s', `site_name` = '%s', `info` = '%s', `register_policy` = %d, `poco` = '%s', `noscrape` = '%s', `network` = '%s', `platform` = '%s', `last_contact` = '%s', `last_failure` = '%s' WHERE `nurl` = '%s'", dbesc($server_url), dbesc($version), @@ -1211,22 +1247,23 @@ class PortableContact dbesc(normalise_link($server_url)) ); } elseif (!$failure) { - q("INSERT INTO `gserver` (`url`, `nurl`, `version`, `site_name`, `info`, `register_policy`, `poco`, `noscrape`, `network`, `platform`, `created`, `last_contact`, `last_failure`) + q( + "INSERT INTO `gserver` (`url`, `nurl`, `version`, `site_name`, `info`, `register_policy`, `poco`, `noscrape`, `network`, `platform`, `created`, `last_contact`, `last_failure`) VALUES ('%s', '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s')", - dbesc($server_url), - dbesc(normalise_link($server_url)), - dbesc($version), - dbesc($site_name), - dbesc($info), - intval($register_policy), - dbesc($poco), - dbesc($noscrape), - dbesc($network), - dbesc($platform), - dbesc(datetime_convert()), - dbesc($last_contact), - dbesc($last_failure), - dbesc(datetime_convert()) + dbesc($server_url), + dbesc(normalise_link($server_url)), + dbesc($version), + dbesc($site_name), + dbesc($info), + intval($register_policy), + dbesc($poco), + dbesc($noscrape), + dbesc($network), + dbesc($platform), + dbesc(datetime_convert()), + dbesc($last_contact), + dbesc($last_failure), + dbesc(datetime_convert()) ); } logger("End discovery for server " . $server_url, LOGGER_DEBUG); @@ -1238,12 +1275,18 @@ class PortableContact * @brief Returns a list of all known servers * @return array List of server urls */ - function poco_serverlist() { - $r = q("SELECT `url`, `site_name` AS `displayName`, `network`, `platform`, `version` FROM `gserver` + public static function serverlist() + { + $r = q( + "SELECT `url`, `site_name` AS `displayName`, `network`, `platform`, `version` FROM `gserver` WHERE `network` IN ('%s', '%s', '%s') AND `last_contact` > `last_failure` ORDER BY `last_contact` LIMIT 1000", - dbesc(NETWORK_DFRN), dbesc(NETWORK_DIASPORA), dbesc(NETWORK_OSTATUS)); + dbesc(NETWORK_DFRN), + dbesc(NETWORK_DIASPORA), + dbesc(NETWORK_OSTATUS) + ); + if (!DBM::is_result($r)) { return false; } @@ -1256,7 +1299,8 @@ class PortableContact * * @param string $poco URL to the POCO endpoint */ - function poco_fetch_serverlist($poco) { + public static function fetchServerlist($poco) + { $serverret = z_fetch_url($poco."/@server"); if (!$serverret["success"]) { return; @@ -1278,8 +1322,9 @@ class PortableContact } } - function poco_discover_federation() { - $last = Config::get('poco','last_federation_discovery'); + public static function discoverFederation() + { + $last = Config::get('poco', 'last_federation_discovery'); if ($last) { $next = $last + (24 * 60 * 60); @@ -1300,7 +1345,7 @@ class PortableContact } // Disvover Mastodon servers - if (!Config::get('system','ostatus_disabled')) { + if (!Config::get('system', 'ostatus_disabled')) { $serverdata = fetch_url("https://instances.mastodon.xyz/instances.json"); if ($serverdata) { @@ -1324,14 +1369,15 @@ class PortableContact // $servers = json_decode($result["body"]); // foreach($servers->data as $server) - // poco_check_server($server->instance_address); + // self::checkServer($server->instance_address); // } //} - Config::set('poco','last_federation_discovery', time()); + Config::set('poco', 'last_federation_discovery', time()); } - function poco_discover_single_server($id) { + public static function discoverSingleServer($id) + { $r = q("SELECT `poco`, `nurl`, `url`, `network` FROM `gserver` WHERE `id` = %d", intval($id)); if (!DBM::is_result($r)) { return false; @@ -1340,7 +1386,7 @@ class PortableContact $server = $r[0]; // Discover new servers out there (Works from Friendica version 3.5.2) - poco_fetch_serverlist($server["poco"]); + self::fetchServerlist($server["poco"]); // Fetch all users from the other server $url = $server["poco"]."/?fields=displayName,urls,photos,updated,network,aboutMe,currentLocation,tags,gender,contactType,generation"; @@ -1351,11 +1397,10 @@ class PortableContact if ($retdata["success"]) { $data = json_decode($retdata["body"]); - poco_discover_server($data, 2); + self::discoverServer($data, 2); - if (Config::get('system','poco_discovery') > 1) { - - $timeframe = Config::get('system','poco_discovery_since'); + if (Config::get('system', 'poco_discovery') > 1) { + $timeframe = Config::get('system', 'poco_discovery_since'); if ($timeframe == 0) { $timeframe = 30; } @@ -1370,12 +1415,12 @@ class PortableContact $retdata = z_fetch_url($url); if ($retdata["success"]) { logger("Fetch all global contacts from the server ".$server["nurl"], LOGGER_DEBUG); - $success = poco_discover_server(json_decode($retdata["body"])); + $success = self::discoverServer(json_decode($retdata["body"])); } - if (!$success && (Config::get('system','poco_discovery') > 2)) { + if (!$success && (Config::get('system', 'poco_discovery') > 2)) { logger("Fetch contacts from users of the server ".$server["nurl"], LOGGER_DEBUG); - poco_discover_server_users($data, $server); + self::discoverServerUsers($data, $server); } } @@ -1384,7 +1429,7 @@ class PortableContact return true; } else { // If the server hadn't replied correctly, then force a sanity check - poco_check_server($server["url"], $server["network"], true); + self::checkServer($server["url"], $server["network"], true); // If we couldn't reach the server, we will try it some time later q("UPDATE `gserver` SET `last_poco_query` = '%s' WHERE `nurl` = '%s'", dbesc(datetime_convert()), dbesc($server["nurl"])); @@ -1393,10 +1438,10 @@ class PortableContact } } - function poco_discover($complete = false) { - + public static function discover($complete = false) + { // Update the server list - poco_discover_federation(); + self::discoverFederation(); $no_of_queries = 5; @@ -1410,8 +1455,7 @@ class PortableContact $r = q("SELECT `id`, `url`, `network` FROM `gserver` WHERE `last_contact` >= `last_failure` AND `poco` != '' AND `last_poco_query` < '%s' ORDER BY RAND()", dbesc($last_update)); if (DBM::is_result($r)) { foreach ($r as $server) { - - if (!poco_check_server($server["url"], $server["network"])) { + if (!self::checkServer($server["url"], $server["network"])) { // The server is not reachable? Okay, then we will try it later q("UPDATE `gserver` SET `last_poco_query` = '%s' WHERE `nurl` = '%s'", dbesc(datetime_convert()), dbesc($server["nurl"])); continue; @@ -1427,8 +1471,8 @@ class PortableContact } } - function poco_discover_server_users($data, $server) { - + public static function discoverServerUsers($data, $server) + { if (!isset($data->entry)) { return; } @@ -1452,14 +1496,14 @@ class PortableContact $retdata = z_fetch_url($url); if ($retdata["success"]) { - poco_discover_server(json_decode($retdata["body"]), 3); + self::discoverServer(json_decode($retdata["body"]), 3); } } } } - function poco_discover_server($data, $default_generation = 0) { - + public static function discoverServer($data, $default_generation = 0) + { if (!isset($data->entry) || !count($data->entry)) { return false; } @@ -1524,11 +1568,11 @@ class PortableContact $gender = $entry->gender; } - if(isset($entry->generation) && ($entry->generation > 0)) { + if (isset($entry->generation) && ($entry->generation > 0)) { $generation = ++$entry->generation; } - if(isset($entry->contactType) && ($entry->contactType >= 0)) { + if (isset($entry->contactType) && ($entry->contactType >= 0)) { $contact_type = $entry->contactType; } diff --git a/src/Worker/OnePoll.php b/src/Worker/OnePoll.php index e4d58f66a..11e7d30c3 100644 --- a/src/Worker/OnePoll.php +++ b/src/Worker/OnePoll.php @@ -1,4 +1,7 @@ $last_updated, 'last-update' => $updated, 'success_update' => $updated); @@ -117,7 +120,7 @@ Class OnePoll // Update the contact entry if (($contact['network'] === NETWORK_OSTATUS) || ($contact['network'] === NETWORK_DIASPORA) || ($contact['network'] === NETWORK_DFRN)) { - if (!poco_reachable($contact['url'])) { + if (!PortableContact::reachable($contact['url'])) { logger("Skipping probably dead contact ".$contact['url']); return; } diff --git a/view/theme/vier/theme.php b/view/theme/vier/theme.php index 525bbe9d9..40d4d9c73 100644 --- a/view/theme/vier/theme.php +++ b/view/theme/vier/theme.php @@ -17,7 +17,6 @@ use Friendica\Database\DBM; use Friendica\Model\GlobalContact; require_once "include/plugin.php"; -require_once "include/socgraph.php"; require_once "mod/proxy.php"; function vier_init(App $a) { From 790d80c9fbe069804bfe3148d2a99007e422f39f Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Wed, 15 Nov 2017 11:49:20 -0500 Subject: [PATCH 012/175] Missed function call update update_gcontact -> update --- src/Protocol/PortableContact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Protocol/PortableContact.php b/src/Protocol/PortableContact.php index f4f20dc08..826d92159 100644 --- a/src/Protocol/PortableContact.php +++ b/src/Protocol/PortableContact.php @@ -1602,7 +1602,7 @@ class PortableContact try { $gcontact = GlobalContact::sanitize($gcontact); - update_gcontact($gcontact); + GlobalContact::update($gcontact); } catch (Exception $e) { logger($e->getMessage(), LOGGER_DEBUG); } From 326c4a18c0af66728532355f7f03464835a08d29 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Wed, 15 Nov 2017 11:51:29 -0500 Subject: [PATCH 013/175] Missing Worker use Friendica\Core\Worker --- src/Model/GlobalContact.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Model/GlobalContact.php b/src/Model/GlobalContact.php index 21ac0d60e..639c8272d 100644 --- a/src/Model/GlobalContact.php +++ b/src/Model/GlobalContact.php @@ -7,6 +7,7 @@ namespace Friendica\Model; use Friendica\Core\Config; use Friendica\Core\System; +use Friendica\Core\Worker; use Friendica\Database\DBM; use Friendica\Network\Probe; use Friendica\Protocol\PortableContact; From 9e90589c211e83d281b09b9ccc26f024beb95c7a Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Wed, 15 Nov 2017 12:02:08 -0500 Subject: [PATCH 014/175] gsFunctions renamed gsFetchUsers -> fetchGsUsers gsDiscover -> discoverGsUsers --- include/discover_poco.php | 2 +- src/Model/GlobalContact.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/discover_poco.php b/include/discover_poco.php index 3e374de94..fd72d6940 100644 --- a/include/discover_poco.php +++ b/include/discover_poco.php @@ -98,7 +98,7 @@ function discover_poco_run(&$argv, &$argc) // Query GNU Social servers for their users ("statistics" addon has to be enabled on the GS server) if (!Config::get('system', 'ostatus_disabled')) { - GlobalContact::gsDiscover(); + GlobalContact::discoverGsUsers(); } } diff --git a/src/Model/GlobalContact.php b/src/Model/GlobalContact.php index 639c8272d..2e16c687f 100644 --- a/src/Model/GlobalContact.php +++ b/src/Model/GlobalContact.php @@ -924,7 +924,7 @@ class GlobalContact * * @param str $server Server address */ - public static function gsFetchUsers($server) + public static function fetchGsUsers($server) { logger("Fetching users from GNU Social server ".$server, LOGGER_DEBUG); @@ -980,7 +980,7 @@ class GlobalContact * @brief Asking GNU Social server on a regular base for their user data * */ - public static function gsDiscover() + public static function discoverGsUsers() { $requery_days = intval(Config::get("system", "poco_requery_days")); @@ -997,7 +997,7 @@ class GlobalContact } foreach ($r as $server) { - self::gsFetchUsers($server["url"]); + self::fetchGsUsers($server["url"]); q("UPDATE `gserver` SET `last_poco_query` = '%s' WHERE `nurl` = '%s'", dbesc(datetime_convert()), dbesc($server["nurl"])); } } From 33e98d6264af1234bd37717d8ced7fdb34732353 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 15 Nov 2017 20:59:42 +0000 Subject: [PATCH 015/175] Moved some workers in their new habitat --- include/checkversion.php => src/Worker/CheckVersion.php | 0 include/tagupdate.php => src/Worker/TagUpdate.php | 0 include/threadupdate.php => src/Worker/ThreadUpdate.php | 0 include/update_gcontact.php => src/Worker/UpdateGContact.php | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename include/checkversion.php => src/Worker/CheckVersion.php (100%) rename include/tagupdate.php => src/Worker/TagUpdate.php (100%) rename include/threadupdate.php => src/Worker/ThreadUpdate.php (100%) rename include/update_gcontact.php => src/Worker/UpdateGContact.php (100%) diff --git a/include/checkversion.php b/src/Worker/CheckVersion.php similarity index 100% rename from include/checkversion.php rename to src/Worker/CheckVersion.php diff --git a/include/tagupdate.php b/src/Worker/TagUpdate.php similarity index 100% rename from include/tagupdate.php rename to src/Worker/TagUpdate.php diff --git a/include/threadupdate.php b/src/Worker/ThreadUpdate.php similarity index 100% rename from include/threadupdate.php rename to src/Worker/ThreadUpdate.php diff --git a/include/update_gcontact.php b/src/Worker/UpdateGContact.php similarity index 100% rename from include/update_gcontact.php rename to src/Worker/UpdateGContact.php From 0aee6d383a4b53535ec6bf40168ab917b03527b2 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 15 Nov 2017 21:12:33 +0000 Subject: [PATCH 016/175] Now there are four more ... --- include/Contact.php | 2 +- src/Worker/CheckVersion.php | 55 +++++++------- src/Worker/Cron.php | 2 +- src/Worker/TagUpdate.php | 8 +- src/Worker/ThreadUpdate.php | 10 ++- src/Worker/UpdateGContact.php | 136 +++++++++++++++++----------------- update.php | 4 +- 7 files changed, 113 insertions(+), 104 deletions(-) diff --git a/include/Contact.php b/include/Contact.php index cd77bb3bb..3fa2410fb 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -308,7 +308,7 @@ function get_contact_details_by_url($url, $uid = -1, $default = array()) { if ((($profile["addr"] == "") || ($profile["name"] == "")) && ($profile["gid"] != 0) && in_array($profile["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) { - Worker::add(PRIORITY_LOW, "update_gcontact", $profile["gid"]); + Worker::add(PRIORITY_LOW, "UpdateGContact", $profile["gid"]); } // Show contact details of Diaspora contacts only if connected diff --git a/src/Worker/CheckVersion.php b/src/Worker/CheckVersion.php index 7d3c2de6f..b7e99cb67 100644 --- a/src/Worker/CheckVersion.php +++ b/src/Worker/CheckVersion.php @@ -1,10 +1,11 @@ 1) && (intval($argv[1]))) { - $contact_id = intval($argv[1]); + if (empty($contact_id)) { + logger('update_gcontact: no contact'); + return; + } + + $r = q("SELECT * FROM `gcontact` WHERE `id` = %d", intval($contact_id)); + + if (!DBM::is_result($r)) { + return; + } + + if (!in_array($r[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) { + return; + } + + $data = Probe::uri($r[0]["url"]); + + if (!in_array($data["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) { + if ($r[0]["server_url"] != "") + PortableContact::checkServer($r[0]["server_url"], $r[0]["network"]); + + q("UPDATE `gcontact` SET `last_failure` = '%s' WHERE `id` = %d", + dbesc(datetime_convert()), intval($contact_id)); + return; + } + + if (($data["name"] == "") && ($r[0]['name'] != "")) + $data["name"] = $r[0]['name']; + + if (($data["nick"] == "") && ($r[0]['nick'] != "")) + $data["nick"] = $r[0]['nick']; + + if (($data["addr"] == "") && ($r[0]['addr'] != "")) + $data["addr"] = $r[0]['addr']; + + if (($data["photo"] == "") && ($r[0]['photo'] != "")) + $data["photo"] = $r[0]['photo']; + + + q("UPDATE `gcontact` SET `name` = '%s', `nick` = '%s', `addr` = '%s', `photo` = '%s' + WHERE `id` = %d", + dbesc($data["name"]), + dbesc($data["nick"]), + dbesc($data["addr"]), + dbesc($data["photo"]), + intval($contact_id) + ); + + q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `addr` = '%s', `photo` = '%s' + WHERE `uid` = 0 AND `addr` = '' AND `nurl` = '%s'", + dbesc($data["name"]), + dbesc($data["nick"]), + dbesc($data["addr"]), + dbesc($data["photo"]), + dbesc(normalise_link($data["url"])) + ); + + q("UPDATE `contact` SET `addr` = '%s' + WHERE `uid` != 0 AND `addr` = '' AND `nurl` = '%s'", + dbesc($data["addr"]), + dbesc(normalise_link($data["url"])) + ); } - - if (!$contact_id) { - logger('update_gcontact: no contact'); - return; - } - - $r = q("SELECT * FROM `gcontact` WHERE `id` = %d", intval($contact_id)); - - if (!DBM::is_result($r)) { - return; - } - - if (!in_array($r[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) { - return; - } - - $data = Probe::uri($r[0]["url"]); - - if (!in_array($data["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) { - if ($r[0]["server_url"] != "") - PortableContact::checkServer($r[0]["server_url"], $r[0]["network"]); - - q("UPDATE `gcontact` SET `last_failure` = '%s' WHERE `id` = %d", - dbesc(datetime_convert()), intval($contact_id)); - return; - } - - if (($data["name"] == "") && ($r[0]['name'] != "")) - $data["name"] = $r[0]['name']; - - if (($data["nick"] == "") && ($r[0]['nick'] != "")) - $data["nick"] = $r[0]['nick']; - - if (($data["addr"] == "") && ($r[0]['addr'] != "")) - $data["addr"] = $r[0]['addr']; - - if (($data["photo"] == "") && ($r[0]['photo'] != "")) - $data["photo"] = $r[0]['photo']; - - - q("UPDATE `gcontact` SET `name` = '%s', `nick` = '%s', `addr` = '%s', `photo` = '%s' - WHERE `id` = %d", - dbesc($data["name"]), - dbesc($data["nick"]), - dbesc($data["addr"]), - dbesc($data["photo"]), - intval($contact_id) - ); - - q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `addr` = '%s', `photo` = '%s' - WHERE `uid` = 0 AND `addr` = '' AND `nurl` = '%s'", - dbesc($data["name"]), - dbesc($data["nick"]), - dbesc($data["addr"]), - dbesc($data["photo"]), - dbesc(normalise_link($data["url"])) - ); - - q("UPDATE `contact` SET `addr` = '%s' - WHERE `uid` != 0 AND `addr` = '' AND `nurl` = '%s'", - dbesc($data["addr"]), - dbesc(normalise_link($data["url"])) - ); } diff --git a/update.php b/update.php index 0b482535d..5cf9bbc2d 100644 --- a/update.php +++ b/update.php @@ -1601,7 +1601,7 @@ function update_1169() { if (!$r) return UPDATE_FAILED; - Worker::add(PRIORITY_LOW, "threadupdate"); + Worker::add(PRIORITY_LOW, "ThreadUpdate"); return UPDATE_SUCCESS; } @@ -1650,7 +1650,7 @@ function update_1178() { function update_1180() { // Fill the new fields in the term table. - Worker::add(PRIORITY_LOW, "tagupdate"); + Worker::add(PRIORITY_LOW, "TagUpdate"); return UPDATE_SUCCESS; } From cd12de46f8a63106d5ddde7a4008f7fad11eabad Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Wed, 15 Nov 2017 23:09:11 -0500 Subject: [PATCH 017/175] OStatus moved to src OStatus moved to Friendica\Protocol namespace. References and function calls updated. Related to #3878 --- include/Contact.php | 10 +- include/follow.php | 4 +- include/items.php | 8 +- include/notifier.php | 4 +- include/pubsubpublish.php | 13 +- mod/dfrn_poll.php | 12 +- mod/salmon.php | 18 +-- src/Protocol/DFRN.php | 4 +- .../ostatus.php => src/Protocol/OStatus.php | 135 +++++++++--------- 9 files changed, 110 insertions(+), 98 deletions(-) rename include/ostatus.php => src/Protocol/OStatus.php (94%) diff --git a/include/Contact.php b/include/Contact.php index 3fa2410fb..5d34e4526 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -1,5 +1,7 @@ 1) { @@ -47,7 +50,7 @@ function handle_pubsubhubbub($id) { logger("Generate feed of user ".$rr['nickname']." to ".$rr['callback_url']." - last updated ".$rr['last_update'], LOGGER_DEBUG); $last_update = $rr['last_update']; - $params = ostatus::feed($a, $rr['nickname'], $last_update); + $params = OStatus::feed($a, $rr['nickname'], $last_update); if (!$params) { return; diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index 0e967301e..1e0724287 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -1,14 +1,16 @@ argc > 1) && ($dfrn_id == '') && !strstr($_SERVER["HTTP_USER_AGENT"], 'Friendica')) { $nickname = $a->argv[1]; header("Content-type: application/atom+xml"); - echo ostatus::feed($a, $nickname, $last_update, 10); + echo OStatus::feed($a, $nickname, $last_update, 10); killme(); } diff --git a/mod/salmon.php b/mod/salmon.php index e664946bb..919204a48 100644 --- a/mod/salmon.php +++ b/mod/salmon.php @@ -1,14 +1,16 @@ "salmon", "href" => System::baseUrl()."/salmon/".$owner["nick"]); XML::add_element($doc, $root, "link", "", $attributes); diff --git a/include/ostatus.php b/src/Protocol/OStatus.php similarity index 94% rename from include/ostatus.php rename to src/Protocol/OStatus.php index 5df956b2c..4ae9020f4 100644 --- a/include/ostatus.php +++ b/src/Protocol/OStatus.php @@ -1,7 +1,8 @@ evaluate('atom:author/atom:uri/text()', $context)->item(0)->nodeValue; @@ -241,7 +245,7 @@ class ostatus * * @return array Array of author related entries for the item */ - public static function salmon_author($xml, $importer) + public static function salmonAuthor($xml, $importer) { if ($xml == "") { return; @@ -264,7 +268,7 @@ class ostatus foreach ($entries as $entry) { // fetch the author - $author = self::fetchauthor($xpath, $entry, $importer, $contact, true); + $author = self::fetchAuthor($xpath, $entry, $importer, $contact, true); return $author; } } @@ -276,7 +280,7 @@ class ostatus * * @return array attributes */ - private static function read_attributes($element) + private static function readAttributes($element) { $attribute = array(); @@ -380,7 +384,7 @@ class ostatus // Fetch the first author $authordata = $xpath->query('//author')->item(0); - $author = self::fetchauthor($xpath, $authordata, $importer, $contact, $stored); + $author = self::fetchAuthor($xpath, $authordata, $importer, $contact, $stored); $entry = $xpath->query('/atom:entry'); @@ -400,7 +404,7 @@ class ostatus } if ($authorelement->length > 0) { - $author = self::fetchauthor($xpath, $entry, $importer, $contact, $stored); + $author = self::fetchAuthor($xpath, $entry, $importer, $contact, $stored); } $value = $xpath->evaluate('atom:author/poco:preferredUsername/text()', $entry)->item(0)->nodeValue; @@ -542,7 +546,8 @@ class ostatus return; } - // Currently we don't have a central deletion function that we could use in this case. The function "item_drop" doesn't work for that case + // Currently we don't have a central deletion function that we could use in this case + // The function "item_drop" doesn't work for that case dba::update( 'item', array('deleted' => true, 'title' => '', 'body' => '', @@ -735,7 +740,7 @@ class ostatus $links = $xpath->query('//link'); if ($links) { foreach ($links as $link) { - $attribute = ostatus::read_attributes($link); + $attribute = self::readAttributes($link); if (($attribute['rel'] == 'alternate') && ($attribute['type'] == 'application/atom+xml')) { $file = $attribute['href']; } @@ -924,7 +929,7 @@ class ostatus $links = $xpath->query('//link'); if ($links) { foreach ($links as $link) { - $attribute = self::read_attributes($link); + $attribute = self::readAttributes($link); if (($attribute['rel'] == 'alternate') && ($attribute['type'] == 'application/atom+xml')) { $atom_file = $attribute['href']; } @@ -952,7 +957,7 @@ class ostatus // Even more worse workaround for GNU Social ;-) if ($xml == '') { - $related_guess = ostatus::convert_href($related_uri); + $related_guess = OStatus::convertHref($related_uri); $related_atom = z_fetch_url(str_replace('/notice/', '/api/statuses/show/', $related_guess).'.atom'); if ($related_atom['success']) { @@ -1012,7 +1017,7 @@ class ostatus $orig_edited = $xpath->query('atom:updated/text()', $activityobjects)->item(0)->nodeValue; $orig_contact = $contact; - $orig_author = self::fetchauthor($xpath, $activityobjects, $importer, $orig_contact, false); + $orig_author = self::fetchAuthor($xpath, $activityobjects, $importer, $orig_contact, false); $item["author-name"] = $orig_author["author-name"]; $item["author-link"] = $orig_author["author-link"]; @@ -1053,7 +1058,7 @@ class ostatus $link_data = array('add_body' => '', 'self' => ''); foreach ($links as $link) { - $attribute = self::read_attributes($link); + $attribute = self::readAttributes($link); if (($attribute['rel'] != "") && ($attribute['href'] != "")) { switch ($attribute['rel']) { @@ -1115,7 +1120,7 @@ class ostatus * * @return string URL in the format http(s)://.... */ - public static function convert_href($href) + public static function convertHref($href) { $elements = explode(":", $href); @@ -1148,7 +1153,7 @@ class ostatus * * @return string The guid if the post is a reshare */ - private static function get_reshared_guid($item) + private static function getResharedGuid($item) { $body = trim($item["body"]); @@ -1190,7 +1195,7 @@ class ostatus * * @return string The cleaned body */ - private static function format_picture_post($body) + private static function formatPicturePost($body) { $siteinfo = get_attached_data($body); @@ -1228,7 +1233,7 @@ class ostatus * * @return object header root element */ - private static function add_header($doc, $owner) + private static function addHeader($doc, $owner) { $a = get_app(); @@ -1252,7 +1257,7 @@ class ostatus XML::add_element($doc, $root, "logo", $owner["photo"]); XML::add_element($doc, $root, "updated", datetime_convert("UTC", "UTC", "now", ATOM_TIME)); - $author = self::add_author($doc, $owner); + $author = self::addAuthor($doc, $owner); $root->appendChild($author); $attributes = array("href" => $owner["url"], "rel" => "alternate", "type" => "text/html"); @@ -1302,7 +1307,7 @@ class ostatus * @param object $root XML root element where the hub links are added * @param array $item Data of the item that is to be posted */ - private static function get_attachment($doc, $root, $item) + private static function getAttachment($doc, $root, $item) { $o = ""; $siteinfo = get_attached_data($item["body"]); @@ -1368,7 +1373,7 @@ class ostatus * * @return object author element */ - private static function add_author($doc, $owner) + private static function addAuthor($doc, $owner) { $r = q("SELECT `homepage`, `publish` FROM `profile` WHERE `uid` = %d AND `is-default` LIMIT 1", intval($owner["uid"])); if (DBM::is_result($r)) { @@ -1445,7 +1450,7 @@ class ostatus * * @return string activity */ - private static function construct_verb($item) + private static function constructVerb($item) { if ($item['verb']) { return $item['verb']; @@ -1461,7 +1466,7 @@ class ostatus * * @return string Object type */ - private static function construct_objecttype($item) + private static function constructObjecttype($item) { if (in_array($item['object-type'], array(ACTIVITY_OBJ_NOTE, ACTIVITY_OBJ_COMMENT))) return $item['object-type']; @@ -1480,9 +1485,9 @@ class ostatus */ private static function entry($doc, $item, $owner, $toplevel = false) { - $repeated_guid = self::get_reshared_guid($item); + $repeated_guid = self::getResharedGuid($item); if ($repeated_guid != "") { - $xml = self::reshare_entry($doc, $item, $owner, $repeated_guid, $toplevel); + $xml = self::reshareEntry($doc, $item, $owner, $repeated_guid, $toplevel); } if ($xml) { @@ -1490,11 +1495,11 @@ class ostatus } if ($item["verb"] == ACTIVITY_LIKE) { - return self::like_entry($doc, $item, $owner, $toplevel); + return self::likeEntry($doc, $item, $owner, $toplevel); } elseif (in_array($item["verb"], array(ACTIVITY_FOLLOW, NAMESPACE_OSTATUS."/unfollow"))) { - return self::follow_entry($doc, $item, $owner, $toplevel); + return self::followEntry($doc, $item, $owner, $toplevel); } else { - return self::note_entry($doc, $item, $owner, $toplevel); + return self::noteEntry($doc, $item, $owner, $toplevel); } } @@ -1506,7 +1511,7 @@ class ostatus * * @return object Source element */ - private static function source_entry($doc, $contact) + private static function sourceEntry($doc, $contact) { $source = $doc->createElement("source"); XML::add_element($doc, $source, "id", $contact["poll"]); @@ -1527,7 +1532,7 @@ class ostatus * * @return array Contact array */ - private static function contact_entry($url, $owner) + private static function contactEntry($url, $owner) { $r = q( "SELECT * FROM `contact` WHERE `nurl` = '%s' AND `uid` IN (0, %d) ORDER BY `uid` DESC LIMIT 1", @@ -1582,13 +1587,13 @@ class ostatus * * @return object Entry element */ - private static function reshare_entry($doc, $item, $owner, $repeated_guid, $toplevel) + private static function reshareEntry($doc, $item, $owner, $repeated_guid, $toplevel) { if (($item["id"] != $item["parent"]) && (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); } - $title = self::entry_header($doc, $entry, $owner, $toplevel); + $title = self::entryHeader($doc, $entry, $owner, $toplevel); $r = q( "SELECT * FROM `item` WHERE `uid` = %d AND `guid` = '%s' AND NOT `private` AND `network` IN ('%s', '%s', '%s') LIMIT 1", @@ -1603,42 +1608,42 @@ class ostatus } else { return false; } - $contact = self::contact_entry($repeated_item['author-link'], $owner); + $contact = self::contactEntry($repeated_item['author-link'], $owner); $parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']); $title = $owner["nick"]." repeated a notice by ".$contact["nick"]; - self::entry_content($doc, $entry, $item, $owner, $title, ACTIVITY_SHARE, false); + self::entryContent($doc, $entry, $item, $owner, $title, ACTIVITY_SHARE, false); $as_object = $doc->createElement("activity:object"); XML::add_element($doc, $as_object, "activity:object-type", NAMESPACE_ACTIVITY_SCHEMA."activity"); - self::entry_content($doc, $as_object, $repeated_item, $owner, "", "", false); + self::entryContent($doc, $as_object, $repeated_item, $owner, "", "", false); - $author = self::add_author($doc, $contact); + $author = self::addAuthor($doc, $contact); $as_object->appendChild($author); $as_object2 = $doc->createElement("activity:object"); - XML::add_element($doc, $as_object2, "activity:object-type", self::construct_objecttype($repeated_item)); + XML::add_element($doc, $as_object2, "activity:object-type", self::constructObjecttype($repeated_item)); $title = sprintf("New comment by %s", $contact["nick"]); - self::entry_content($doc, $as_object2, $repeated_item, $owner, $title); + self::entryContent($doc, $as_object2, $repeated_item, $owner, $title); $as_object->appendChild($as_object2); - self::entry_footer($doc, $as_object, $item, $owner, false); + self::entryFooter($doc, $as_object, $item, $owner, false); - $source = self::source_entry($doc, $contact); + $source = self::sourceEntry($doc, $contact); $as_object->appendChild($source); $entry->appendChild($as_object); - self::entry_footer($doc, $entry, $item, $owner); + self::entryFooter($doc, $entry, $item, $owner); return $entry; } @@ -1653,16 +1658,16 @@ class ostatus * * @return object Entry element with "like" */ - private static function like_entry($doc, $item, $owner, $toplevel) + private static function likeEntry($doc, $item, $owner, $toplevel) { if (($item["id"] != $item["parent"]) && (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); } - $title = self::entry_header($doc, $entry, $owner, $toplevel); + $title = self::entryHeader($doc, $entry, $owner, $toplevel); $verb = NAMESPACE_ACTIVITY_SCHEMA."favorite"; - self::entry_content($doc, $entry, $item, $owner, "Favorite", $verb, false); + self::entryContent($doc, $entry, $item, $owner, "Favorite", $verb, false); $as_object = $doc->createElement("activity:object"); @@ -1673,13 +1678,13 @@ class ostatus ); $parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']); - XML::add_element($doc, $as_object, "activity:object-type", self::construct_objecttype($parent[0])); + XML::add_element($doc, $as_object, "activity:object-type", self::constructObjecttype($parent[0])); - self::entry_content($doc, $as_object, $parent[0], $owner, "New entry"); + self::entryContent($doc, $as_object, $parent[0], $owner, "New entry"); $entry->appendChild($as_object); - self::entry_footer($doc, $entry, $item, $owner); + self::entryFooter($doc, $entry, $item, $owner); return $entry; } @@ -1693,7 +1698,7 @@ class ostatus * * @return object author element */ - private static function add_person_object($doc, $owner, $contact) + private static function addPersonObject($doc, $owner, $contact) { $object = $doc->createElement("activity:object"); XML::add_element($doc, $object, "activity:object-type", ACTIVITY_OBJ_PERSON); @@ -1739,7 +1744,7 @@ class ostatus * * @return object Entry element */ - private static function follow_entry($doc, $item, $owner, $toplevel) + private static function followEntry($doc, $item, $owner, $toplevel) { $item["id"] = $item["parent"] = 0; $item["created"] = $item["edited"] = date("c"); @@ -1782,14 +1787,14 @@ class ostatus $item["body"] = sprintf($message, $owner["nick"], $contact["nick"]); - self::entry_header($doc, $entry, $owner, $toplevel); + self::entryHeader($doc, $entry, $owner, $toplevel); - self::entry_content($doc, $entry, $item, $owner, $title); + self::entryContent($doc, $entry, $item, $owner, $title); - $object = self::add_person_object($doc, $owner, $contact); + $object = self::addPersonObject($doc, $owner, $contact); $entry->appendChild($object); - self::entry_footer($doc, $entry, $item, $owner); + self::entryFooter($doc, $entry, $item, $owner); return $entry; } @@ -1804,19 +1809,19 @@ class ostatus * * @return object Entry element */ - private static function note_entry($doc, $item, $owner, $toplevel) + private static function noteEntry($doc, $item, $owner, $toplevel) { if (($item["id"] != $item["parent"]) && (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); } - $title = self::entry_header($doc, $entry, $owner, $toplevel); + $title = self::entryHeader($doc, $entry, $owner, $toplevel); XML::add_element($doc, $entry, "activity:object-type", ACTIVITY_OBJ_NOTE); - self::entry_content($doc, $entry, $item, $owner, $title); + self::entryContent($doc, $entry, $item, $owner, $title); - self::entry_footer($doc, $entry, $item, $owner); + self::entryFooter($doc, $entry, $item, $owner); return $entry; } @@ -1831,7 +1836,7 @@ class ostatus * * @return string The title for the element */ - private static function entry_header($doc, &$entry, $owner, $toplevel) + private static function entryHeader($doc, &$entry, $owner, $toplevel) { /// @todo Check if this title stuff is really needed (I guess not) if (!$toplevel) { @@ -1849,7 +1854,7 @@ class ostatus $entry->setAttribute("xmlns:statusnet", NAMESPACE_STATUSNET); $entry->setAttribute("xmlns:mastodon", NAMESPACE_MASTODON); - $author = self::add_author($doc, $owner); + $author = self::addAuthor($doc, $owner); $entry->appendChild($author); $title = sprintf("New comment by %s", $owner["nick"]); @@ -1868,16 +1873,16 @@ class ostatus * @param string $verb The activity verb * @param bool $complete Add the "status_net" element? */ - private static function entry_content($doc, $entry, $item, $owner, $title, $verb = "", $complete = true) + private static function entryContent($doc, $entry, $item, $owner, $title, $verb = "", $complete = true) { if ($verb == "") { - $verb = self::construct_verb($item); + $verb = self::constructVerb($item); } XML::add_element($doc, $entry, "id", $item["uri"]); XML::add_element($doc, $entry, "title", $title); - $body = self::format_picture_post($item['body']); + $body = self::formatPicturePost($item['body']); if ($item['title'] != "") { $body = "[b]".$item['title']."[/b]\n\n".$body; @@ -1910,7 +1915,7 @@ class ostatus * @param array $owner Contact data of the poster * @param bool $complete default true */ - private static function entry_footer($doc, $entry, $item, $owner, $complete = true) + private static function entryFooter($doc, $entry, $item, $owner, $complete = true) { $mentioned = array(); @@ -2028,7 +2033,7 @@ class ostatus } } - self::get_attachment($doc, $entry, $item); + self::getAttachment($doc, $entry, $item); if ($complete && ($item["id"] > 0)) { $app = $item["app"]; @@ -2110,7 +2115,7 @@ class ostatus $doc = new DOMDocument('1.0', 'utf-8'); $doc->formatOutput = true; - $root = self::add_header($doc, $owner); + $root = self::addHeader($doc, $owner); foreach ($items as $item) { if (Config::get('system', 'ostatus_debug')) { From f3c8af485f67eda7cefb602793b94aebc17ffeb1 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Wed, 15 Nov 2017 23:11:00 -0500 Subject: [PATCH 018/175] Require statement Not sure if this is needed or not, there are no ostatus:: calls in this file. --- include/delivery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/delivery.php b/include/delivery.php index 7c5f4648c..a2d194fcd 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -9,7 +9,7 @@ use Friendica\Protocol\DFRN; require_once 'include/queue_fn.php'; require_once 'include/html2plain.php'; -require_once 'include/ostatus.php'; +//require_once 'include/ostatus.php'; function delivery_run(&$argv, &$argc){ global $a; From 86073ddfd178d2cdeec7331fbe6b43adfccad1e1 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Thu, 16 Nov 2017 07:32:31 -0500 Subject: [PATCH 019/175] Removed require statement There didn't seem to be any ostatus function calls in this file. Running with it commented out produced no errors. --- include/delivery.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/delivery.php b/include/delivery.php index a2d194fcd..15b97567e 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -1,5 +1,7 @@ Date: Thu, 16 Nov 2017 13:05:41 -0500 Subject: [PATCH 020/175] BaseObject moved to src/Core BaseObject moved to Friendica\Core namespace. References and function calls updated. --- index.php | 13 +++-------- object/BaseObject.php | 35 ----------------------------- object/Conversation.php | 15 ++++++++----- object/Item.php | 12 ++++++---- object/TemplateEngine.php | 12 ++++++---- src/Core/BaseObject.php | 47 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 76 insertions(+), 58 deletions(-) delete mode 100644 object/BaseObject.php create mode 100644 src/Core/BaseObject.php diff --git a/index.php b/index.php index 591549890..c31b1adc0 100644 --- a/index.php +++ b/index.php @@ -1,26 +1,21 @@ backend = false; /** - * * Load the configuration file which contains our DB credentials. * Ignore errors. If the file doesn't exist or is empty, we are running in * installation mode. - * */ $install = ((file_exists('.htconfig.php') && filesize('.htconfig.php')) ? false : true); diff --git a/object/BaseObject.php b/object/BaseObject.php deleted file mode 100644 index 15c7d8dc6..000000000 --- a/object/BaseObject.php +++ /dev/null @@ -1,35 +0,0 @@ - Date: Thu, 16 Nov 2017 13:24:59 -0500 Subject: [PATCH 021/175] Conversation to src object/Conversation moved to Friendica\Core namespace. --- include/conversation.php | 6 ++- {object => src/Core}/Conversation.php | 66 +++++++++++++++++---------- 2 files changed, 46 insertions(+), 26 deletions(-) rename {object => src/Core}/Conversation.php (73%) diff --git a/include/conversation.php b/include/conversation.php index 0e814c666..d24a01b45 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1,7 +1,10 @@ set_mode($mode); $this->preview = $preview; } @@ -32,13 +36,15 @@ class Conversation extends BaseObject { /** * Set the mode we'll be displayed on */ - private function set_mode($mode) { - if($this->get_mode() == $mode) + private function set_mode($mode) + { + if ($this->get_mode() == $mode) { return; + } $a = $this->get_app(); - switch($mode) { + switch ($mode) { case 'network': case 'notes': $this->profile_owner = local_user(); @@ -46,11 +52,11 @@ class Conversation extends BaseObject { break; case 'profile': $this->profile_owner = $a->profile['profile_uid']; - $this->writable = can_write_wall($a,$this->profile_owner); + $this->writable = can_write_wall($a, $this->profile_owner); break; case 'display': $this->profile_owner = $a->profile['uid']; - $this->writable = can_write_wall($a,$this->profile_owner); + $this->writable = can_write_wall($a, $this->profile_owner); break; default: logger('[ERROR] Conversation::set_mode : Unhandled mode ('. $mode .').', LOGGER_DEBUG); @@ -63,28 +69,32 @@ class Conversation extends BaseObject { /** * Get mode */ - public function get_mode() { + public function get_mode() + { return $this->mode; } /** * Check if page is writable */ - public function is_writable() { + public function is_writable() + { return $this->writable; } /** * Check if page is a preview */ - public function is_preview() { + public function is_preview() + { return $this->preview; } /** * Get profile owner */ - public function get_profile_owner() { + public function get_profile_owner() + { return $this->profile_owner; } @@ -95,13 +105,16 @@ class Conversation extends BaseObject { * _ The inserted item on success * _ false on failure */ - public function add_thread($item) { + public function add_thread($item) + { $item_id = $item->get_id(); - if(!$item_id) { + + if (!$item_id) { logger('[ERROR] Conversation::add_thread : Item has no ID!!', LOGGER_DEBUG); return false; } - if($this->get_thread($item->get_id())) { + + if ($this->get_thread($item->get_id())) { logger('[WARN] Conversation::add_thread : Thread already exists ('. $item->get_id() .').', LOGGER_DEBUG); return false; } @@ -109,16 +122,19 @@ class Conversation extends BaseObject { /* * Only add will be displayed */ - if($item->get_data_value('network') === NETWORK_MAIL && local_user() != $item->get_data_value('uid')) { + if ($item->get_data_value('network') === NETWORK_MAIL && local_user() != $item->get_data_value('uid')) { logger('[WARN] Conversation::add_thread : Thread is a mail ('. $item->get_id() .').', LOGGER_DEBUG); return false; } - if($item->get_data_value('verb') === ACTIVITY_LIKE || $item->get_data_value('verb') === ACTIVITY_DISLIKE) { + + if ($item->get_data_value('verb') === ACTIVITY_LIKE || $item->get_data_value('verb') === ACTIVITY_DISLIKE) { logger('[WARN] Conversation::add_thread : Thread is a (dis)like ('. $item->get_id() .').', LOGGER_DEBUG); return false; } + $item->set_conversation($this); $this->threads[] = $item; + return end($this->threads); } @@ -131,19 +147,19 @@ class Conversation extends BaseObject { * _ The data requested on success * _ false on failure */ - public function get_template_data($conv_responses) { + public function get_template_data($conv_responses) + { $a = get_app(); $result = array(); - $i = 0; - foreach($this->threads as $item) { + foreach ($this->threads as $item) { if($item->get_data_value('network') === NETWORK_MAIL && local_user() != $item->get_data_value('uid')) continue; $item_data = $item->get_template_data($conv_responses); - if(!$item_data) { + if (!$item_data) { logger('[ERROR] Conversation::get_template_data : Failed to get item template data ('. $item->get_id() .').', LOGGER_DEBUG); return false; } @@ -160,10 +176,12 @@ class Conversation extends BaseObject { * _ The found item on success * _ false on failure */ - private function get_thread($id) { - foreach($this->threads as $item) { - if($item->get_id() == $id) + private function get_thread($id) + { + foreach ($this->threads as $item) { + if ($item->get_id() == $id) { return $item; + } } return false; From 681f5d877123581f9eb8470d0aff47683d26f606 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Thu, 16 Nov 2017 15:54:03 -0500 Subject: [PATCH 022/175] Item to src object/Item moved to Friendica\Core namespace. --- include/conversation.php | 5 +- src/Core/Conversation.php | 25 +-- {object => src/Core}/Item.php | 331 +++++++++++++++++++--------------- 3 files changed, 200 insertions(+), 161 deletions(-) rename {object => src/Core}/Item.php (67%) diff --git a/include/conversation.php b/include/conversation.php index d24a01b45..7abe97e06 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -5,6 +5,7 @@ use Friendica\App; use Friendica\Core\Config; use Friendica\Core\Conversation; +use Friendica\Core\Item; use Friendica\Core\PConfig; use Friendica\Core\System; use Friendica\Database\DBM; @@ -863,8 +864,6 @@ function conversation(App $a, $items, $mode, $update, $preview = false) { // Normal View $page_template = get_markup_template("threaded_conversation.tpl"); - require_once 'object/Item.php'; - $conv = new Conversation($mode, $preview); /* @@ -1533,7 +1532,7 @@ function get_responses($conv_responses, $response_verbs, $ob, $item) { if (count($ret[$v]['list']) > MAX_LIKERS) { $ret[$v]['list_part'] = array_slice($ret[$v]['list'], 0, MAX_LIKERS); array_push($ret[$v]['list_part'], '' . t('View all') . ''); + . (($ob) ? $ob->getId() : $item['id']) . '">' . t('View all') . ''); } else { $ret[$v]['list_part'] = ''; } diff --git a/src/Core/Conversation.php b/src/Core/Conversation.php index 13ba8df21..bff754580 100644 --- a/src/Core/Conversation.php +++ b/src/Core/Conversation.php @@ -9,9 +9,9 @@ if (class_exists('Conversation')) { } use Friendica\Core\BaseObject; +use Friendica\Core\Item; require_once 'boot.php'; -require_once 'object/Item.php'; require_once 'include/text.php'; /** @@ -107,32 +107,32 @@ class Conversation extends BaseObject */ public function add_thread($item) { - $item_id = $item->get_id(); + $item_id = $item->getId(); if (!$item_id) { logger('[ERROR] Conversation::add_thread : Item has no ID!!', LOGGER_DEBUG); return false; } - if ($this->get_thread($item->get_id())) { - logger('[WARN] Conversation::add_thread : Thread already exists ('. $item->get_id() .').', LOGGER_DEBUG); + if ($this->get_thread($item->getId())) { + logger('[WARN] Conversation::add_thread : Thread already exists ('. $item->getId() .').', LOGGER_DEBUG); return false; } /* * Only add will be displayed */ - if ($item->get_data_value('network') === NETWORK_MAIL && local_user() != $item->get_data_value('uid')) { - logger('[WARN] Conversation::add_thread : Thread is a mail ('. $item->get_id() .').', LOGGER_DEBUG); + if ($item->getDataValue('network') === NETWORK_MAIL && local_user() != $item->getDataValue('uid')) { + logger('[WARN] Conversation::add_thread : Thread is a mail ('. $item->getId() .').', LOGGER_DEBUG); return false; } - if ($item->get_data_value('verb') === ACTIVITY_LIKE || $item->get_data_value('verb') === ACTIVITY_DISLIKE) { - logger('[WARN] Conversation::add_thread : Thread is a (dis)like ('. $item->get_id() .').', LOGGER_DEBUG); + if ($item->getDataValue('verb') === ACTIVITY_LIKE || $item->getDataValue('verb') === ACTIVITY_DISLIKE) { + logger('[WARN] Conversation::add_thread : Thread is a (dis)like ('. $item->getId() .').', LOGGER_DEBUG); return false; } - $item->set_conversation($this); + $item->setConversation($this); $this->threads[] = $item; return end($this->threads); @@ -154,13 +154,14 @@ class Conversation extends BaseObject $i = 0; foreach ($this->threads as $item) { - if($item->get_data_value('network') === NETWORK_MAIL && local_user() != $item->get_data_value('uid')) + if ($item->getDataValue('network') === NETWORK_MAIL && local_user() != $item->getDataValue('uid')) { continue; + } $item_data = $item->get_template_data($conv_responses); if (!$item_data) { - logger('[ERROR] Conversation::get_template_data : Failed to get item template data ('. $item->get_id() .').', LOGGER_DEBUG); + logger('[ERROR] Conversation::get_template_data : Failed to get item template data ('. $item->getId() .').', LOGGER_DEBUG); return false; } $result[] = $item_data; @@ -179,7 +180,7 @@ class Conversation extends BaseObject private function get_thread($id) { foreach ($this->threads as $item) { - if ($item->get_id() == $id) { + if ($item->getId() == $id) { return $item; } } diff --git a/object/Item.php b/src/Core/Item.php similarity index 67% rename from object/Item.php rename to src/Core/Item.php index 0dab971d1..681593d0e 100644 --- a/object/Item.php +++ b/src/Core/Item.php @@ -1,7 +1,9 @@ get_app(); $this->data = $data; - $this->set_template('wall'); - $this->toplevel = ($this->get_id() == $this->get_data_value('parent')); + $this->setTemplate('wall'); + $this->toplevel = ($this->getId() == $this->getDataValue('parent')); if (is_array($_SESSION['remote'])) { foreach ($_SESSION['remote'] as $visitor) { - if ($visitor['cid'] == $this->get_data_value('contact-id')) { + if ($visitor['cid'] == $this->getDataValue('contact-id')) { $this->visiting = true; break; } } } - $this->writable = ($this->get_data_value('writable') || $this->get_data_value('self')); + $this->writable = ($this->getDataValue('writable') || $this->getDataValue('self')); $ssl_state = ((local_user()) ? true : false); - $this->redirect_url = 'redir/' . $this->get_data_value('cid') ; + $this->redirect_url = 'redir/' . $this->getDataValue('cid'); - if (Config::get('system','thread_allow') && $a->theme_thread_allow && !$this->is_toplevel()) { + if (Config::get('system', 'thread_allow') && $a->theme_thread_allow && !$this->isToplevel()) { $this->threaded = true; } @@ -83,7 +88,7 @@ class Item extends BaseObject { $item['pagedrop'] = $data['pagedrop']; $child = new Item($item); - $this->add_child($child); + $this->addChild($child); } } } @@ -95,14 +100,15 @@ class Item extends BaseObject { * _ The data requested on success * _ false on failure */ - public function get_template_data($conv_responses, $thread_level=1) { - require_once("mod/proxy.php"); + public function getTemplateData($conv_responses, $thread_level = 1) + { + require_once "mod/proxy.php"; $result = array(); $a = $this->get_app(); - $item = $this->get_data(); + $item = $this->getData(); $edited = false; // If the time between "created" and "edited" differs we add // a notice that the post was edited. @@ -126,16 +132,16 @@ class Item extends BaseObject { $indent = ''; $shiny = ''; $osparkle = ''; - $total_children = $this->count_descendants(); + $total_children = $this->countDescendants(); - $conv = $this->get_conversation(); + $conv = $this->getConversation(); $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); $shareable = ((($conv->get_profile_owner() == local_user()) && ($item['private'] != 1)) ? true : false); - if (local_user() && link_compare($a->contact['url'],$item['author-link'])) { + if (local_user() && link_compare($a->contact['url'], $item['author-link'])) { if ($item["event-id"] != 0) { $edpost = array("events/event/".$item['event-id'], t("Edit")); } else { @@ -145,27 +151,27 @@ class Item extends BaseObject { $edpost = false; } - if (($this->get_data_value('uid') == local_user()) || $this->is_visiting()) { + if (($this->getDataValue('uid') == local_user()) || $this->isVisiting()) { $dropping = true; } $drop = array( 'dropping' => $dropping, - 'pagedrop' => ((feature_enabled($conv->get_profile_owner(),'multi_delete')) ? $item['pagedrop'] : ''), + 'pagedrop' => ((feature_enabled($conv->get_profile_owner(), 'multi_delete')) ? $item['pagedrop'] : ''), 'select' => t('Select'), 'delete' => t('Delete'), ); $filer = (($conv->get_profile_owner() == local_user()) ? t("save to folder") : false); - $diff_author = ((link_compare($item['url'],$item['author-link'])) ? false : true); - $profile_name = htmlentities(((strlen($item['author-name'])) && $diff_author) ? $item['author-name'] : $item['name']); + $diff_author = ((link_compare($item['url'], $item['author-link'])) ? false : true); + $profile_name = htmlentities(((strlen($item['author-name'])) && $diff_author) ? $item['author-name'] : $item['name']); if ($item['author-link'] && (! $item['author-name'])) { $profile_name = $item['author-link']; } $sp = false; - $profile_link = best_link_url($item,$sp); + $profile_link = best_link_url($item, $sp); if ($profile_link === 'mailbox') { $profile_link = ''; } @@ -195,14 +201,13 @@ class Item extends BaseObject { } $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => ''); - call_hooks('render_location',$locate); + call_hooks('render_location', $locate); $location = ((strlen($locate['html'])) ? $locate['html'] : render_location_dummy($locate)); $tags=array(); $hashtags = array(); $mentions = array(); - /*foreach(explode(',',$item['tag']) as $tag){ $tag = trim($tag); if ($tag!="") { @@ -217,9 +222,10 @@ class Item extends BaseObject { // process action responses - e.g. like/dislike/attend/agree/whatever $response_verbs = array('like'); - if (feature_enabled($conv->get_profile_owner(),'dislike')) { + if (feature_enabled($conv->get_profile_owner(), 'dislike')) { $response_verbs[] = 'dislike'; } + if ($item['object-type'] === ACTIVITY_OBJ_EVENT) { $response_verbs[] = 'attendyes'; $response_verbs[] = 'attendno'; @@ -230,10 +236,10 @@ class Item extends BaseObject { } } - $responses = get_responses($conv_responses,$response_verbs,$this,$item); + $responses = get_responses($conv_responses, $response_verbs, $this, $item); - foreach ($response_verbs as $value=>$verbs) { - $responses[$verbs]['output'] = ((x($conv_responses[$verbs],$item['uri'])) ? format_like($conv_responses[$verbs][$item['uri']],$conv_responses[$verbs][$item['uri'] . '-l'],$verbs,$item['uri']) : ''); + foreach ($response_verbs as $value => $verbs) { + $responses[$verbs]['output'] = ((x($conv_responses[$verbs], $item['uri'])) ? format_like($conv_responses[$verbs][$item['uri']], $conv_responses[$verbs][$item['uri'] . '-l'], $verbs, $item['uri']) : ''); } /* @@ -241,13 +247,13 @@ class Item extends BaseObject { * And the conv mode may change when we change the conv, or it changes its mode * Maybe we should establish a way to be notified about conversation changes */ - $this->check_wall_to_wall(); + $this->checkWallToWall(); - if ($this->is_wall_to_wall() && ($this->get_owner_url() == $this->get_redirect_url())) { + if ($this->isWallToWall() && ($this->getOwnerUrl() == $this->getRedirectUrl())) { $osparkle = ' sparkle'; } - if ($this->is_toplevel()) { + if ($this->isToplevel()) { if ($conv->get_profile_owner() == local_user()) { $isstarred = (($item['starred']) ? "starred" : "unstarred"); @@ -272,7 +278,7 @@ class Item extends BaseObject { } $tagger = ''; - if(feature_enabled($conv->get_profile_owner(),'commtag')) { + if (feature_enabled($conv->get_profile_owner(), 'commtag')) { $tagger = array( 'add' => t("add tag"), 'class' => "", @@ -286,22 +292,22 @@ class Item extends BaseObject { if ($conv->is_writable()) { $buttons = array( 'like' => array( t("I like this \x28toggle\x29"), t("like")), - 'dislike' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? array( t("I don't like this \x28toggle\x29"), t("dislike")) : ''), + 'dislike' => ((feature_enabled($conv->get_profile_owner(), 'dislike')) ? array( t("I don't like this \x28toggle\x29"), t("dislike")) : ''), ); if ($shareable) { $buttons['share'] = array( t('Share this'), t('share')); } } - $comment = $this->get_comment_box($indent); + $comment = $this->getCommentBox($indent); - if (strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0){ + if (strcmp(datetime_convert('UTC', 'UTC', $item['created']), datetime_convert('UTC', 'UTC', 'now - 12 hours')) > 0) { $shiny = 'shiny'; } localize_item($item); - $body = prepare_body($item,true); + $body = prepare_body($item, true); list($categories, $folders) = get_cats_and_terms($item); @@ -311,21 +317,21 @@ class Item extends BaseObject { $name_e = template_escape($profile_name); $title_e = template_escape($item['title']); $location_e = template_escape($location); - $owner_name_e = template_escape($this->get_owner_name()); + $owner_name_e = template_escape($this->getOwnerName()); } else { $body_e = $body; $text_e = strip_tags($body); $name_e = $profile_name; $title_e = $item['title']; $location_e = $location; - $owner_name_e = $this->get_owner_name(); + $owner_name_e = $this->getOwnerName(); } // Disable features that aren't available in several networks /// @todo Add NETWORK_DIASPORA when it will pass this information if (!in_array($item["item_network"], array(NETWORK_DFRN)) && isset($buttons["dislike"])) { - unset($buttons["dislike"],$isevent); + unset($buttons["dislike"], $isevent); $tagger = ''; } @@ -338,8 +344,8 @@ class Item extends BaseObject { } $tmp_item = array( - 'template' => $this->get_template(), - 'type' => implode("",array_slice(explode("/",$item['verb']),-1)), + 'template' => $this->getTemplate(), + 'type' => implode("", array_slice(explode("/", $item['verb']), -1)), 'tags' => $item['tags'], 'hashtags' => $item['hashtags'], 'mentions' => $item['mentions'], @@ -351,12 +357,12 @@ class Item extends BaseObject { 'folders' => $folders, 'body' => $body_e, 'text' => $text_e, - 'id' => $this->get_id(), + 'id' => $this->getId(), 'guid' => urlencode($item['guid']), 'isevent' => $isevent, 'attend' => $attend, - 'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])), - 'olinktitle' => sprintf( t('View %s\'s profile @ %s'), htmlentities($this->get_owner_name()), ((strlen($item['owner-link'])) ? $item['owner-link'] : $item['url'])), + 'linktitle' => sprintf(t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])), + 'olinktitle' => sprintf(t('View %s\'s profile @ %s'), htmlentities($this->getOwnerName()), ((strlen($item['owner-link'])) ? $item['owner-link'] : $item['url'])), 'to' => t('to'), 'via' => t('via'), 'wall' => t('Wall-to-Wall'), @@ -369,23 +375,23 @@ class Item extends BaseObject { 'sparkle' => $sparkle, 'title' => $title_e, 'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'), - 'ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])), + 'ago' => (($item['app']) ? sprintf(t('%s from %s'), relative_date($item['created']), $item['app']) : relative_date($item['created'])), 'app' => $item['app'], 'created' => relative_date($item['created']), 'lock' => $lock, 'location' => $location_e, 'indent' => $indent, 'shiny' => $shiny, - 'owner_url' => $this->get_owner_url(), + 'owner_url' => $this->getOwnerUrl(), 'owner_photo' => $a->remove_baseurl(proxy_url($item['owner-thumb'], false, PROXY_SIZE_THUMB)), 'owner_name' => htmlentities($owner_name_e), 'plink' => get_plink($item), - 'edpost' => ((feature_enabled($conv->get_profile_owner(),'edit_posts')) ? $edpost : ''), + 'edpost' => ((feature_enabled($conv->get_profile_owner(), 'edit_posts')) ? $edpost : ''), 'isstarred' => $isstarred, - 'star' => ((feature_enabled($conv->get_profile_owner(),'star_posts')) ? $star : ''), - 'ignore' => ((feature_enabled($conv->get_profile_owner(),'ignore_posts')) ? $ignore : ''), + 'star' => ((feature_enabled($conv->get_profile_owner(), 'star_posts')) ? $star : ''), + 'ignore' => ((feature_enabled($conv->get_profile_owner(), 'ignore_posts')) ? $ignore : ''), 'tagger' => $tagger, - 'filer' => ((feature_enabled($conv->get_profile_owner(),'filing')) ? $filer : ''), + 'filer' => ((feature_enabled($conv->get_profile_owner(), 'filing')) ? $filer : ''), 'drop' => $drop, 'vote' => $buttons, 'like' => $responses['like']['output'], @@ -410,16 +416,16 @@ class Item extends BaseObject { $result = $arr['output']; $result['children'] = array(); - $children = $this->get_children(); + $children = $this->getChildren(); $nb_children = count($children); if ($nb_children > 0) { foreach ($children as $child) { - $result['children'][] = $child->get_template_data($conv_responses, $thread_level + 1); + $result['children'][] = $child->getTemplateData($conv_responses, $thread_level + 1); } // Collapse if (($nb_children > 2) || ($thread_level > 1)) { $result['children'][0]['comment_firstcollapsed'] = true; - $result['children'][0]['num_comments'] = sprintf( tt('%d comment','%d comments',$total_children),$total_children ); + $result['children'][0]['num_comments'] = sprintf(tt('%d comment', '%d comments', $total_children), $total_children); $result['children'][0]['hidden_comments_num'] = $total_children; $result['children'][0]['hidden_comments_text'] = tt('comment', 'comments', $total_children); $result['children'][0]['hide_text'] = t('show more'); @@ -431,15 +437,15 @@ class Item extends BaseObject { } } - if ($this->is_toplevel()) { - $result['total_comments_num'] = "$total_children"; - $result['total_comments_text'] = tt('comment', 'comments', $total_children); - } + if ($this->isToplevel()) { + $result['total_comments_num'] = "$total_children"; + $result['total_comments_text'] = tt('comment', 'comments', $total_children); + } $result['private'] = $item['private']; - $result['toplevel'] = ($this->is_toplevel() ? 'toplevel_item' : ''); + $result['toplevel'] = ($this->isToplevel() ? 'toplevel_item' : ''); - if ($this->is_threaded()) { + if ($this->isThreaded()) { $result['flatten'] = false; $result['threaded'] = true; } else { @@ -450,75 +456,85 @@ class Item extends BaseObject { return $result; } - public function get_id() { - return $this->get_data_value('id'); + public function getId() + { + return $this->getDataValue('id'); } - public function is_threaded() { + public function isThreaded() + { return $this->threaded; } /** * Add a child item */ - public function add_child(Item $item) { - $item_id = $item->get_id(); + public function addChild(Item $item) + { + $item_id = $item->getId(); if (!$item_id) { - logger('[ERROR] Item::add_child : Item has no ID!!', LOGGER_DEBUG); + logger('[ERROR] Item::addChild : Item has no ID!!', LOGGER_DEBUG); return false; - } elseif ($this->get_child($item->get_id())) { - logger('[WARN] Item::add_child : Item already exists ('. $item->get_id() .').', LOGGER_DEBUG); + } elseif ($this->getChild($item->getId())) { + logger('[WARN] Item::addChild : Item already exists ('. $item->getId() .').', LOGGER_DEBUG); return false; } /* * Only add what will be displayed */ - if ($item->get_data_value('network') === NETWORK_MAIL && local_user() != $item->get_data_value('uid')) { + if ($item->getDataValue('network') === NETWORK_MAIL && local_user() != $item->getDataValue('uid')) { return false; - } elseif (activity_match($item->get_data_value('verb'),ACTIVITY_LIKE) || activity_match($item->get_data_value('verb'),ACTIVITY_DISLIKE)) { + } elseif (activity_match($item->getDataValue('verb'), ACTIVITY_LIKE) || activity_match($item->getDataValue('verb'), ACTIVITY_DISLIKE)) { return false; } - $item->set_parent($this); + $item->setParent($this); $this->children[] = $item; + return end($this->children); } /** * Get a child by its ID */ - public function get_child($id) { - foreach ($this->get_children() as $child) { - if ($child->get_id() == $id) { + public function getChild($id) + { + foreach ($this->getChildren() as $child) { + if ($child->getId() == $id) { return $child; } } + return null; } /** * Get all ou children */ - public function get_children() { + public function getChildren() + { return $this->children; } /** * Set our parent */ - protected function set_parent($item) { - $parent = $this->get_parent(); - if($parent) { - $parent->remove_child($this); + protected function setParent($item) + { + $parent = $this->getParent(); + if ($parent) { + $parent->removeChild($this); } + $this->parent = $item; - $this->set_conversation($item->get_conversation()); + $this->setConversation($item->getConversation()); } /** * Remove our parent */ - protected function remove_parent() { + protected function removeParent() + { $this->parent = null; $this->conversation = null; } @@ -526,46 +542,50 @@ class Item extends BaseObject { /** * Remove a child */ - public function remove_child($item) { - $id = $item->get_id(); - foreach ($this->get_children() as $key => $child) { - if ($child->get_id() == $id) { - $child->remove_parent(); + public function removeChild($item) + { + $id = $item->getId(); + foreach ($this->getChildren() as $key => $child) { + if ($child->getId() == $id) { + $child->removeParent(); unset($this->children[$key]); // Reindex the array, in order to make sure there won't be any trouble on loops using count() $this->children = array_values($this->children); return true; } } - logger('[WARN] Item::remove_child : Item is not a child ('. $id .').', LOGGER_DEBUG); + logger('[WARN] Item::removeChild : Item is not a child ('. $id .').', LOGGER_DEBUG); return false; } /** * Get parent item */ - protected function get_parent() { + protected function getParent() + { return $this->parent; } /** * set conversation */ - public function set_conversation($conv) { + public function setConversation($conv) + { $previous_mode = ($this->conversation ? $this->conversation->get_mode() : ''); $this->conversation = $conv; // Set it on our children too - foreach ($this->get_children() as $child) { - $child->set_conversation($conv); + foreach ($this->getChildren() as $child) { + $child->setConversation($conv); } } /** * get conversation */ - public function get_conversation() { + public function getConversation() + { return $this->conversation; } @@ -574,7 +594,8 @@ class Item extends BaseObject { * * We shouldn't need this */ - public function get_data() { + public function getData() + { return $this->data; } @@ -585,9 +606,10 @@ class Item extends BaseObject { * _ value on success * _ false on failure */ - public function get_data_value($name) { + public function getDataValue($name) + { if (!isset($this->data[$name])) { -// logger('[ERROR] Item::get_data_value : Item has no value name "'. $name .'".', LOGGER_DEBUG); + // logger('[ERROR] Item::getDataValue : Item has no value name "'. $name .'".', LOGGER_DEBUG); return false; } @@ -597,9 +619,10 @@ class Item extends BaseObject { /** * Set template */ - private function set_template($name) { + private function setTemplate($name) + { if (!x($this->available_templates, $name)) { - logger('[ERROR] Item::set_template : Template not available ("'. $name .'").', LOGGER_DEBUG); + logger('[ERROR] Item::setTemplate : Template not available ("'. $name .'").', LOGGER_DEBUG); return false; } @@ -609,22 +632,25 @@ class Item extends BaseObject { /** * Get template */ - private function get_template() { + private function getTemplate() + { return $this->template; } /** * Check if this is a toplevel post */ - private function is_toplevel() { + private function isToplevel() + { return $this->toplevel; } /** * Check if this is writable */ - private function is_writable() { - $conv = $this->get_conversation(); + private function isWritable() + { + $conv = $this->getConversation(); if ($conv) { // This will allow us to comment on wall-to-wall items owned by our friends @@ -636,7 +662,7 @@ class Item extends BaseObject { } // this fixes for visitors - return ($this->writable || ($this->is_visiting() && $conv->get_mode() == 'profile')); + return ($this->writable || ($this->isVisiting() && $conv->get_mode() == 'profile')); } return $this->writable; } @@ -644,21 +670,24 @@ class Item extends BaseObject { /** * Count the total of our descendants */ - private function count_descendants() { - $children = $this->get_children(); + private function countDescendants() + { + $children = $this->getChildren(); $total = count($children); if ($total > 0) { foreach ($children as $child) { - $total += $child->count_descendants(); + $total += $child->countDescendants(); } } + return $total; } /** * Get the template for the comment box */ - private function get_comment_box_template() { + private function getCommentBoxTemplate() + { return $this->comment_box_template; } @@ -669,38 +698,43 @@ class Item extends BaseObject { * _ The comment box string (empty if no comment box) * _ false on failure */ - private function get_comment_box($indent) { + private function getCommentBox($indent) + { $a = $this->get_app(); - if (!$this->is_toplevel() && !(Config::get('system','thread_allow') && $a->theme_thread_allow)) { + if (!$this->isToplevel() && !(Config::get('system', 'thread_allow') && $a->theme_thread_allow)) { return ''; } $comment_box = ''; - $conv = $this->get_conversation(); - $template = get_markup_template($this->get_comment_box_template()); + $conv = $this->getConversation(); + $template = get_markup_template($this->getCommentBoxTemplate()); $ww = ''; - if ( ($conv->get_mode() === 'network') && $this->is_wall_to_wall() ) + if (($conv->get_mode() === 'network') && $this->isWallToWall()) { $ww = 'ww'; + } - if ($conv->is_writable() && $this->is_writable()) { + if ($conv->is_writable() && $this->isWritable()) { $qc = $qcomment = null; /* * Hmmm, code depending on the presence of a particular plugin? * This should be better if done by a hook */ - if (in_array('qcomment',$a->plugins)) { - $qc = ((local_user()) ? PConfig::get(local_user(),'qcomment','words') : null); - $qcomment = (($qc) ? explode("\n",$qc) : null); + if (in_array('qcomment', $a->plugins)) { + $qc = ((local_user()) ? PConfig::get(local_user(), 'qcomment', 'words') : null); + $qcomment = (($qc) ? explode("\n", $qc) : null); } - $comment_box = replace_macros($template,array( + + $comment_box = replace_macros( + $template, + array( '$return_path' => $a->query_string, - '$threaded' => $this->is_threaded(), -// '$jsreload' => (($conv->get_mode() === 'display') ? $_SESSION['return_url'] : ''), + '$threaded' => $this->isThreaded(), + // '$jsreload' => (($conv->get_mode() === 'display') ? $_SESSION['return_url'] : ''), '$jsreload' => '', '$type' => (($conv->get_mode() === 'profile') ? 'wall-comment' : 'net-comment'), - '$id' => $this->get_id(), - '$parent' => $this->get_id(), + '$id' => $this->getId(), + '$parent' => $this->getId(), '$qcomment' => $qcomment, '$profile_uid' => $conv->get_profile_owner(), '$mylink' => $a->remove_baseurl($a->contact['url']), @@ -716,32 +750,34 @@ class Item extends BaseObject { '$edimg' => t('Image'), '$edurl' => t('Link'), '$edvideo' => t('Video'), - '$preview' => ((feature_enabled($conv->get_profile_owner(),'preview')) ? t('Preview') : ''), + '$preview' => ((feature_enabled($conv->get_profile_owner(), 'preview')) ? t('Preview') : ''), '$indent' => $indent, '$sourceapp' => t($a->sourcename), '$ww' => (($conv->get_mode() === 'network') ? $ww : ''), - '$rand_num' => random_digits(12) - )); + '$rand_num' => random_digits(12)) + ); } return $comment_box; } - private function get_redirect_url() { + private function getRedirectUrl() + { return $this->redirect_url; } /** * Check if we are a wall to wall item and set the relevant properties */ - protected function check_wall_to_wall() { + protected function checkWallToWall() + { $a = $this->get_app(); - $conv = $this->get_conversation(); + $conv = $this->getConversation(); $this->wall_to_wall = false; - if($this->is_toplevel()) { - if($conv->get_mode() !== 'profile') { - if($this->get_data_value('wall') && !$this->get_data_value('self')) { + if ($this->isToplevel()) { + if ($conv->get_mode() !== 'profile') { + if ($this->getDataValue('wall') && !$this->getDataValue('self')) { // On the network page, I am the owner. On the display page it will be the profile owner. // This will have been stored in $a->page_contact by our calling page. // Put this person as the wall owner of the wall-to-wall notice. @@ -750,14 +786,12 @@ class Item extends BaseObject { $this->owner_photo = $a->page_contact['thumb']; $this->owner_name = $a->page_contact['name']; $this->wall_to_wall = true; - } elseif($this->get_data_value('owner-link')) { - - $owner_linkmatch = (($this->get_data_value('owner-link')) && link_compare($this->get_data_value('owner-link'),$this->get_data_value('author-link'))); - $alias_linkmatch = (($this->get_data_value('alias')) && link_compare($this->get_data_value('alias'),$this->get_data_value('author-link'))); - $owner_namematch = (($this->get_data_value('owner-name')) && $this->get_data_value('owner-name') == $this->get_data_value('author-name')); + } elseif ($this->getDataValue('owner-link')) { + $owner_linkmatch = (($this->getDataValue('owner-link')) && link_compare($this->getDataValue('owner-link'), $this->getDataValue('author-link'))); + $alias_linkmatch = (($this->getDataValue('alias')) && link_compare($this->getDataValue('alias'), $this->getDataValue('author-link'))); + $owner_namematch = (($this->getDataValue('owner-name')) && $this->getDataValue('owner-name') == $this->getDataValue('author-name')); 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 @@ -768,15 +802,16 @@ class Item extends BaseObject { // But it could be somebody else with the same name. It just isn't highly likely. - $this->owner_photo = $this->get_data_value('owner-avatar'); - $this->owner_name = $this->get_data_value('owner-name'); + $this->owner_photo = $this->getDataValue('owner-avatar'); + $this->owner_name = $this->getDataValue('owner-name'); $this->wall_to_wall = true; // If it is our contact, use a friendly redirect link - if ((link_compare($this->get_data_value('owner-link'),$this->get_data_value('url'))) - && ($this->get_data_value('network') === NETWORK_DFRN)) { - $this->owner_url = $this->get_redirect_url(); + if ((link_compare($this->getDataValue('owner-link'), $this->getDataValue('url'))) + && ($this->getDataValue('network') === NETWORK_DFRN) + ) { + $this->owner_url = $this->getRedirectUrl(); } else { - $this->owner_url = zrl($this->get_data_value('owner-link')); + $this->owner_url = zrl($this->getDataValue('owner-link')); } } } @@ -784,31 +819,35 @@ class Item extends BaseObject { } if (!$this->wall_to_wall) { - $this->set_template('wall'); + $this->setTemplate('wall'); $this->owner_url = ''; $this->owner_photo = ''; $this->owner_name = ''; } } - private function is_wall_to_wall() { + private function isWallToWall() + { return $this->wall_to_wall; } - private function get_owner_url() { + private function getOwnerUrl() + { return $this->owner_url; } - private function get_owner_photo() { + private function getOwnerPhoto() + { return $this->owner_photo; } - private function get_owner_name() { + private function getOwnerName() + { return $this->owner_name; } - private function is_visiting() { + private function isVisiting() + { return $this->visiting; } - } From 297aa1a528c94f05ec384a625faec744e3ec17fb Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Thu, 16 Nov 2017 15:58:50 -0500 Subject: [PATCH 023/175] Update function call missed function call change --- src/Core/Conversation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Conversation.php b/src/Core/Conversation.php index bff754580..ab9568bd7 100644 --- a/src/Core/Conversation.php +++ b/src/Core/Conversation.php @@ -158,7 +158,7 @@ class Conversation extends BaseObject continue; } - $item_data = $item->get_template_data($conv_responses); + $item_data = $item->getTemplateData($conv_responses); if (!$item_data) { logger('[ERROR] Conversation::get_template_data : Failed to get item template data ('. $item->getId() .').', LOGGER_DEBUG); From ecd9e3e07e5a952ddf6317b77a6861aa2966dc7b Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Thu, 16 Nov 2017 13:05:41 -0500 Subject: [PATCH 024/175] BaseObject moved to src/Core BaseObject moved to Friendica\Core namespace. References and function calls updated. --- index.php | 13 +++-------- object/BaseObject.php | 35 ----------------------------- object/Conversation.php | 15 ++++++++----- object/Item.php | 12 ++++++---- object/TemplateEngine.php | 12 ++++++---- src/Core/BaseObject.php | 47 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 76 insertions(+), 58 deletions(-) delete mode 100644 object/BaseObject.php create mode 100644 src/Core/BaseObject.php diff --git a/index.php b/index.php index 591549890..c31b1adc0 100644 --- a/index.php +++ b/index.php @@ -1,26 +1,21 @@ backend = false; /** - * * Load the configuration file which contains our DB credentials. * Ignore errors. If the file doesn't exist or is empty, we are running in * installation mode. - * */ $install = ((file_exists('.htconfig.php') && filesize('.htconfig.php')) ? false : true); diff --git a/object/BaseObject.php b/object/BaseObject.php deleted file mode 100644 index 15c7d8dc6..000000000 --- a/object/BaseObject.php +++ /dev/null @@ -1,35 +0,0 @@ - Date: Thu, 16 Nov 2017 13:24:59 -0500 Subject: [PATCH 025/175] Conversation to src object/Conversation moved to Friendica\Core namespace. --- include/conversation.php | 6 ++- {object => src/Core}/Conversation.php | 66 +++++++++++++++++---------- 2 files changed, 46 insertions(+), 26 deletions(-) rename {object => src/Core}/Conversation.php (73%) diff --git a/include/conversation.php b/include/conversation.php index 0e814c666..d24a01b45 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1,7 +1,10 @@ set_mode($mode); $this->preview = $preview; } @@ -32,13 +36,15 @@ class Conversation extends BaseObject { /** * Set the mode we'll be displayed on */ - private function set_mode($mode) { - if($this->get_mode() == $mode) + private function set_mode($mode) + { + if ($this->get_mode() == $mode) { return; + } $a = $this->get_app(); - switch($mode) { + switch ($mode) { case 'network': case 'notes': $this->profile_owner = local_user(); @@ -46,11 +52,11 @@ class Conversation extends BaseObject { break; case 'profile': $this->profile_owner = $a->profile['profile_uid']; - $this->writable = can_write_wall($a,$this->profile_owner); + $this->writable = can_write_wall($a, $this->profile_owner); break; case 'display': $this->profile_owner = $a->profile['uid']; - $this->writable = can_write_wall($a,$this->profile_owner); + $this->writable = can_write_wall($a, $this->profile_owner); break; default: logger('[ERROR] Conversation::set_mode : Unhandled mode ('. $mode .').', LOGGER_DEBUG); @@ -63,28 +69,32 @@ class Conversation extends BaseObject { /** * Get mode */ - public function get_mode() { + public function get_mode() + { return $this->mode; } /** * Check if page is writable */ - public function is_writable() { + public function is_writable() + { return $this->writable; } /** * Check if page is a preview */ - public function is_preview() { + public function is_preview() + { return $this->preview; } /** * Get profile owner */ - public function get_profile_owner() { + public function get_profile_owner() + { return $this->profile_owner; } @@ -95,13 +105,16 @@ class Conversation extends BaseObject { * _ The inserted item on success * _ false on failure */ - public function add_thread($item) { + public function add_thread($item) + { $item_id = $item->get_id(); - if(!$item_id) { + + if (!$item_id) { logger('[ERROR] Conversation::add_thread : Item has no ID!!', LOGGER_DEBUG); return false; } - if($this->get_thread($item->get_id())) { + + if ($this->get_thread($item->get_id())) { logger('[WARN] Conversation::add_thread : Thread already exists ('. $item->get_id() .').', LOGGER_DEBUG); return false; } @@ -109,16 +122,19 @@ class Conversation extends BaseObject { /* * Only add will be displayed */ - if($item->get_data_value('network') === NETWORK_MAIL && local_user() != $item->get_data_value('uid')) { + if ($item->get_data_value('network') === NETWORK_MAIL && local_user() != $item->get_data_value('uid')) { logger('[WARN] Conversation::add_thread : Thread is a mail ('. $item->get_id() .').', LOGGER_DEBUG); return false; } - if($item->get_data_value('verb') === ACTIVITY_LIKE || $item->get_data_value('verb') === ACTIVITY_DISLIKE) { + + if ($item->get_data_value('verb') === ACTIVITY_LIKE || $item->get_data_value('verb') === ACTIVITY_DISLIKE) { logger('[WARN] Conversation::add_thread : Thread is a (dis)like ('. $item->get_id() .').', LOGGER_DEBUG); return false; } + $item->set_conversation($this); $this->threads[] = $item; + return end($this->threads); } @@ -131,19 +147,19 @@ class Conversation extends BaseObject { * _ The data requested on success * _ false on failure */ - public function get_template_data($conv_responses) { + public function get_template_data($conv_responses) + { $a = get_app(); $result = array(); - $i = 0; - foreach($this->threads as $item) { + foreach ($this->threads as $item) { if($item->get_data_value('network') === NETWORK_MAIL && local_user() != $item->get_data_value('uid')) continue; $item_data = $item->get_template_data($conv_responses); - if(!$item_data) { + if (!$item_data) { logger('[ERROR] Conversation::get_template_data : Failed to get item template data ('. $item->get_id() .').', LOGGER_DEBUG); return false; } @@ -160,10 +176,12 @@ class Conversation extends BaseObject { * _ The found item on success * _ false on failure */ - private function get_thread($id) { - foreach($this->threads as $item) { - if($item->get_id() == $id) + private function get_thread($id) + { + foreach ($this->threads as $item) { + if ($item->get_id() == $id) { return $item; + } } return false; From d127d0638867b7fb991121d4c386e293572ccf94 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Thu, 16 Nov 2017 15:54:03 -0500 Subject: [PATCH 026/175] Item to src object/Item moved to Friendica\Core namespace. --- include/conversation.php | 5 +- src/Core/Conversation.php | 25 +-- {object => src/Core}/Item.php | 331 +++++++++++++++++++--------------- 3 files changed, 200 insertions(+), 161 deletions(-) rename {object => src/Core}/Item.php (67%) diff --git a/include/conversation.php b/include/conversation.php index d24a01b45..7abe97e06 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -5,6 +5,7 @@ use Friendica\App; use Friendica\Core\Config; use Friendica\Core\Conversation; +use Friendica\Core\Item; use Friendica\Core\PConfig; use Friendica\Core\System; use Friendica\Database\DBM; @@ -863,8 +864,6 @@ function conversation(App $a, $items, $mode, $update, $preview = false) { // Normal View $page_template = get_markup_template("threaded_conversation.tpl"); - require_once 'object/Item.php'; - $conv = new Conversation($mode, $preview); /* @@ -1533,7 +1532,7 @@ function get_responses($conv_responses, $response_verbs, $ob, $item) { if (count($ret[$v]['list']) > MAX_LIKERS) { $ret[$v]['list_part'] = array_slice($ret[$v]['list'], 0, MAX_LIKERS); array_push($ret[$v]['list_part'], '' . t('View all') . ''); + . (($ob) ? $ob->getId() : $item['id']) . '">' . t('View all') . ''); } else { $ret[$v]['list_part'] = ''; } diff --git a/src/Core/Conversation.php b/src/Core/Conversation.php index 13ba8df21..bff754580 100644 --- a/src/Core/Conversation.php +++ b/src/Core/Conversation.php @@ -9,9 +9,9 @@ if (class_exists('Conversation')) { } use Friendica\Core\BaseObject; +use Friendica\Core\Item; require_once 'boot.php'; -require_once 'object/Item.php'; require_once 'include/text.php'; /** @@ -107,32 +107,32 @@ class Conversation extends BaseObject */ public function add_thread($item) { - $item_id = $item->get_id(); + $item_id = $item->getId(); if (!$item_id) { logger('[ERROR] Conversation::add_thread : Item has no ID!!', LOGGER_DEBUG); return false; } - if ($this->get_thread($item->get_id())) { - logger('[WARN] Conversation::add_thread : Thread already exists ('. $item->get_id() .').', LOGGER_DEBUG); + if ($this->get_thread($item->getId())) { + logger('[WARN] Conversation::add_thread : Thread already exists ('. $item->getId() .').', LOGGER_DEBUG); return false; } /* * Only add will be displayed */ - if ($item->get_data_value('network') === NETWORK_MAIL && local_user() != $item->get_data_value('uid')) { - logger('[WARN] Conversation::add_thread : Thread is a mail ('. $item->get_id() .').', LOGGER_DEBUG); + if ($item->getDataValue('network') === NETWORK_MAIL && local_user() != $item->getDataValue('uid')) { + logger('[WARN] Conversation::add_thread : Thread is a mail ('. $item->getId() .').', LOGGER_DEBUG); return false; } - if ($item->get_data_value('verb') === ACTIVITY_LIKE || $item->get_data_value('verb') === ACTIVITY_DISLIKE) { - logger('[WARN] Conversation::add_thread : Thread is a (dis)like ('. $item->get_id() .').', LOGGER_DEBUG); + if ($item->getDataValue('verb') === ACTIVITY_LIKE || $item->getDataValue('verb') === ACTIVITY_DISLIKE) { + logger('[WARN] Conversation::add_thread : Thread is a (dis)like ('. $item->getId() .').', LOGGER_DEBUG); return false; } - $item->set_conversation($this); + $item->setConversation($this); $this->threads[] = $item; return end($this->threads); @@ -154,13 +154,14 @@ class Conversation extends BaseObject $i = 0; foreach ($this->threads as $item) { - if($item->get_data_value('network') === NETWORK_MAIL && local_user() != $item->get_data_value('uid')) + if ($item->getDataValue('network') === NETWORK_MAIL && local_user() != $item->getDataValue('uid')) { continue; + } $item_data = $item->get_template_data($conv_responses); if (!$item_data) { - logger('[ERROR] Conversation::get_template_data : Failed to get item template data ('. $item->get_id() .').', LOGGER_DEBUG); + logger('[ERROR] Conversation::get_template_data : Failed to get item template data ('. $item->getId() .').', LOGGER_DEBUG); return false; } $result[] = $item_data; @@ -179,7 +180,7 @@ class Conversation extends BaseObject private function get_thread($id) { foreach ($this->threads as $item) { - if ($item->get_id() == $id) { + if ($item->getId() == $id) { return $item; } } diff --git a/object/Item.php b/src/Core/Item.php similarity index 67% rename from object/Item.php rename to src/Core/Item.php index 0dab971d1..681593d0e 100644 --- a/object/Item.php +++ b/src/Core/Item.php @@ -1,7 +1,9 @@ get_app(); $this->data = $data; - $this->set_template('wall'); - $this->toplevel = ($this->get_id() == $this->get_data_value('parent')); + $this->setTemplate('wall'); + $this->toplevel = ($this->getId() == $this->getDataValue('parent')); if (is_array($_SESSION['remote'])) { foreach ($_SESSION['remote'] as $visitor) { - if ($visitor['cid'] == $this->get_data_value('contact-id')) { + if ($visitor['cid'] == $this->getDataValue('contact-id')) { $this->visiting = true; break; } } } - $this->writable = ($this->get_data_value('writable') || $this->get_data_value('self')); + $this->writable = ($this->getDataValue('writable') || $this->getDataValue('self')); $ssl_state = ((local_user()) ? true : false); - $this->redirect_url = 'redir/' . $this->get_data_value('cid') ; + $this->redirect_url = 'redir/' . $this->getDataValue('cid'); - if (Config::get('system','thread_allow') && $a->theme_thread_allow && !$this->is_toplevel()) { + if (Config::get('system', 'thread_allow') && $a->theme_thread_allow && !$this->isToplevel()) { $this->threaded = true; } @@ -83,7 +88,7 @@ class Item extends BaseObject { $item['pagedrop'] = $data['pagedrop']; $child = new Item($item); - $this->add_child($child); + $this->addChild($child); } } } @@ -95,14 +100,15 @@ class Item extends BaseObject { * _ The data requested on success * _ false on failure */ - public function get_template_data($conv_responses, $thread_level=1) { - require_once("mod/proxy.php"); + public function getTemplateData($conv_responses, $thread_level = 1) + { + require_once "mod/proxy.php"; $result = array(); $a = $this->get_app(); - $item = $this->get_data(); + $item = $this->getData(); $edited = false; // If the time between "created" and "edited" differs we add // a notice that the post was edited. @@ -126,16 +132,16 @@ class Item extends BaseObject { $indent = ''; $shiny = ''; $osparkle = ''; - $total_children = $this->count_descendants(); + $total_children = $this->countDescendants(); - $conv = $this->get_conversation(); + $conv = $this->getConversation(); $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); $shareable = ((($conv->get_profile_owner() == local_user()) && ($item['private'] != 1)) ? true : false); - if (local_user() && link_compare($a->contact['url'],$item['author-link'])) { + if (local_user() && link_compare($a->contact['url'], $item['author-link'])) { if ($item["event-id"] != 0) { $edpost = array("events/event/".$item['event-id'], t("Edit")); } else { @@ -145,27 +151,27 @@ class Item extends BaseObject { $edpost = false; } - if (($this->get_data_value('uid') == local_user()) || $this->is_visiting()) { + if (($this->getDataValue('uid') == local_user()) || $this->isVisiting()) { $dropping = true; } $drop = array( 'dropping' => $dropping, - 'pagedrop' => ((feature_enabled($conv->get_profile_owner(),'multi_delete')) ? $item['pagedrop'] : ''), + 'pagedrop' => ((feature_enabled($conv->get_profile_owner(), 'multi_delete')) ? $item['pagedrop'] : ''), 'select' => t('Select'), 'delete' => t('Delete'), ); $filer = (($conv->get_profile_owner() == local_user()) ? t("save to folder") : false); - $diff_author = ((link_compare($item['url'],$item['author-link'])) ? false : true); - $profile_name = htmlentities(((strlen($item['author-name'])) && $diff_author) ? $item['author-name'] : $item['name']); + $diff_author = ((link_compare($item['url'], $item['author-link'])) ? false : true); + $profile_name = htmlentities(((strlen($item['author-name'])) && $diff_author) ? $item['author-name'] : $item['name']); if ($item['author-link'] && (! $item['author-name'])) { $profile_name = $item['author-link']; } $sp = false; - $profile_link = best_link_url($item,$sp); + $profile_link = best_link_url($item, $sp); if ($profile_link === 'mailbox') { $profile_link = ''; } @@ -195,14 +201,13 @@ class Item extends BaseObject { } $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => ''); - call_hooks('render_location',$locate); + call_hooks('render_location', $locate); $location = ((strlen($locate['html'])) ? $locate['html'] : render_location_dummy($locate)); $tags=array(); $hashtags = array(); $mentions = array(); - /*foreach(explode(',',$item['tag']) as $tag){ $tag = trim($tag); if ($tag!="") { @@ -217,9 +222,10 @@ class Item extends BaseObject { // process action responses - e.g. like/dislike/attend/agree/whatever $response_verbs = array('like'); - if (feature_enabled($conv->get_profile_owner(),'dislike')) { + if (feature_enabled($conv->get_profile_owner(), 'dislike')) { $response_verbs[] = 'dislike'; } + if ($item['object-type'] === ACTIVITY_OBJ_EVENT) { $response_verbs[] = 'attendyes'; $response_verbs[] = 'attendno'; @@ -230,10 +236,10 @@ class Item extends BaseObject { } } - $responses = get_responses($conv_responses,$response_verbs,$this,$item); + $responses = get_responses($conv_responses, $response_verbs, $this, $item); - foreach ($response_verbs as $value=>$verbs) { - $responses[$verbs]['output'] = ((x($conv_responses[$verbs],$item['uri'])) ? format_like($conv_responses[$verbs][$item['uri']],$conv_responses[$verbs][$item['uri'] . '-l'],$verbs,$item['uri']) : ''); + foreach ($response_verbs as $value => $verbs) { + $responses[$verbs]['output'] = ((x($conv_responses[$verbs], $item['uri'])) ? format_like($conv_responses[$verbs][$item['uri']], $conv_responses[$verbs][$item['uri'] . '-l'], $verbs, $item['uri']) : ''); } /* @@ -241,13 +247,13 @@ class Item extends BaseObject { * And the conv mode may change when we change the conv, or it changes its mode * Maybe we should establish a way to be notified about conversation changes */ - $this->check_wall_to_wall(); + $this->checkWallToWall(); - if ($this->is_wall_to_wall() && ($this->get_owner_url() == $this->get_redirect_url())) { + if ($this->isWallToWall() && ($this->getOwnerUrl() == $this->getRedirectUrl())) { $osparkle = ' sparkle'; } - if ($this->is_toplevel()) { + if ($this->isToplevel()) { if ($conv->get_profile_owner() == local_user()) { $isstarred = (($item['starred']) ? "starred" : "unstarred"); @@ -272,7 +278,7 @@ class Item extends BaseObject { } $tagger = ''; - if(feature_enabled($conv->get_profile_owner(),'commtag')) { + if (feature_enabled($conv->get_profile_owner(), 'commtag')) { $tagger = array( 'add' => t("add tag"), 'class' => "", @@ -286,22 +292,22 @@ class Item extends BaseObject { if ($conv->is_writable()) { $buttons = array( 'like' => array( t("I like this \x28toggle\x29"), t("like")), - 'dislike' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? array( t("I don't like this \x28toggle\x29"), t("dislike")) : ''), + 'dislike' => ((feature_enabled($conv->get_profile_owner(), 'dislike')) ? array( t("I don't like this \x28toggle\x29"), t("dislike")) : ''), ); if ($shareable) { $buttons['share'] = array( t('Share this'), t('share')); } } - $comment = $this->get_comment_box($indent); + $comment = $this->getCommentBox($indent); - if (strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0){ + if (strcmp(datetime_convert('UTC', 'UTC', $item['created']), datetime_convert('UTC', 'UTC', 'now - 12 hours')) > 0) { $shiny = 'shiny'; } localize_item($item); - $body = prepare_body($item,true); + $body = prepare_body($item, true); list($categories, $folders) = get_cats_and_terms($item); @@ -311,21 +317,21 @@ class Item extends BaseObject { $name_e = template_escape($profile_name); $title_e = template_escape($item['title']); $location_e = template_escape($location); - $owner_name_e = template_escape($this->get_owner_name()); + $owner_name_e = template_escape($this->getOwnerName()); } else { $body_e = $body; $text_e = strip_tags($body); $name_e = $profile_name; $title_e = $item['title']; $location_e = $location; - $owner_name_e = $this->get_owner_name(); + $owner_name_e = $this->getOwnerName(); } // Disable features that aren't available in several networks /// @todo Add NETWORK_DIASPORA when it will pass this information if (!in_array($item["item_network"], array(NETWORK_DFRN)) && isset($buttons["dislike"])) { - unset($buttons["dislike"],$isevent); + unset($buttons["dislike"], $isevent); $tagger = ''; } @@ -338,8 +344,8 @@ class Item extends BaseObject { } $tmp_item = array( - 'template' => $this->get_template(), - 'type' => implode("",array_slice(explode("/",$item['verb']),-1)), + 'template' => $this->getTemplate(), + 'type' => implode("", array_slice(explode("/", $item['verb']), -1)), 'tags' => $item['tags'], 'hashtags' => $item['hashtags'], 'mentions' => $item['mentions'], @@ -351,12 +357,12 @@ class Item extends BaseObject { 'folders' => $folders, 'body' => $body_e, 'text' => $text_e, - 'id' => $this->get_id(), + 'id' => $this->getId(), 'guid' => urlencode($item['guid']), 'isevent' => $isevent, 'attend' => $attend, - 'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])), - 'olinktitle' => sprintf( t('View %s\'s profile @ %s'), htmlentities($this->get_owner_name()), ((strlen($item['owner-link'])) ? $item['owner-link'] : $item['url'])), + 'linktitle' => sprintf(t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])), + 'olinktitle' => sprintf(t('View %s\'s profile @ %s'), htmlentities($this->getOwnerName()), ((strlen($item['owner-link'])) ? $item['owner-link'] : $item['url'])), 'to' => t('to'), 'via' => t('via'), 'wall' => t('Wall-to-Wall'), @@ -369,23 +375,23 @@ class Item extends BaseObject { 'sparkle' => $sparkle, 'title' => $title_e, 'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'), - 'ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])), + 'ago' => (($item['app']) ? sprintf(t('%s from %s'), relative_date($item['created']), $item['app']) : relative_date($item['created'])), 'app' => $item['app'], 'created' => relative_date($item['created']), 'lock' => $lock, 'location' => $location_e, 'indent' => $indent, 'shiny' => $shiny, - 'owner_url' => $this->get_owner_url(), + 'owner_url' => $this->getOwnerUrl(), 'owner_photo' => $a->remove_baseurl(proxy_url($item['owner-thumb'], false, PROXY_SIZE_THUMB)), 'owner_name' => htmlentities($owner_name_e), 'plink' => get_plink($item), - 'edpost' => ((feature_enabled($conv->get_profile_owner(),'edit_posts')) ? $edpost : ''), + 'edpost' => ((feature_enabled($conv->get_profile_owner(), 'edit_posts')) ? $edpost : ''), 'isstarred' => $isstarred, - 'star' => ((feature_enabled($conv->get_profile_owner(),'star_posts')) ? $star : ''), - 'ignore' => ((feature_enabled($conv->get_profile_owner(),'ignore_posts')) ? $ignore : ''), + 'star' => ((feature_enabled($conv->get_profile_owner(), 'star_posts')) ? $star : ''), + 'ignore' => ((feature_enabled($conv->get_profile_owner(), 'ignore_posts')) ? $ignore : ''), 'tagger' => $tagger, - 'filer' => ((feature_enabled($conv->get_profile_owner(),'filing')) ? $filer : ''), + 'filer' => ((feature_enabled($conv->get_profile_owner(), 'filing')) ? $filer : ''), 'drop' => $drop, 'vote' => $buttons, 'like' => $responses['like']['output'], @@ -410,16 +416,16 @@ class Item extends BaseObject { $result = $arr['output']; $result['children'] = array(); - $children = $this->get_children(); + $children = $this->getChildren(); $nb_children = count($children); if ($nb_children > 0) { foreach ($children as $child) { - $result['children'][] = $child->get_template_data($conv_responses, $thread_level + 1); + $result['children'][] = $child->getTemplateData($conv_responses, $thread_level + 1); } // Collapse if (($nb_children > 2) || ($thread_level > 1)) { $result['children'][0]['comment_firstcollapsed'] = true; - $result['children'][0]['num_comments'] = sprintf( tt('%d comment','%d comments',$total_children),$total_children ); + $result['children'][0]['num_comments'] = sprintf(tt('%d comment', '%d comments', $total_children), $total_children); $result['children'][0]['hidden_comments_num'] = $total_children; $result['children'][0]['hidden_comments_text'] = tt('comment', 'comments', $total_children); $result['children'][0]['hide_text'] = t('show more'); @@ -431,15 +437,15 @@ class Item extends BaseObject { } } - if ($this->is_toplevel()) { - $result['total_comments_num'] = "$total_children"; - $result['total_comments_text'] = tt('comment', 'comments', $total_children); - } + if ($this->isToplevel()) { + $result['total_comments_num'] = "$total_children"; + $result['total_comments_text'] = tt('comment', 'comments', $total_children); + } $result['private'] = $item['private']; - $result['toplevel'] = ($this->is_toplevel() ? 'toplevel_item' : ''); + $result['toplevel'] = ($this->isToplevel() ? 'toplevel_item' : ''); - if ($this->is_threaded()) { + if ($this->isThreaded()) { $result['flatten'] = false; $result['threaded'] = true; } else { @@ -450,75 +456,85 @@ class Item extends BaseObject { return $result; } - public function get_id() { - return $this->get_data_value('id'); + public function getId() + { + return $this->getDataValue('id'); } - public function is_threaded() { + public function isThreaded() + { return $this->threaded; } /** * Add a child item */ - public function add_child(Item $item) { - $item_id = $item->get_id(); + public function addChild(Item $item) + { + $item_id = $item->getId(); if (!$item_id) { - logger('[ERROR] Item::add_child : Item has no ID!!', LOGGER_DEBUG); + logger('[ERROR] Item::addChild : Item has no ID!!', LOGGER_DEBUG); return false; - } elseif ($this->get_child($item->get_id())) { - logger('[WARN] Item::add_child : Item already exists ('. $item->get_id() .').', LOGGER_DEBUG); + } elseif ($this->getChild($item->getId())) { + logger('[WARN] Item::addChild : Item already exists ('. $item->getId() .').', LOGGER_DEBUG); return false; } /* * Only add what will be displayed */ - if ($item->get_data_value('network') === NETWORK_MAIL && local_user() != $item->get_data_value('uid')) { + if ($item->getDataValue('network') === NETWORK_MAIL && local_user() != $item->getDataValue('uid')) { return false; - } elseif (activity_match($item->get_data_value('verb'),ACTIVITY_LIKE) || activity_match($item->get_data_value('verb'),ACTIVITY_DISLIKE)) { + } elseif (activity_match($item->getDataValue('verb'), ACTIVITY_LIKE) || activity_match($item->getDataValue('verb'), ACTIVITY_DISLIKE)) { return false; } - $item->set_parent($this); + $item->setParent($this); $this->children[] = $item; + return end($this->children); } /** * Get a child by its ID */ - public function get_child($id) { - foreach ($this->get_children() as $child) { - if ($child->get_id() == $id) { + public function getChild($id) + { + foreach ($this->getChildren() as $child) { + if ($child->getId() == $id) { return $child; } } + return null; } /** * Get all ou children */ - public function get_children() { + public function getChildren() + { return $this->children; } /** * Set our parent */ - protected function set_parent($item) { - $parent = $this->get_parent(); - if($parent) { - $parent->remove_child($this); + protected function setParent($item) + { + $parent = $this->getParent(); + if ($parent) { + $parent->removeChild($this); } + $this->parent = $item; - $this->set_conversation($item->get_conversation()); + $this->setConversation($item->getConversation()); } /** * Remove our parent */ - protected function remove_parent() { + protected function removeParent() + { $this->parent = null; $this->conversation = null; } @@ -526,46 +542,50 @@ class Item extends BaseObject { /** * Remove a child */ - public function remove_child($item) { - $id = $item->get_id(); - foreach ($this->get_children() as $key => $child) { - if ($child->get_id() == $id) { - $child->remove_parent(); + public function removeChild($item) + { + $id = $item->getId(); + foreach ($this->getChildren() as $key => $child) { + if ($child->getId() == $id) { + $child->removeParent(); unset($this->children[$key]); // Reindex the array, in order to make sure there won't be any trouble on loops using count() $this->children = array_values($this->children); return true; } } - logger('[WARN] Item::remove_child : Item is not a child ('. $id .').', LOGGER_DEBUG); + logger('[WARN] Item::removeChild : Item is not a child ('. $id .').', LOGGER_DEBUG); return false; } /** * Get parent item */ - protected function get_parent() { + protected function getParent() + { return $this->parent; } /** * set conversation */ - public function set_conversation($conv) { + public function setConversation($conv) + { $previous_mode = ($this->conversation ? $this->conversation->get_mode() : ''); $this->conversation = $conv; // Set it on our children too - foreach ($this->get_children() as $child) { - $child->set_conversation($conv); + foreach ($this->getChildren() as $child) { + $child->setConversation($conv); } } /** * get conversation */ - public function get_conversation() { + public function getConversation() + { return $this->conversation; } @@ -574,7 +594,8 @@ class Item extends BaseObject { * * We shouldn't need this */ - public function get_data() { + public function getData() + { return $this->data; } @@ -585,9 +606,10 @@ class Item extends BaseObject { * _ value on success * _ false on failure */ - public function get_data_value($name) { + public function getDataValue($name) + { if (!isset($this->data[$name])) { -// logger('[ERROR] Item::get_data_value : Item has no value name "'. $name .'".', LOGGER_DEBUG); + // logger('[ERROR] Item::getDataValue : Item has no value name "'. $name .'".', LOGGER_DEBUG); return false; } @@ -597,9 +619,10 @@ class Item extends BaseObject { /** * Set template */ - private function set_template($name) { + private function setTemplate($name) + { if (!x($this->available_templates, $name)) { - logger('[ERROR] Item::set_template : Template not available ("'. $name .'").', LOGGER_DEBUG); + logger('[ERROR] Item::setTemplate : Template not available ("'. $name .'").', LOGGER_DEBUG); return false; } @@ -609,22 +632,25 @@ class Item extends BaseObject { /** * Get template */ - private function get_template() { + private function getTemplate() + { return $this->template; } /** * Check if this is a toplevel post */ - private function is_toplevel() { + private function isToplevel() + { return $this->toplevel; } /** * Check if this is writable */ - private function is_writable() { - $conv = $this->get_conversation(); + private function isWritable() + { + $conv = $this->getConversation(); if ($conv) { // This will allow us to comment on wall-to-wall items owned by our friends @@ -636,7 +662,7 @@ class Item extends BaseObject { } // this fixes for visitors - return ($this->writable || ($this->is_visiting() && $conv->get_mode() == 'profile')); + return ($this->writable || ($this->isVisiting() && $conv->get_mode() == 'profile')); } return $this->writable; } @@ -644,21 +670,24 @@ class Item extends BaseObject { /** * Count the total of our descendants */ - private function count_descendants() { - $children = $this->get_children(); + private function countDescendants() + { + $children = $this->getChildren(); $total = count($children); if ($total > 0) { foreach ($children as $child) { - $total += $child->count_descendants(); + $total += $child->countDescendants(); } } + return $total; } /** * Get the template for the comment box */ - private function get_comment_box_template() { + private function getCommentBoxTemplate() + { return $this->comment_box_template; } @@ -669,38 +698,43 @@ class Item extends BaseObject { * _ The comment box string (empty if no comment box) * _ false on failure */ - private function get_comment_box($indent) { + private function getCommentBox($indent) + { $a = $this->get_app(); - if (!$this->is_toplevel() && !(Config::get('system','thread_allow') && $a->theme_thread_allow)) { + if (!$this->isToplevel() && !(Config::get('system', 'thread_allow') && $a->theme_thread_allow)) { return ''; } $comment_box = ''; - $conv = $this->get_conversation(); - $template = get_markup_template($this->get_comment_box_template()); + $conv = $this->getConversation(); + $template = get_markup_template($this->getCommentBoxTemplate()); $ww = ''; - if ( ($conv->get_mode() === 'network') && $this->is_wall_to_wall() ) + if (($conv->get_mode() === 'network') && $this->isWallToWall()) { $ww = 'ww'; + } - if ($conv->is_writable() && $this->is_writable()) { + if ($conv->is_writable() && $this->isWritable()) { $qc = $qcomment = null; /* * Hmmm, code depending on the presence of a particular plugin? * This should be better if done by a hook */ - if (in_array('qcomment',$a->plugins)) { - $qc = ((local_user()) ? PConfig::get(local_user(),'qcomment','words') : null); - $qcomment = (($qc) ? explode("\n",$qc) : null); + if (in_array('qcomment', $a->plugins)) { + $qc = ((local_user()) ? PConfig::get(local_user(), 'qcomment', 'words') : null); + $qcomment = (($qc) ? explode("\n", $qc) : null); } - $comment_box = replace_macros($template,array( + + $comment_box = replace_macros( + $template, + array( '$return_path' => $a->query_string, - '$threaded' => $this->is_threaded(), -// '$jsreload' => (($conv->get_mode() === 'display') ? $_SESSION['return_url'] : ''), + '$threaded' => $this->isThreaded(), + // '$jsreload' => (($conv->get_mode() === 'display') ? $_SESSION['return_url'] : ''), '$jsreload' => '', '$type' => (($conv->get_mode() === 'profile') ? 'wall-comment' : 'net-comment'), - '$id' => $this->get_id(), - '$parent' => $this->get_id(), + '$id' => $this->getId(), + '$parent' => $this->getId(), '$qcomment' => $qcomment, '$profile_uid' => $conv->get_profile_owner(), '$mylink' => $a->remove_baseurl($a->contact['url']), @@ -716,32 +750,34 @@ class Item extends BaseObject { '$edimg' => t('Image'), '$edurl' => t('Link'), '$edvideo' => t('Video'), - '$preview' => ((feature_enabled($conv->get_profile_owner(),'preview')) ? t('Preview') : ''), + '$preview' => ((feature_enabled($conv->get_profile_owner(), 'preview')) ? t('Preview') : ''), '$indent' => $indent, '$sourceapp' => t($a->sourcename), '$ww' => (($conv->get_mode() === 'network') ? $ww : ''), - '$rand_num' => random_digits(12) - )); + '$rand_num' => random_digits(12)) + ); } return $comment_box; } - private function get_redirect_url() { + private function getRedirectUrl() + { return $this->redirect_url; } /** * Check if we are a wall to wall item and set the relevant properties */ - protected function check_wall_to_wall() { + protected function checkWallToWall() + { $a = $this->get_app(); - $conv = $this->get_conversation(); + $conv = $this->getConversation(); $this->wall_to_wall = false; - if($this->is_toplevel()) { - if($conv->get_mode() !== 'profile') { - if($this->get_data_value('wall') && !$this->get_data_value('self')) { + if ($this->isToplevel()) { + if ($conv->get_mode() !== 'profile') { + if ($this->getDataValue('wall') && !$this->getDataValue('self')) { // On the network page, I am the owner. On the display page it will be the profile owner. // This will have been stored in $a->page_contact by our calling page. // Put this person as the wall owner of the wall-to-wall notice. @@ -750,14 +786,12 @@ class Item extends BaseObject { $this->owner_photo = $a->page_contact['thumb']; $this->owner_name = $a->page_contact['name']; $this->wall_to_wall = true; - } elseif($this->get_data_value('owner-link')) { - - $owner_linkmatch = (($this->get_data_value('owner-link')) && link_compare($this->get_data_value('owner-link'),$this->get_data_value('author-link'))); - $alias_linkmatch = (($this->get_data_value('alias')) && link_compare($this->get_data_value('alias'),$this->get_data_value('author-link'))); - $owner_namematch = (($this->get_data_value('owner-name')) && $this->get_data_value('owner-name') == $this->get_data_value('author-name')); + } elseif ($this->getDataValue('owner-link')) { + $owner_linkmatch = (($this->getDataValue('owner-link')) && link_compare($this->getDataValue('owner-link'), $this->getDataValue('author-link'))); + $alias_linkmatch = (($this->getDataValue('alias')) && link_compare($this->getDataValue('alias'), $this->getDataValue('author-link'))); + $owner_namematch = (($this->getDataValue('owner-name')) && $this->getDataValue('owner-name') == $this->getDataValue('author-name')); 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 @@ -768,15 +802,16 @@ class Item extends BaseObject { // But it could be somebody else with the same name. It just isn't highly likely. - $this->owner_photo = $this->get_data_value('owner-avatar'); - $this->owner_name = $this->get_data_value('owner-name'); + $this->owner_photo = $this->getDataValue('owner-avatar'); + $this->owner_name = $this->getDataValue('owner-name'); $this->wall_to_wall = true; // If it is our contact, use a friendly redirect link - if ((link_compare($this->get_data_value('owner-link'),$this->get_data_value('url'))) - && ($this->get_data_value('network') === NETWORK_DFRN)) { - $this->owner_url = $this->get_redirect_url(); + if ((link_compare($this->getDataValue('owner-link'), $this->getDataValue('url'))) + && ($this->getDataValue('network') === NETWORK_DFRN) + ) { + $this->owner_url = $this->getRedirectUrl(); } else { - $this->owner_url = zrl($this->get_data_value('owner-link')); + $this->owner_url = zrl($this->getDataValue('owner-link')); } } } @@ -784,31 +819,35 @@ class Item extends BaseObject { } if (!$this->wall_to_wall) { - $this->set_template('wall'); + $this->setTemplate('wall'); $this->owner_url = ''; $this->owner_photo = ''; $this->owner_name = ''; } } - private function is_wall_to_wall() { + private function isWallToWall() + { return $this->wall_to_wall; } - private function get_owner_url() { + private function getOwnerUrl() + { return $this->owner_url; } - private function get_owner_photo() { + private function getOwnerPhoto() + { return $this->owner_photo; } - private function get_owner_name() { + private function getOwnerName() + { return $this->owner_name; } - private function is_visiting() { + private function isVisiting() + { return $this->visiting; } - } From f96b841799c0d4348739c54cdbc79a987b7b2a18 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Thu, 16 Nov 2017 15:58:50 -0500 Subject: [PATCH 027/175] Update function call missed function call change --- src/Core/Conversation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Conversation.php b/src/Core/Conversation.php index bff754580..ab9568bd7 100644 --- a/src/Core/Conversation.php +++ b/src/Core/Conversation.php @@ -158,7 +158,7 @@ class Conversation extends BaseObject continue; } - $item_data = $item->get_template_data($conv_responses); + $item_data = $item->getTemplateData($conv_responses); if (!$item_data) { logger('[ERROR] Conversation::get_template_data : Failed to get item template data ('. $item->getId() .').', LOGGER_DEBUG); From 72749477edf4b3478cccd42c79159970356de0f8 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Thu, 16 Nov 2017 19:55:28 -0500 Subject: [PATCH 028/175] Remove condition Remove unneeded condition. --- src/Core/BaseObject.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Core/BaseObject.php b/src/Core/BaseObject.php index 6037f5983..ade8d9219 100644 --- a/src/Core/BaseObject.php +++ b/src/Core/BaseObject.php @@ -4,10 +4,6 @@ */ namespace Friendica\Core; -if (class_exists('BaseObject')) { - return; -} - require_once 'boot.php'; /** From 0cbc4153b30e1292672055364fac5502b9cba538 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Thu, 16 Nov 2017 19:59:40 -0500 Subject: [PATCH 029/175] More conditions Removed unneeded conditions. --- src/Core/Conversation.php | 4 ---- src/Core/Item.php | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/Core/Conversation.php b/src/Core/Conversation.php index ab9568bd7..4cb11d9ae 100644 --- a/src/Core/Conversation.php +++ b/src/Core/Conversation.php @@ -4,10 +4,6 @@ */ namespace Friendica\Core; -if (class_exists('Conversation')) { - return; -} - use Friendica\Core\BaseObject; use Friendica\Core\Item; diff --git a/src/Core/Item.php b/src/Core/Item.php index 681593d0e..20d4db005 100644 --- a/src/Core/Item.php +++ b/src/Core/Item.php @@ -4,10 +4,6 @@ */ namespace Friendica\Core; -if (class_exists('Item')) { - return; -} - use Friendica\Core\BaseObject; use Friendica\Core\Config; use Friendica\Core\PConfig; From 3687ef2f8cfbbe365cae8c1fe2956c77cf49ca19 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 17 Nov 2017 22:16:34 +0000 Subject: [PATCH 030/175] Another worker process moved --- include/Contact.php | 2 +- include/remove_contact.php | 24 ------------------------ src/Worker/RemoveContact.php | 22 ++++++++++++++++++++++ 3 files changed, 23 insertions(+), 25 deletions(-) delete mode 100644 include/remove_contact.php create mode 100644 src/Worker/RemoveContact.php diff --git a/include/Contact.php b/include/Contact.php index 5d34e4526..60bef93a5 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -68,7 +68,7 @@ function contact_remove($id) { dba::delete('contact', array('id' => $id)); // Delete the rest in the background - Worker::add(PRIORITY_LOW, 'remove_contact', $id); + Worker::add(PRIORITY_LOW, 'RemoveContact', $id); } diff --git a/include/remove_contact.php b/include/remove_contact.php deleted file mode 100644 index 9d4b1e4c3..000000000 --- a/include/remove_contact.php +++ /dev/null @@ -1,24 +0,0 @@ - $id)); - if ($r) { - return; - } - - // Now we delete all the depending table entries - dba::delete('contact', array('id' => $id)); -} diff --git a/src/Worker/RemoveContact.php b/src/Worker/RemoveContact.php new file mode 100644 index 000000000..2047de526 --- /dev/null +++ b/src/Worker/RemoveContact.php @@ -0,0 +1,22 @@ + $id)); + if ($r) { + return; + } + + // Now we delete all the depending table entries + dba::delete('contact', array('id' => $id)); + } +} From 911093580b6b27d744db49cc0982f3c986f987f7 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 18 Nov 2017 05:12:57 +0000 Subject: [PATCH 031/175] Missing dba --- src/Worker/Cron.php | 1 + src/Worker/RemoveContact.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Worker/Cron.php b/src/Worker/Cron.php index 00b28b6a5..810dca681 100644 --- a/src/Worker/Cron.php +++ b/src/Worker/Cron.php @@ -4,6 +4,7 @@ namespace Friendica\Worker; use Friendica\Core\Config; use Friendica\Core\Worker; use Friendica\Database\DBM; +use dba; Class Cron { public static function execute($parameter = '', $generation = 0) { diff --git a/src/Worker/RemoveContact.php b/src/Worker/RemoveContact.php index 2047de526..811b0295f 100644 --- a/src/Worker/RemoveContact.php +++ b/src/Worker/RemoveContact.php @@ -6,6 +6,7 @@ namespace Friendica\Worker; use Friendica\Core\Config; +use dba; class RemoveContact { public static function execute($id) { From f2e792662f09a158dda8302ecad2b3c70e4a5c88 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 18 Nov 2017 05:45:44 +0000 Subject: [PATCH 032/175] DBClean moved as well --- include/dbclean.php | 303 ----------------------------------------- src/Worker/Cron.php | 2 +- src/Worker/DBClean.php | 301 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 302 insertions(+), 304 deletions(-) delete mode 100644 include/dbclean.php create mode 100644 src/Worker/DBClean.php diff --git a/include/dbclean.php b/include/dbclean.php deleted file mode 100644 index 1e1dd9082..000000000 --- a/include/dbclean.php +++ /dev/null @@ -1,303 +0,0 @@ - 0))) { - Worker::add(PRIORITY_LOW, 'dbclean', $i); - } - } - } else { - remove_orphans($stage); - } -} - -/** - * @brief Remove orphaned database entries - * @param integer $stage What should be deleted? - * - * Values for $stage: - * ------------------ - * 1: Old global item entries from item table without user copy. - * 2: Items without parents. - * 3: Orphaned data from thread table. - * 4: Orphaned data from notify table. - * 5: Orphaned data from notify-threads table. - * 6: Orphaned data from sign table. - * 7: Orphaned data from term table. - * 8: Expired threads. - * 9: Old global item entries from expired threads - */ -function remove_orphans($stage = 0) { - global $db; - - $count = 0; - - // We split the deletion in many small tasks - $limit = 1000; - - // Get the expire days for step 8 and 9 - $days = Config::get('system', 'dbclean-expire-days', 0); - - if ($stage == 1) { - $last_id = Config::get('system', 'dbclean-last-id-1', 0); - - logger("Deleting old global item entries from item table without user copy. Last ID: ".$last_id); - $r = dba::p("SELECT `id` FROM `item` WHERE `uid` = 0 AND - NOT EXISTS (SELECT `guid` FROM `item` AS `i` WHERE `item`.`guid` = `i`.`guid` AND `i`.`uid` != 0) AND - `received` < UTC_TIMESTAMP() - INTERVAL 90 DAY AND `id` >= ? - ORDER BY `id` LIMIT ".intval($limit), $last_id); - $count = dba::num_rows($r); - if ($count > 0) { - logger("found global item orphans: ".$count); - while ($orphan = dba::fetch($r)) { - $last_id = $orphan["id"]; - dba::delete('item', array('id' => $orphan["id"])); - } - } else { - logger("No global item orphans found"); - } - dba::close($r); - logger("Done deleting ".$count." old global item entries from item table without user copy. Last ID: ".$last_id); - - Config::set('system', 'dbclean-last-id-1', $last_id); - } elseif ($stage == 2) { - $last_id = Config::get('system', 'dbclean-last-id-2', 0); - - logger("Deleting items without parents. Last ID: ".$last_id); - $r = dba::p("SELECT `id` FROM `item` - WHERE NOT EXISTS (SELECT `id` FROM `item` AS `i` WHERE `item`.`parent` = `i`.`id`) - AND `id` >= ? ORDER BY `id` LIMIT ".intval($limit), $last_id); - $count = dba::num_rows($r); - if ($count > 0) { - logger("found item orphans without parents: ".$count); - while ($orphan = dba::fetch($r)) { - $last_id = $orphan["id"]; - dba::delete('item', array('id' => $orphan["id"])); - } - } else { - logger("No item orphans without parents found"); - } - dba::close($r); - logger("Done deleting ".$count." items without parents. Last ID: ".$last_id); - - Config::set('system', 'dbclean-last-id-2', $last_id); - - if ($count < $limit) { - Config::set('system', 'finished-dbclean-2', true); - } - } elseif ($stage == 3) { - $last_id = Config::get('system', 'dbclean-last-id-3', 0); - - logger("Deleting orphaned data from thread table. Last ID: ".$last_id); - $r = dba::p("SELECT `iid` FROM `thread` - WHERE NOT EXISTS (SELECT `id` FROM `item` WHERE `item`.`parent` = `thread`.`iid`) AND `iid` >= ? - ORDER BY `iid` LIMIT ".intval($limit), $last_id); - $count = dba::num_rows($r); - if ($count > 0) { - logger("found thread orphans: ".$count); - while ($orphan = dba::fetch($r)) { - $last_id = $orphan["iid"]; - dba::delete('thread', array('iid' => $orphan["iid"])); - } - } else { - logger("No thread orphans found"); - } - dba::close($r); - logger("Done deleting ".$count." orphaned data from thread table. Last ID: ".$last_id); - - Config::set('system', 'dbclean-last-id-3', $last_id); - - if ($count < $limit) { - Config::set('system', 'finished-dbclean-3', true); - } - } elseif ($stage == 4) { - $last_id = Config::get('system', 'dbclean-last-id-4', 0); - - logger("Deleting orphaned data from notify table. Last ID: ".$last_id); - $r = dba::p("SELECT `iid`, `id` FROM `notify` - WHERE NOT EXISTS (SELECT `id` FROM `item` WHERE `item`.`id` = `notify`.`iid`) AND `id` >= ? - ORDER BY `id` LIMIT ".intval($limit), $last_id); - $count = dba::num_rows($r); - if ($count > 0) { - logger("found notify orphans: ".$count); - while ($orphan = dba::fetch($r)) { - $last_id = $orphan["id"]; - dba::delete('notify', array('iid' => $orphan["iid"])); - } - } else { - logger("No notify orphans found"); - } - dba::close($r); - logger("Done deleting ".$count." orphaned data from notify table. Last ID: ".$last_id); - - Config::set('system', 'dbclean-last-id-4', $last_id); - - if ($count < $limit) { - Config::set('system', 'finished-dbclean-4', true); - } - } elseif ($stage == 5) { - $last_id = Config::get('system', 'dbclean-last-id-5', 0); - - logger("Deleting orphaned data from notify-threads table. Last ID: ".$last_id); - $r = dba::p("SELECT `id` FROM `notify-threads` - WHERE NOT EXISTS (SELECT `id` FROM `item` WHERE `item`.`parent` = `notify-threads`.`master-parent-item`) AND `id` >= ? - ORDER BY `id` LIMIT ".intval($limit), $last_id); - $count = dba::num_rows($r); - if ($count > 0) { - logger("found notify-threads orphans: ".$count); - while ($orphan = dba::fetch($r)) { - $last_id = $orphan["id"]; - dba::delete('notify-threads', array('id' => $orphan["id"])); - } - } else { - logger("No notify-threads orphans found"); - } - dba::close($r); - logger("Done deleting ".$count." orphaned data from notify-threads table. Last ID: ".$last_id); - - Config::set('system', 'dbclean-last-id-5', $last_id); - - if ($count < $limit) { - Config::set('system', 'finished-dbclean-5', true); - } - } elseif ($stage == 6) { - $last_id = Config::get('system', 'dbclean-last-id-6', 0); - - logger("Deleting orphaned data from sign table. Last ID: ".$last_id); - $r = dba::p("SELECT `iid`, `id` FROM `sign` - WHERE NOT EXISTS (SELECT `id` FROM `item` WHERE `item`.`id` = `sign`.`iid`) AND `id` >= ? - ORDER BY `id` LIMIT ".intval($limit), $last_id); - $count = dba::num_rows($r); - if ($count > 0) { - logger("found sign orphans: ".$count); - while ($orphan = dba::fetch($r)) { - $last_id = $orphan["id"]; - dba::delete('sign', array('iid' => $orphan["iid"])); - } - } else { - logger("No sign orphans found"); - } - dba::close($r); - logger("Done deleting ".$count." orphaned data from sign table. Last ID: ".$last_id); - - Config::set('system', 'dbclean-last-id-6', $last_id); - - if ($count < $limit) { - Config::set('system', 'finished-dbclean-6', true); - } - } elseif ($stage == 7) { - $last_id = Config::get('system', 'dbclean-last-id-7', 0); - - logger("Deleting orphaned data from term table. Last ID: ".$last_id); - $r = dba::p("SELECT `oid`, `tid` FROM `term` - WHERE NOT EXISTS (SELECT `id` FROM `item` WHERE `item`.`id` = `term`.`oid`) AND `tid` >= ? - ORDER BY `tid` LIMIT ".intval($limit), $last_id); - $count = dba::num_rows($r); - if ($count > 0) { - logger("found term orphans: ".$count); - while ($orphan = dba::fetch($r)) { - $last_id = $orphan["tid"]; - dba::delete('term', array('oid' => $orphan["oid"])); - } - } else { - logger("No term orphans found"); - } - dba::close($r); - logger("Done deleting ".$count." orphaned data from term table. Last ID: ".$last_id); - - Config::set('system', 'dbclean-last-id-7', $last_id); - - if ($count < $limit) { - Config::set('system', 'finished-dbclean-7', true); - } - } elseif ($stage == 8) { - if ($days <= 0) { - return; - } - - $last_id = Config::get('system', 'dbclean-last-id-8', 0); - - logger("Deleting expired threads. Last ID: ".$last_id); - $r = dba::p("SELECT `thread`.`iid` FROM `thread` - INNER JOIN `contact` ON `thread`.`contact-id` = `contact`.`id` AND NOT `notify_new_posts` - WHERE `thread`.`received` < UTC_TIMESTAMP() - INTERVAL ? DAY - AND NOT `thread`.`mention` AND NOT `thread`.`starred` - AND NOT `thread`.`wall` AND NOT `thread`.`origin` - AND `thread`.`uid` != 0 AND `thread`.`iid` >= ? - AND NOT `thread`.`iid` IN (SELECT `parent` FROM `item` - WHERE (`item`.`starred` OR (`item`.`resource-id` != '') - OR (`item`.`file` != '') OR (`item`.`event-id` != '') - OR (`item`.`attach` != '') OR `item`.`wall` OR `item`.`origin`) - AND `item`.`parent` = `thread`.`iid`) - ORDER BY `thread`.`iid` LIMIT 1000", $days, $last_id); - $count = dba::num_rows($r); - if ($count > 0) { - logger("found expired threads: ".$count); - while ($thread = dba::fetch($r)) { - $last_id = $thread["iid"]; - dba::delete('thread', array('iid' => $thread["iid"])); - } - } else { - logger("No expired threads found"); - } - dba::close($r); - logger("Done deleting ".$count." expired threads. Last ID: ".$last_id); - - Config::set('system', 'dbclean-last-id-8', $last_id); - } elseif ($stage == 9) { - if ($days <= 0) { - return; - } - - $last_id = Config::get('system', 'dbclean-last-id-9', 0); - $till_id = Config::get('system', 'dbclean-last-id-8', 0); - - logger("Deleting old global item entries from expired threads from ID ".$last_id." to ID ".$till_id); - $r = dba::p("SELECT `id` FROM `item` WHERE `uid` = 0 AND - NOT EXISTS (SELECT `guid` FROM `item` AS `i` WHERE `item`.`guid` = `i`.`guid` AND `i`.`uid` != 0) AND - `received` < UTC_TIMESTAMP() - INTERVAL 90 DAY AND `id` >= ? AND `id` <= ? - ORDER BY `id` LIMIT ".intval($limit), $last_id, $till_id); - $count = dba::num_rows($r); - if ($count > 0) { - logger("found global item entries from expired threads: ".$count); - while ($orphan = dba::fetch($r)) { - $last_id = $orphan["id"]; - dba::delete('item', array('id' => $orphan["id"])); - } - } else { - logger("No global item entries from expired threads"); - } - dba::close($r); - logger("Done deleting ".$count." old global item entries from expired threads. Last ID: ".$last_id); - - Config::set('system', 'dbclean-last-id-9', $last_id); - } - - // Call it again if not all entries were purged - if (($stage != 0) && ($count > 0)) { - Worker::add(PRIORITY_MEDIUM, 'dbclean'); - } -} diff --git a/src/Worker/Cron.php b/src/Worker/Cron.php index 810dca681..7b6e2ede1 100644 --- a/src/Worker/Cron.php +++ b/src/Worker/Cron.php @@ -78,7 +78,7 @@ Class Cron { Worker::add(PRIORITY_LOW, 'expire'); - Worker::add(PRIORITY_MEDIUM, 'dbclean'); + Worker::add(PRIORITY_MEDIUM, 'DBClean'); Worker::add(PRIORITY_LOW, "cronjobs", "update_photo_albums"); diff --git a/src/Worker/DBClean.php b/src/Worker/DBClean.php new file mode 100644 index 000000000..94295b053 --- /dev/null +++ b/src/Worker/DBClean.php @@ -0,0 +1,301 @@ + 0))) { + Worker::add(PRIORITY_LOW, 'DBClean', $i); + } + } + } else { + self::removeOrphans($stage); + } + } + + /** + * @brief Remove orphaned database entries + * @param integer $stage What should be deleted? + * + * Values for $stage: + * ------------------ + * 1: Old global item entries from item table without user copy. + * 2: Items without parents. + * 3: Orphaned data from thread table. + * 4: Orphaned data from notify table. + * 5: Orphaned data from notify-threads table. + * 6: Orphaned data from sign table. + * 7: Orphaned data from term table. + * 8: Expired threads. + * 9: Old global item entries from expired threads + */ + private static function removeOrphans($stage = 0) { + global $db; + + $count = 0; + + // We split the deletion in many small tasks + $limit = 1000; + + // Get the expire days for step 8 and 9 + $days = Config::get('system', 'dbclean-expire-days', 0); + + if ($stage == 1) { + $last_id = Config::get('system', 'dbclean-last-id-1', 0); + + logger("Deleting old global item entries from item table without user copy. Last ID: ".$last_id); + $r = dba::p("SELECT `id` FROM `item` WHERE `uid` = 0 AND + NOT EXISTS (SELECT `guid` FROM `item` AS `i` WHERE `item`.`guid` = `i`.`guid` AND `i`.`uid` != 0) AND + `received` < UTC_TIMESTAMP() - INTERVAL 90 DAY AND `id` >= ? + ORDER BY `id` LIMIT ".intval($limit), $last_id); + $count = dba::num_rows($r); + if ($count > 0) { + logger("found global item orphans: ".$count); + while ($orphan = dba::fetch($r)) { + $last_id = $orphan["id"]; + dba::delete('item', array('id' => $orphan["id"])); + } + } else { + logger("No global item orphans found"); + } + dba::close($r); + logger("Done deleting ".$count." old global item entries from item table without user copy. Last ID: ".$last_id); + + Config::set('system', 'dbclean-last-id-1', $last_id); + } elseif ($stage == 2) { + $last_id = Config::get('system', 'dbclean-last-id-2', 0); + + logger("Deleting items without parents. Last ID: ".$last_id); + $r = dba::p("SELECT `id` FROM `item` + WHERE NOT EXISTS (SELECT `id` FROM `item` AS `i` WHERE `item`.`parent` = `i`.`id`) + AND `id` >= ? ORDER BY `id` LIMIT ".intval($limit), $last_id); + $count = dba::num_rows($r); + if ($count > 0) { + logger("found item orphans without parents: ".$count); + while ($orphan = dba::fetch($r)) { + $last_id = $orphan["id"]; + dba::delete('item', array('id' => $orphan["id"])); + } + } else { + logger("No item orphans without parents found"); + } + dba::close($r); + logger("Done deleting ".$count." items without parents. Last ID: ".$last_id); + + Config::set('system', 'dbclean-last-id-2', $last_id); + + if ($count < $limit) { + Config::set('system', 'finished-dbclean-2', true); + } + } elseif ($stage == 3) { + $last_id = Config::get('system', 'dbclean-last-id-3', 0); + + logger("Deleting orphaned data from thread table. Last ID: ".$last_id); + $r = dba::p("SELECT `iid` FROM `thread` + WHERE NOT EXISTS (SELECT `id` FROM `item` WHERE `item`.`parent` = `thread`.`iid`) AND `iid` >= ? + ORDER BY `iid` LIMIT ".intval($limit), $last_id); + $count = dba::num_rows($r); + if ($count > 0) { + logger("found thread orphans: ".$count); + while ($orphan = dba::fetch($r)) { + $last_id = $orphan["iid"]; + dba::delete('thread', array('iid' => $orphan["iid"])); + } + } else { + logger("No thread orphans found"); + } + dba::close($r); + logger("Done deleting ".$count." orphaned data from thread table. Last ID: ".$last_id); + + Config::set('system', 'dbclean-last-id-3', $last_id); + + if ($count < $limit) { + Config::set('system', 'finished-dbclean-3', true); + } + } elseif ($stage == 4) { + $last_id = Config::get('system', 'dbclean-last-id-4', 0); + + logger("Deleting orphaned data from notify table. Last ID: ".$last_id); + $r = dba::p("SELECT `iid`, `id` FROM `notify` + WHERE NOT EXISTS (SELECT `id` FROM `item` WHERE `item`.`id` = `notify`.`iid`) AND `id` >= ? + ORDER BY `id` LIMIT ".intval($limit), $last_id); + $count = dba::num_rows($r); + if ($count > 0) { + logger("found notify orphans: ".$count); + while ($orphan = dba::fetch($r)) { + $last_id = $orphan["id"]; + dba::delete('notify', array('iid' => $orphan["iid"])); + } + } else { + logger("No notify orphans found"); + } + dba::close($r); + logger("Done deleting ".$count." orphaned data from notify table. Last ID: ".$last_id); + + Config::set('system', 'dbclean-last-id-4', $last_id); + + if ($count < $limit) { + Config::set('system', 'finished-dbclean-4', true); + } + } elseif ($stage == 5) { + $last_id = Config::get('system', 'dbclean-last-id-5', 0); + + logger("Deleting orphaned data from notify-threads table. Last ID: ".$last_id); + $r = dba::p("SELECT `id` FROM `notify-threads` + WHERE NOT EXISTS (SELECT `id` FROM `item` WHERE `item`.`parent` = `notify-threads`.`master-parent-item`) AND `id` >= ? + ORDER BY `id` LIMIT ".intval($limit), $last_id); + $count = dba::num_rows($r); + if ($count > 0) { + logger("found notify-threads orphans: ".$count); + while ($orphan = dba::fetch($r)) { + $last_id = $orphan["id"]; + dba::delete('notify-threads', array('id' => $orphan["id"])); + } + } else { + logger("No notify-threads orphans found"); + } + dba::close($r); + logger("Done deleting ".$count." orphaned data from notify-threads table. Last ID: ".$last_id); + + Config::set('system', 'dbclean-last-id-5', $last_id); + + if ($count < $limit) { + Config::set('system', 'finished-dbclean-5', true); + } + } elseif ($stage == 6) { + $last_id = Config::get('system', 'dbclean-last-id-6', 0); + + logger("Deleting orphaned data from sign table. Last ID: ".$last_id); + $r = dba::p("SELECT `iid`, `id` FROM `sign` + WHERE NOT EXISTS (SELECT `id` FROM `item` WHERE `item`.`id` = `sign`.`iid`) AND `id` >= ? + ORDER BY `id` LIMIT ".intval($limit), $last_id); + $count = dba::num_rows($r); + if ($count > 0) { + logger("found sign orphans: ".$count); + while ($orphan = dba::fetch($r)) { + $last_id = $orphan["id"]; + dba::delete('sign', array('iid' => $orphan["iid"])); + } + } else { + logger("No sign orphans found"); + } + dba::close($r); + logger("Done deleting ".$count." orphaned data from sign table. Last ID: ".$last_id); + + Config::set('system', 'dbclean-last-id-6', $last_id); + + if ($count < $limit) { + Config::set('system', 'finished-dbclean-6', true); + } + } elseif ($stage == 7) { + $last_id = Config::get('system', 'dbclean-last-id-7', 0); + + logger("Deleting orphaned data from term table. Last ID: ".$last_id); + $r = dba::p("SELECT `oid`, `tid` FROM `term` + WHERE NOT EXISTS (SELECT `id` FROM `item` WHERE `item`.`id` = `term`.`oid`) AND `tid` >= ? + ORDER BY `tid` LIMIT ".intval($limit), $last_id); + $count = dba::num_rows($r); + if ($count > 0) { + logger("found term orphans: ".$count); + while ($orphan = dba::fetch($r)) { + $last_id = $orphan["tid"]; + dba::delete('term', array('oid' => $orphan["oid"])); + } + } else { + logger("No term orphans found"); + } + dba::close($r); + logger("Done deleting ".$count." orphaned data from term table. Last ID: ".$last_id); + + Config::set('system', 'dbclean-last-id-7', $last_id); + + if ($count < $limit) { + Config::set('system', 'finished-dbclean-7', true); + } + } elseif ($stage == 8) { + if ($days <= 0) { + return; + } + + $last_id = Config::get('system', 'dbclean-last-id-8', 0); + + logger("Deleting expired threads. Last ID: ".$last_id); + $r = dba::p("SELECT `thread`.`iid` FROM `thread` + INNER JOIN `contact` ON `thread`.`contact-id` = `contact`.`id` AND NOT `notify_new_posts` + WHERE `thread`.`received` < UTC_TIMESTAMP() - INTERVAL ? DAY + AND NOT `thread`.`mention` AND NOT `thread`.`starred` + AND NOT `thread`.`wall` AND NOT `thread`.`origin` + AND `thread`.`uid` != 0 AND `thread`.`iid` >= ? + AND NOT `thread`.`iid` IN (SELECT `parent` FROM `item` + WHERE (`item`.`starred` OR (`item`.`resource-id` != '') + OR (`item`.`file` != '') OR (`item`.`event-id` != '') + OR (`item`.`attach` != '') OR `item`.`wall` OR `item`.`origin`) + AND `item`.`parent` = `thread`.`iid`) + ORDER BY `thread`.`iid` LIMIT 1000", $days, $last_id); + $count = dba::num_rows($r); + if ($count > 0) { + logger("found expired threads: ".$count); + while ($thread = dba::fetch($r)) { + $last_id = $thread["iid"]; + dba::delete('thread', array('iid' => $thread["iid"])); + } + } else { + logger("No expired threads found"); + } + dba::close($r); + logger("Done deleting ".$count." expired threads. Last ID: ".$last_id); + + Config::set('system', 'dbclean-last-id-8', $last_id); + } elseif ($stage == 9) { + if ($days <= 0) { + return; + } + + $last_id = Config::get('system', 'dbclean-last-id-9', 0); + $till_id = Config::get('system', 'dbclean-last-id-8', 0); + + logger("Deleting old global item entries from expired threads from ID ".$last_id." to ID ".$till_id); + $r = dba::p("SELECT `id` FROM `item` WHERE `uid` = 0 AND + NOT EXISTS (SELECT `guid` FROM `item` AS `i` WHERE `item`.`guid` = `i`.`guid` AND `i`.`uid` != 0) AND + `received` < UTC_TIMESTAMP() - INTERVAL 90 DAY AND `id` >= ? AND `id` <= ? + ORDER BY `id` LIMIT ".intval($limit), $last_id, $till_id); + $count = dba::num_rows($r); + if ($count > 0) { + logger("found global item entries from expired threads: ".$count); + while ($orphan = dba::fetch($r)) { + $last_id = $orphan["id"]; + dba::delete('item', array('id' => $orphan["id"])); + } + } else { + logger("No global item entries from expired threads"); + } + dba::close($r); + logger("Done deleting ".$count." old global item entries from expired threads. Last ID: ".$last_id); + + Config::set('system', 'dbclean-last-id-9', $last_id); + } + + // Call it again if not all entries were purged + if (($stage != 0) && ($count > 0)) { + Worker::add(PRIORITY_MEDIUM, 'dbclean'); + } + } +} From 04cc9bb4dee379b957059960e26c65734b4f631b Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 18 Nov 2017 06:22:41 +0000 Subject: [PATCH 033/175] CronJobs moved as well --- include/cronjobs.php | 281 --------------------------------------- src/Worker/Cron.php | 16 +-- src/Worker/CronJobs.php | 284 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 292 insertions(+), 289 deletions(-) delete mode 100644 include/cronjobs.php create mode 100644 src/Worker/CronJobs.php diff --git a/include/cronjobs.php b/include/cronjobs.php deleted file mode 100644 index 2f6ade9c9..000000000 --- a/include/cronjobs.php +++ /dev/null @@ -1,281 +0,0 @@ - '%s' - AND `account_expires_on` < UTC_TIMESTAMP()", dbesc(NULL_DATE)); - - // delete user records for recently removed accounts - $r = q("SELECT * FROM `user` WHERE `account_removed` AND `account_expires_on` < UTC_TIMESTAMP() - INTERVAL 3 DAY"); - if (DBM::is_result($r)) { - foreach ($r as $user) { - dba::delete('user', array('uid' => $user['uid'])); - } - } -} - -/** - * @brief Clear cache entries - * - * @param App $a - */ -function cron_clear_cache(App $a) { - - $last = Config::get('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 (!Config::get("system", "proxy_disabled")) { - clear_cache($a->get_basepath(), $a->get_basepath()."/proxy"); - - $cachetime = Config::get('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 3 MONTH"); - - // Delete the cached "parse_url" entries that are older than one year - q("DELETE FROM `parsed_url` WHERE `created` < NOW() - INTERVAL 3 MONTH"); - - // Maximum table size in megabyte - $max_tablesize = intval(Config::get('system','optimize_max_tablesize')) * 1000000; - if ($max_tablesize == 0) { - $max_tablesize = 100 * 1000000; // Default are 100 MB - } - if ($max_tablesize > 0) { - // Minimum fragmentation level in percent - $fragmentation_level = intval(Config::get('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"] + $table["Index_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"])); - } - } - - Config::set('system','cache_last_cleared', time()); -} - -/** - * @brief Repair missing values in Diaspora contacts - * - * @param App $a - */ -function cron_repair_diaspora(App $a) { - - $starttime = time(); - - $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 (!DBM::is_result($r)) { - return; - } - - foreach ($r AS $contact) { - // Quit the loop after 3 minutes - if (time() > ($starttime + 180)) { - return; - } - - if (!PortableContact::reachable($contact["url"])) { - continue; - } - - $data = Probe::uri($contact["url"]); - if ($data["network"] != NETWORK_DIASPORA) { - continue; - } - - 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"])); - } -} - -/** - * @brief Do some repairs in database entries - * - */ -function cron_repair_database() { - - // Sometimes there seem to be issues where the "self" contact vanishes. - // We haven't found the origin of the problem by now. - $r = q("SELECT `uid` FROM `user` WHERE NOT EXISTS (SELECT `uid` FROM `contact` WHERE `contact`.`uid` = `user`.`uid` AND `contact`.`self`)"); - if (DBM::is_result($r)) { - foreach ($r AS $user) { - logger('Create missing self contact for user '.$user['uid']); - user_create_self_contact($user['uid']); - } - } - - // 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"); - - // There was an issue where the nick vanishes from the contact table - q("UPDATE `contact` INNER JOIN `user` ON `contact`.`uid` = `user`.`uid` SET `nick` = `nickname` WHERE `self` AND `nick`=''"); - - // Update the global contacts for local users - $r = q("SELECT `uid` FROM `user` WHERE `verified` AND NOT `blocked` AND NOT `account_removed` AND NOT `account_expired`"); - if (DBM::is_result($r)) { - foreach ($r AS $user) { - GlobalContact::updateForUser($user["uid"]); - } - } - - /// @todo - /// - remove thread entries without item - /// - remove sign entries without item - /// - remove children when parent got lost - /// - set contact-id in item when not present -} diff --git a/src/Worker/Cron.php b/src/Worker/Cron.php index 7b6e2ede1..1893a862e 100644 --- a/src/Worker/Cron.php +++ b/src/Worker/Cron.php @@ -45,22 +45,22 @@ Class Cron { Worker::add(PRIORITY_LOW, "discover_poco", "checkcontact"); // Expire and remove user entries - Worker::add(PRIORITY_MEDIUM, "cronjobs", "expire_and_remove_users"); + Worker::add(PRIORITY_MEDIUM, "CronJobs", "expire_and_remove_users"); // Call possible post update functions - Worker::add(PRIORITY_LOW, "cronjobs", "post_update"); + Worker::add(PRIORITY_LOW, "CronJobs", "post_update"); // update nodeinfo data - Worker::add(PRIORITY_LOW, "cronjobs", "nodeinfo"); + Worker::add(PRIORITY_LOW, "CronJobs", "nodeinfo"); // Clear cache entries - Worker::add(PRIORITY_LOW, "cronjobs", "clear_cache"); + Worker::add(PRIORITY_LOW, "CronJobs", "clear_cache"); // Repair missing Diaspora values in contacts - Worker::add(PRIORITY_LOW, "cronjobs", "repair_diaspora"); + Worker::add(PRIORITY_LOW, "CronJobs", "repair_diaspora"); // Repair entries in the database - Worker::add(PRIORITY_LOW, "cronjobs", "repair_database"); + Worker::add(PRIORITY_LOW, "CronJobs", "repair_database"); // once daily run birthday_updates and then expire in background $d1 = Config::get('system', 'last_expire_day'); @@ -68,7 +68,7 @@ Class Cron { if ($d2 != intval($d1)) { - Worker::add(PRIORITY_LOW, "cronjobs", "update_contact_birthdays"); + Worker::add(PRIORITY_LOW, "CronJobs", "update_contact_birthdays"); Worker::add(PRIORITY_LOW, "discover_poco", "update_server"); @@ -80,7 +80,7 @@ Class Cron { Worker::add(PRIORITY_MEDIUM, 'DBClean'); - Worker::add(PRIORITY_LOW, "cronjobs", "update_photo_albums"); + Worker::add(PRIORITY_LOW, "CronJobs", "update_photo_albums"); // Delete all done workerqueue entries dba::delete('workerqueue', array('`done` AND `executed` < UTC_TIMESTAMP() - INTERVAL 12 HOUR')); diff --git a/src/Worker/CronJobs.php b/src/Worker/CronJobs.php new file mode 100644 index 000000000..5e1d65d3b --- /dev/null +++ b/src/Worker/CronJobs.php @@ -0,0 +1,284 @@ + '%s' + AND `account_expires_on` < UTC_TIMESTAMP()", dbesc(NULL_DATE)); + + // delete user records for recently removed accounts + $r = q("SELECT * FROM `user` WHERE `account_removed` AND `account_expires_on` < UTC_TIMESTAMP() - INTERVAL 3 DAY"); + if (DBM::is_result($r)) { + foreach ($r as $user) { + dba::delete('user', array('uid' => $user['uid'])); + } + } + } + + /** + * @brief Clear cache entries + * + * @param App $a + */ + private static function clearCache(App $a) { + + $last = Config::get('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 (!Config::get("system", "proxy_disabled")) { + clear_cache($a->get_basepath(), $a->get_basepath()."/proxy"); + + $cachetime = Config::get('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 3 MONTH"); + + // Delete the cached "parse_url" entries that are older than one year + q("DELETE FROM `parsed_url` WHERE `created` < NOW() - INTERVAL 3 MONTH"); + + // Maximum table size in megabyte + $max_tablesize = intval(Config::get('system','optimize_max_tablesize')) * 1000000; + if ($max_tablesize == 0) { + $max_tablesize = 100 * 1000000; // Default are 100 MB + } + if ($max_tablesize > 0) { + // Minimum fragmentation level in percent + $fragmentation_level = intval(Config::get('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"] + $table["Index_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"])); + } + } + + Config::set('system','cache_last_cleared', time()); + } + + /** + * @brief Repair missing values in Diaspora contacts + * + * @param App $a + */ + private static function repairDiaspora(App $a) { + + $starttime = time(); + + $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 (!DBM::is_result($r)) { + return; + } + + foreach ($r AS $contact) { + // Quit the loop after 3 minutes + if (time() > ($starttime + 180)) { + return; + } + + if (!PortableContact::reachable($contact["url"])) { + continue; + } + + $data = Probe::uri($contact["url"]); + if ($data["network"] != NETWORK_DIASPORA) { + continue; + } + + 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"])); + } + } + + /** + * @brief Do some repairs in database entries + * + */ + private static function repairDatabase() { + + // Sometimes there seem to be issues where the "self" contact vanishes. + // We haven't found the origin of the problem by now. + $r = q("SELECT `uid` FROM `user` WHERE NOT EXISTS (SELECT `uid` FROM `contact` WHERE `contact`.`uid` = `user`.`uid` AND `contact`.`self`)"); + if (DBM::is_result($r)) { + foreach ($r AS $user) { + logger('Create missing self contact for user '.$user['uid']); + user_create_self_contact($user['uid']); + } + } + + // 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"); + + // There was an issue where the nick vanishes from the contact table + q("UPDATE `contact` INNER JOIN `user` ON `contact`.`uid` = `user`.`uid` SET `nick` = `nickname` WHERE `self` AND `nick`=''"); + + // Update the global contacts for local users + $r = q("SELECT `uid` FROM `user` WHERE `verified` AND NOT `blocked` AND NOT `account_removed` AND NOT `account_expired`"); + if (DBM::is_result($r)) { + foreach ($r AS $user) { + GlobalContact::updateForUser($user["uid"]); + } + } + + /// @todo + /// - remove thread entries without item + /// - remove sign entries without item + /// - remove children when parent got lost + /// - set contact-id in item when not present + } +} From 659748d27cf45ad17ff8a9805618bc765ef9d8c0 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 18 Nov 2017 07:14:39 +0000 Subject: [PATCH 034/175] include/shadowupdate.php wasn't used at all --- include/shadowupdate.php | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 include/shadowupdate.php diff --git a/include/shadowupdate.php b/include/shadowupdate.php deleted file mode 100644 index c41b23122..000000000 --- a/include/shadowupdate.php +++ /dev/null @@ -1,29 +0,0 @@ - Date: Sat, 18 Nov 2017 07:31:33 +0000 Subject: [PATCH 035/175] dbupdate now moved as well --- boot.php | 2 +- include/dbupdate.php | 13 ------------- src/Worker/Cron.php | 3 +++ src/Worker/CronHooks.php | 4 ++++ src/Worker/DBClean.php | 2 ++ src/Worker/DBUpdate.php | 18 ++++++++++++++++++ 6 files changed, 28 insertions(+), 14 deletions(-) delete mode 100644 include/dbupdate.php create mode 100644 src/Worker/DBUpdate.php diff --git a/boot.php b/boot.php index 8492701a0..52026a7fb 100644 --- a/boot.php +++ b/boot.php @@ -630,7 +630,7 @@ function check_db($via_worker) } if ($build != DB_UPDATE_VERSION) { // When we cannot execute the database update via the worker, we will do it directly - if (!Worker::add(PRIORITY_CRITICAL, 'dbupdate') && $via_worker) { + if (!Worker::add(PRIORITY_CRITICAL, 'DBUpdate') && $via_worker) { update_db(get_app()); } } diff --git a/include/dbupdate.php b/include/dbupdate.php deleted file mode 100644 index 799ca262c..000000000 --- a/include/dbupdate.php +++ /dev/null @@ -1,13 +0,0 @@ - Date: Sat, 18 Nov 2017 07:33:44 +0000 Subject: [PATCH 036/175] Missing namespace --- src/Worker/CronJobs.php | 3 +++ src/Worker/UpdateGContact.php | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/Worker/CronJobs.php b/src/Worker/CronJobs.php index 5e1d65d3b..08a1af6dc 100644 --- a/src/Worker/CronJobs.php +++ b/src/Worker/CronJobs.php @@ -2,6 +2,9 @@ /** * @file src/worker/CronJobs.php */ + +namespace Friendica\Worker; + use Friendica\App; use Friendica\Core\Cache; use Friendica\Core\Config; diff --git a/src/Worker/UpdateGContact.php b/src/Worker/UpdateGContact.php index 087028aa3..395e415bf 100644 --- a/src/Worker/UpdateGContact.php +++ b/src/Worker/UpdateGContact.php @@ -2,6 +2,8 @@ /** * @file src/Worker/UpdateGcontact.php */ +namespace Friendica\Worker; + use Friendica\Core\Config; use Friendica\Database\DBM; use Friendica\Network\Probe; From 2515d02e6ddc9b5121bc30905211fbbacb4a9cf6 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 18 Nov 2017 07:44:38 +0000 Subject: [PATCH 037/175] SpoolPost moved --- include/spool_post.php | 57 --------------------------------------- src/Core/Worker.php | 2 +- src/Worker/SpoolPost.php | 58 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 58 deletions(-) delete mode 100644 include/spool_post.php create mode 100644 src/Worker/SpoolPost.php diff --git a/include/spool_post.php b/include/spool_post.php deleted file mode 100644 index b7b8de396..000000000 --- a/include/spool_post.php +++ /dev/null @@ -1,57 +0,0 @@ - Date: Sat, 18 Nov 2017 07:59:30 +0000 Subject: [PATCH 038/175] Directory moved --- include/Contact.php | 2 +- include/api.php | 2 +- include/directory.php | 45 ---------------------------------- mod/admin.php | 4 +-- mod/profile_photo.php | 4 +-- mod/profiles.php | 2 +- mod/register.php | 2 +- mod/regmod.php | 2 +- mod/settings.php | 2 +- src/Worker/Directory.php | 53 ++++++++++++++++++++++++++++++++++++++++ 10 files changed, 63 insertions(+), 55 deletions(-) delete mode 100644 include/directory.php create mode 100644 src/Worker/Directory.php diff --git a/include/Contact.php b/include/Contact.php index 60bef93a5..636bbc4a7 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -37,7 +37,7 @@ function user_remove($uid) { Worker::add(PRIORITY_HIGH, "notifier", "removeme", $uid); // Send an update to the directory - Worker::add(PRIORITY_LOW, "directory", $r['url']); + Worker::add(PRIORITY_LOW, "Directory", $r['url']); if($uid == local_user()) { unset($_SESSION['authenticated']); diff --git a/include/api.php b/include/api.php index 33624dcf6..69569bdc1 100644 --- a/include/api.php +++ b/include/api.php @@ -3870,7 +3870,7 @@ function api_account_update_profile_image($type) //$user = api_get_user(get_app()); $url = System::baseUrl() . '/profile/' . get_app()->user['nickname']; if ($url && strlen(Config::get('system', 'directory'))) { - Worker::add(PRIORITY_LOW, "directory", $url); + Worker::add(PRIORITY_LOW, "Directory", $url); } Worker::add(PRIORITY_LOW, 'profile_update', api_user()); diff --git a/include/directory.php b/include/directory.php deleted file mode 100644 index f56e8dbaa..000000000 --- a/include/directory.php +++ /dev/null @@ -1,45 +0,0 @@ - $argv[1]); - - call_hooks('globaldir_update', $arr); - - logger('Updating directory: ' . $arr['url'], LOGGER_DEBUG); - if (strlen($arr['url'])) { - fetch_url($dir . '?url=' . bin2hex($arr['url'])); - } - - return; -} - -function directory_update_all() { - $r = q("SELECT `url` FROM `contact` - INNER JOIN `profile` ON `profile`.`uid` = `contact`.`uid` - INNER JOIN `user` ON `user`.`uid` = `contact`.`uid` - WHERE `contact`.`self` AND `profile`.`net-publish` AND `profile`.`is-default` AND - NOT `user`.`account_expired` AND `user`.`verified`"); - - if (DBM::is_result($r)) { - foreach ($r AS $user) { - Worker::add(PRIORITY_LOW, 'directory', $user['url']); - } - } -} diff --git a/mod/admin.php b/mod/admin.php index 78e37afef..cda6d1a3b 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -705,7 +705,7 @@ function admin_page_site_post(App $a) { check_form_security_token_redirectOnErr('/admin/site', 'admin_site'); if (!empty($_POST['republish_directory'])) { - Worker::add(PRIORITY_LOW, 'directory'); + Worker::add(PRIORITY_LOW, 'Directory'); return; } @@ -867,7 +867,7 @@ function admin_page_site_post(App $a) { // Has the directory url changed? If yes, then resubmit the existing profiles there if ($global_directory != Config::get('system', 'directory') && ($global_directory != '')) { Config::set('system', 'directory', $global_directory); - Worker::add(PRIORITY_LOW, 'directory'); + Worker::add(PRIORITY_LOW, 'Directory'); } if ($a->get_path() != "") { diff --git a/mod/profile_photo.php b/mod/profile_photo.php index 5f5245141..3ef0118da 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -132,7 +132,7 @@ function profile_photo_post(App $a) { // Update global directory in background $url = System::baseUrl() . '/profile/' . $a->user['nickname']; if ($url && strlen(Config::get('system','directory'))) { - Worker::add(PRIORITY_LOW, "directory", $url); + Worker::add(PRIORITY_LOW, "Directory", $url); } Worker::add(PRIORITY_LOW, 'profile_update', local_user()); @@ -232,7 +232,7 @@ function profile_photo_content(App $a) { // Update global directory in background $url = $_SESSION['my_url']; if ($url && strlen(Config::get('system','directory'))) { - Worker::add(PRIORITY_LOW, "directory", $url); + Worker::add(PRIORITY_LOW, "Directory", $url); } goaway(System::baseUrl() . '/profiles'); diff --git a/mod/profiles.php b/mod/profiles.php index 4263897d0..545fb2fc7 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -503,7 +503,7 @@ function profiles_post(App $a) { // Update global directory in background $url = $_SESSION['my_url']; if ($url && strlen(Config::get('system', 'directory'))) { - Worker::add(PRIORITY_LOW, "directory", $url); + Worker::add(PRIORITY_LOW, "Directory", $url); } Worker::add(PRIORITY_LOW, 'profile_update', local_user()); diff --git a/mod/register.php b/mod/register.php index 4d0ef9648..cd6385144 100644 --- a/mod/register.php +++ b/mod/register.php @@ -72,7 +72,7 @@ function register_post(App $a) { if($netpublish && $a->config['register_policy'] != REGISTER_APPROVE) { $url = System::baseUrl() . '/profile/' . $user['nickname']; - Worker::add(PRIORITY_LOW, "directory", $url); + Worker::add(PRIORITY_LOW, "Directory", $url); } $using_invites = Config::get('system','invitation_only'); diff --git a/mod/regmod.php b/mod/regmod.php index d6e122a28..6d76e7ea7 100644 --- a/mod/regmod.php +++ b/mod/regmod.php @@ -45,7 +45,7 @@ function user_allow($hash) { if (DBM::is_result($r) && $r[0]['net-publish']) { $url = System::baseUrl() . '/profile/' . $user[0]['nickname']; if ($url && strlen(Config::get('system','directory'))) { - Worker::add(PRIORITY_LOW, "directory", $url); + Worker::add(PRIORITY_LOW, "Directory", $url); } } diff --git a/mod/settings.php b/mod/settings.php index e693f7759..c0b3d2cc1 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -645,7 +645,7 @@ function settings_post(App $a) { // Update global directory in background $url = $_SESSION['my_url']; if ($url && strlen(Config::get('system', 'directory'))) { - Worker::add(PRIORITY_LOW, "directory", $url); + Worker::add(PRIORITY_LOW, "Directory", $url); } } diff --git a/src/Worker/Directory.php b/src/Worker/Directory.php new file mode 100644 index 000000000..8e5383ac0 --- /dev/null +++ b/src/Worker/Directory.php @@ -0,0 +1,53 @@ + $argv[1]); + + call_hooks('globaldir_update', $arr); + + logger('Updating directory: ' . $arr['url'], LOGGER_DEBUG); + if (strlen($arr['url'])) { + fetch_url($dir . '?url=' . bin2hex($arr['url'])); + } + + return; + } + + private static function updateAll() { + $r = q("SELECT `url` FROM `contact` + INNER JOIN `profile` ON `profile`.`uid` = `contact`.`uid` + INNER JOIN `user` ON `user`.`uid` = `contact`.`uid` + WHERE `contact`.`self` AND `profile`.`net-publish` AND `profile`.`is-default` AND + NOT `user`.`account_expired` AND `user`.`verified`"); + + if (DBM::is_result($r)) { + foreach ($r AS $user) { + Worker::add(PRIORITY_LOW, 'Directory', $user['url']); + } + } + } +} From 01362461cf7e1d9268338d1e06c8db77f3aa56bc Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 18 Nov 2017 11:01:01 +0000 Subject: [PATCH 039/175] poller.php is cleaned up, unneeded stuff has been removed --- boot.php | 1 - include/poller.php | 53 +++++++++++++++++++--------------------------- mod/worker.php | 1 - 3 files changed, 22 insertions(+), 33 deletions(-) diff --git a/boot.php b/boot.php index 52026a7fb..402273bdd 100644 --- a/boot.php +++ b/boot.php @@ -39,7 +39,6 @@ require_once 'include/features.php'; require_once 'include/identity.php'; require_once 'update.php'; require_once 'include/dbstructure.php'; -require_once 'include/poller.php'; define('FRIENDICA_PLATFORM', 'Friendica'); define('FRIENDICA_CODENAME', 'Asparagus'); diff --git a/include/poller.php b/include/poller.php index 3f6290a98..6fcf4c7f4 100644 --- a/include/poller.php +++ b/include/poller.php @@ -3,6 +3,7 @@ use Friendica\App; use Friendica\Core\Worker; use Friendica\Core\Config; +// Ensure that poller.php is executed from the base path of the installation if (!file_exists("boot.php") && (sizeof($_SERVER["argv"]) != 0)) { $directory = dirname($_SERVER["argv"][0]); @@ -14,45 +15,35 @@ if (!file_exists("boot.php") && (sizeof($_SERVER["argv"]) != 0)) { chdir($directory); } -require_once("boot.php"); +require_once "boot.php"; +require_once "include/dba.php"; -function poller_run($argv, $argc) { - global $a; +$a = new App(dirname(__DIR__)); - if (empty($a)) { - $a = new App(dirname(__DIR__)); - } +require_once ".htconfig.php"; +dba::connect($db_host, $db_user, $db_pass, $db_data); +unset($db_host, $db_user, $db_pass, $db_data); - require_once ".htconfig.php"; - require_once "include/dba.php"; - dba::connect($db_host, $db_user, $db_pass, $db_data); - unset($db_host, $db_user, $db_pass, $db_data); +Config::load(); - Config::load(); +// Check the database structure and possibly fixes it +check_db(true); - // Check the database structure and possibly fixes it - check_db(true); - - // Quit when in maintenance - if (Config::get('system', 'maintenance', true)) { - return; - } - - $a->set_baseurl(Config::get('system', 'url')); - - load_hooks(); - - $run_cron = (($argc <= 1) || ($argv[1] != "no_cron")); - Worker::processQueue($run_cron); +// Quit when in maintenance +if (Config::get('system', 'maintenance', true)) { return; } -if (array_search(__file__, get_included_files()) === 0) { - poller_run($_SERVER["argv"], $_SERVER["argc"]); +$a->set_baseurl(Config::get('system', 'url')); - Worker::unclaimProcess(); +load_hooks(); - get_app()->end_process(); +$run_cron = (($_SERVER["argc"] <= 1) || ($_SERVER["argv"][1] != "no_cron")); +Worker::processQueue($run_cron); + +Worker::unclaimProcess(); + +$a->end_process(); + +killme(); - killme(); -} diff --git a/mod/worker.php b/mod/worker.php index 930a807e3..f540010bd 100644 --- a/mod/worker.php +++ b/mod/worker.php @@ -3,7 +3,6 @@ * @file mod/worker.php * @brief Module for running the poller as frontend process */ -require_once("include/poller.php"); use Friendica\Core\Worker; use Friendica\Core\Config; From 1f28cbd2c6bb9910a6f9c030320b081693251912 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 18 Nov 2017 11:02:46 +0000 Subject: [PATCH 040/175] And now DiscoverPoCo.php --- include/discover_poco.php | 299 ------------------------------ mod/dirfind.php | 2 +- src/Protocol/PortableContact.php | 10 +- src/Worker/Cron.php | 8 +- src/Worker/DiscoverPoCo.php | 304 +++++++++++++++++++++++++++++++ 5 files changed, 314 insertions(+), 309 deletions(-) delete mode 100644 include/discover_poco.php create mode 100644 src/Worker/DiscoverPoCo.php diff --git a/include/discover_poco.php b/include/discover_poco.php deleted file mode 100644 index fd72d6940..000000000 --- a/include/discover_poco.php +++ /dev/null @@ -1,299 +0,0 @@ -: Searches for "search pattern" in the directory. "search pattern" is url encoded. - - checkcontact: Updates gcontact entries - - suggestions: Discover other servers for their contacts. - - server : Searches for the poco server list. "poco url" is base64 encoded. - - update_server: Frequently check the first 250 servers for vitality. - - update_server_directory: Discover the given server id for their contacts - - PortableContact::load: Load POCO data from a given POCO address - - check_profile: Update remote profile data - */ - - if (($argc > 2) && ($argv[1] == "dirsearch")) { - $search = urldecode($argv[2]); - $mode = 1; - } elseif (($argc == 2) && ($argv[1] == "checkcontact")) { - $mode = 2; - } elseif (($argc == 2) && ($argv[1] == "suggestions")) { - $mode = 3; - } elseif (($argc == 3) && ($argv[1] == "server")) { - $mode = 4; - } elseif (($argc == 2) && ($argv[1] == "update_server")) { - $mode = 5; - } elseif (($argc == 3) && ($argv[1] == "update_server_directory")) { - $mode = 6; - } elseif (($argc > 5) && ($argv[1] == "load")) { - $mode = 7; - } elseif (($argc == 3) && ($argv[1] == "check_profile")) { - $mode = 8; - } elseif ($argc == 1) { - $search = ""; - $mode = 0; - } else { - logger("Unknown or missing parameter ".$argv[1]."\n"); - return; - } - - logger('start '.$search); - - if ($mode == 8) { - if ($argv[2] != "") { - PortableContact::lastUpdated($argv[2], true); - } - } elseif ($mode == 7) { - if ($argc == 6) { - $url = $argv[5]; - } else { - $url = ''; - } - PortableContact::load(intval($argv[2]), intval($argv[3]), intval($argv[4]), $url); - } elseif ($mode == 6) { - PortableContact::discoverSingleServer(intval($argv[2])); - } elseif ($mode == 5) { - update_server(); - } elseif ($mode == 4) { - $server_url = $argv[2]; - if ($server_url == "") { - return; - } - $server_url = filter_var($server_url, FILTER_SANITIZE_URL); - if (substr(normalise_link($server_url), 0, 7) != "http://") { - return; - } - $result = "Checking server ".$server_url." - "; - $ret = PortableContact::checkServer($server_url); - if ($ret) { - $result .= "success"; - } else { - $result .= "failed"; - } - logger($result, LOGGER_DEBUG); - } elseif ($mode == 3) { - GlobalContact::updateSuggestions(); - } elseif (($mode == 2) && Config::get('system', 'poco_completion')) { - discover_users(); - } elseif (($mode == 1) && ($search != "") && Config::get('system', 'poco_local_search')) { - discover_directory($search); - gs_search_user($search); - } elseif (($mode == 0) && ($search == "") && (Config::get('system', 'poco_discovery') > 0)) { - // Query Friendica and Hubzilla servers for their users - PortableContact::discover(); - - // Query GNU Social servers for their users ("statistics" addon has to be enabled on the GS server) - if (!Config::get('system', 'ostatus_disabled')) { - GlobalContact::discoverGsUsers(); - } - } - - logger('end '.$search); - - return; -} - -/** - * @brief Updates the first 250 servers - * - */ -function update_server() { - $r = q("SELECT `url`, `created`, `last_failure`, `last_contact` FROM `gserver` ORDER BY rand()"); - - if (!DBM::is_result($r)) { - return; - } - - $updated = 0; - - foreach ($r AS $server) { - if (!PortableContact::updateNeeded($server["created"], "", $server["last_failure"], $server["last_contact"])) { - continue; - } - logger('Update server status for server '.$server["url"], LOGGER_DEBUG); - - Worker::add(PRIORITY_LOW, "discover_poco", "server", $server["url"]); - - if (++$updated > 250) { - return; - } - } -} - -function discover_users() { - logger("Discover users", LOGGER_DEBUG); - - $starttime = time(); - - $users = q("SELECT `url`, `created`, `updated`, `last_failure`, `last_contact`, `server_url`, `network` FROM `gcontact` - WHERE `last_contact` < UTC_TIMESTAMP - INTERVAL 1 MONTH AND - `last_failure` < UTC_TIMESTAMP - INTERVAL 1 MONTH AND - `network` IN ('%s', '%s', '%s', '%s', '') ORDER BY rand()", - dbesc(NETWORK_DFRN), dbesc(NETWORK_DIASPORA), - dbesc(NETWORK_OSTATUS), dbesc(NETWORK_FEED)); - - if (!$users) { - return; - } - $checked = 0; - - foreach ($users AS $user) { - - $urlparts = parse_url($user["url"]); - if (!isset($urlparts["scheme"])) { - q("UPDATE `gcontact` SET `network` = '%s' WHERE `nurl` = '%s'", - dbesc(NETWORK_PHANTOM), dbesc(normalise_link($user["url"]))); - continue; - } - - if (in_array($urlparts["host"], array("www.facebook.com", "facebook.com", "twitter.com", - "identi.ca", "alpha.app.net"))) { - $networks = array("www.facebook.com" => NETWORK_FACEBOOK, - "facebook.com" => NETWORK_FACEBOOK, - "twitter.com" => NETWORK_TWITTER, - "identi.ca" => NETWORK_PUMPIO, - "alpha.app.net" => NETWORK_APPNET); - - q("UPDATE `gcontact` SET `network` = '%s' WHERE `nurl` = '%s'", - dbesc($networks[$urlparts["host"]]), dbesc(normalise_link($user["url"]))); - continue; - } - - $server_url = PortableContact::detectServer($user["url"]); - $force_update = false; - - if ($user["server_url"] != "") { - - $force_update = (normalise_link($user["server_url"]) != normalise_link($server_url)); - - $server_url = $user["server_url"]; - } - - if ((($server_url == "") && ($user["network"] == NETWORK_FEED)) || $force_update || PortableContact::checkServer($server_url, $user["network"])) { - logger('Check profile '.$user["url"]); - Worker::add(PRIORITY_LOW, "discover_poco", "check_profile", $user["url"]); - - if (++$checked > 100) { - return; - } - } else { - q("UPDATE `gcontact` SET `last_failure` = '%s' WHERE `nurl` = '%s'", - dbesc(datetime_convert()), dbesc(normalise_link($user["url"]))); - } - - // Quit the loop after 3 minutes - if (time() > ($starttime + 180)) { - return; - } - } -} - -function discover_directory($search) { - - $data = Cache::get("dirsearch:".$search); - if (!is_null($data)) { - // Only search for the same item every 24 hours - if (time() < $data + (60 * 60 * 24)) { - logger("Already searched for ".$search." in the last 24 hours", LOGGER_DEBUG); - return; - } - } - - $x = fetch_url(get_server()."/lsearch?p=1&n=500&search=".urlencode($search)); - $j = json_decode($x); - - if (count($j->results)) { - foreach ($j->results as $jj) { - // Check if the contact already exists - $exists = q("SELECT `id`, `last_contact`, `last_failure`, `updated` FROM `gcontact` WHERE `nurl` = '%s'", normalise_link($jj->url)); - if (DBM::is_result($exists)) { - logger("Profile ".$jj->url." already exists (".$search.")", LOGGER_DEBUG); - - if (($exists[0]["last_contact"] < $exists[0]["last_failure"]) && - ($exists[0]["updated"] < $exists[0]["last_failure"])) { - continue; - } - // Update the contact - PortableContact::lastUpdated($jj->url); - continue; - } - - $server_url = PortableContact::detectServer($jj->url); - if ($server_url != '') { - if (!PortableContact::checkServer($server_url)) { - logger("Friendica server ".$server_url." doesn't answer.", LOGGER_DEBUG); - continue; - } - logger("Friendica server ".$server_url." seems to be okay.", LOGGER_DEBUG); - } - - $data = Probe::uri($jj->url); - if ($data["network"] == NETWORK_DFRN) { - logger("Profile ".$jj->url." is reachable (".$search.")", LOGGER_DEBUG); - logger("Add profile ".$jj->url." to local directory (".$search.")", LOGGER_DEBUG); - - if ($jj->tags != "") { - $data["keywords"] = $jj->tags; - } - - $data["server_url"] = $data["baseurl"]; - - GlobalContact::update($data); - } else { - logger("Profile ".$jj->url." is not responding or no Friendica contact - but network ".$data["network"], LOGGER_DEBUG); - } - } - } - 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) { - - // Currently disabled, since the service isn't available anymore. - // It is not removed since I hope that there will be a successor. - return false; - - $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; - } - - /// @TODO AS is considered as a notation for constants (as they usually being written all upper-case) - /// @TODO find all those and convert to all lower-case which is a keyword then - foreach ($contacts->data AS $user) { - $contact = Probe::uri($user->site_address."/".$user->name); - if ($contact["network"] != NETWORK_PHANTOM) { - $contact["about"] = $user->description; - GlobalContact::update($contact); - } - } -} diff --git a/mod/dirfind.php b/mod/dirfind.php index 84fe6f0ff..89df7c885 100644 --- a/mod/dirfind.php +++ b/mod/dirfind.php @@ -169,7 +169,7 @@ function dirfind_content(App $a, $prefix = "") { } // Add found profiles from the global directory to the local directory - Worker::add(PRIORITY_LOW, 'discover_poco', "dirsearch", urlencode($search)); + Worker::add(PRIORITY_LOW, 'DiscoverPoCo', "dirsearch", urlencode($search)); } else { $p = (($a->pager['page'] != 1) ? '&p=' . $a->pager['page'] : ''); diff --git a/src/Protocol/PortableContact.php b/src/Protocol/PortableContact.php index 826d92159..1c0ce15a8 100644 --- a/src/Protocol/PortableContact.php +++ b/src/Protocol/PortableContact.php @@ -51,7 +51,7 @@ class PortableContact public static function loadWorker($cid, $uid = 0, $zcid = 0, $url = null) { // Call the function "load" via the worker - Worker::add(PRIORITY_LOW, "discover_poco", "load", (int)$cid, (int)$uid, (int)$zcid, $url); + Worker::add(PRIORITY_LOW, "DiscoverPoCo", "load", (int)$cid, (int)$uid, (int)$zcid, $url); } /** @@ -1317,7 +1317,7 @@ class PortableContact $r = q("SELECT `nurl` FROM `gserver` WHERE `nurl` = '%s'", dbesc(normalise_link($server_url))); if (!DBM::is_result($r)) { logger("Call server check for server ".$server_url, LOGGER_DEBUG); - Worker::add(PRIORITY_LOW, "discover_poco", "server", $server_url); + Worker::add(PRIORITY_LOW, "DiscoverPoCo", "server", $server_url); } } } @@ -1340,7 +1340,7 @@ class PortableContact $servers = json_decode($serverdata); foreach ($servers->pods as $server) { - Worker::add(PRIORITY_LOW, "discover_poco", "server", "https://".$server->host); + Worker::add(PRIORITY_LOW, "DiscoverPoCo", "server", "https://".$server->host); } } @@ -1353,7 +1353,7 @@ class PortableContact foreach ($servers as $server) { $url = (is_null($server->https_score) ? 'http' : 'https').'://'.$server->name; - Worker::add(PRIORITY_LOW, "discover_poco", "server", $url); + Worker::add(PRIORITY_LOW, "DiscoverPoCo", "server", $url); } } } @@ -1462,7 +1462,7 @@ class PortableContact } logger('Update directory from server '.$server['url'].' with ID '.$server['id'], LOGGER_DEBUG); - Worker::add(PRIORITY_LOW, "discover_poco", "update_server_directory", (int)$server['id']); + Worker::add(PRIORITY_LOW, "DiscoverPoCo", "update_server_directory", (int)$server['id']); if (!$complete && (--$no_of_queries == 0)) { break; diff --git a/src/Worker/Cron.php b/src/Worker/Cron.php index 21b76903b..b3f0f1f69 100644 --- a/src/Worker/Cron.php +++ b/src/Worker/Cron.php @@ -42,10 +42,10 @@ Class Cron { Worker::add(PRIORITY_NEGLIGIBLE, "queue"); // run the process to discover global contacts in the background - Worker::add(PRIORITY_LOW, "discover_poco"); + Worker::add(PRIORITY_LOW, "DiscoverPoCo"); // run the process to update locally stored global contacts in the background - Worker::add(PRIORITY_LOW, "discover_poco", "checkcontact"); + Worker::add(PRIORITY_LOW, "DiscoverPoCo", "checkcontact"); // Expire and remove user entries Worker::add(PRIORITY_MEDIUM, "CronJobs", "expire_and_remove_users"); @@ -73,9 +73,9 @@ Class Cron { Worker::add(PRIORITY_LOW, "CronJobs", "update_contact_birthdays"); - Worker::add(PRIORITY_LOW, "discover_poco", "update_server"); + Worker::add(PRIORITY_LOW, "DiscoverPoCo", "update_server"); - Worker::add(PRIORITY_LOW, "discover_poco", "suggestions"); + Worker::add(PRIORITY_LOW, "DiscoverPoCo", "suggestions"); Config::set('system', 'last_expire_day', $d2); diff --git a/src/Worker/DiscoverPoCo.php b/src/Worker/DiscoverPoCo.php new file mode 100644 index 000000000..b54c61a6f --- /dev/null +++ b/src/Worker/DiscoverPoCo.php @@ -0,0 +1,304 @@ +: Searches for "search pattern" in the directory. "search pattern" is url encoded. + - checkcontact: Updates gcontact entries + - suggestions: Discover other servers for their contacts. + - server : Searches for the poco server list. "poco url" is base64 encoded. + - update_server: Frequently check the first 250 servers for vitality. + - update_server_directory: Discover the given server id for their contacts + - PortableContact::load: Load POCO data from a given POCO address + - check_profile: Update remote profile data + */ + + if ($command == "dirsearch") { + $search = urldecode($param1); + $mode = 1; + } elseif ($command == "checkcontact") { + $mode = 2; + } elseif ($command == "suggestions") { + $mode = 3; + } elseif ($command == "server") { + $mode = 4; + } elseif ($command == "update_server") { + $mode = 5; + } elseif ($command == "update_server_directory") { + $mode = 6; + } elseif ($command == "load") { + $mode = 7; + } elseif ($command == "check_profile") { + $mode = 8; + } elseif ($command == '') { + $search = ""; + $mode = 0; + } else { + logger("Unknown or missing parameter ".$command."\n"); + return; + } + + logger('start '.$search); + + if ($mode == 8) { + if ($param1 != "") { + PortableContact::lastUpdated($param1, true); + } + } elseif ($mode == 7) { + if (!empty($param4)) { + $url = $param4; + } else { + $url = ''; + } + PortableContact::load(intval($param1), intval($param2), intval($param3), $url); + } elseif ($mode == 6) { + PortableContact::discoverSingleServer(intval($param1)); + } elseif ($mode == 5) { + self::updateServer(); + } elseif ($mode == 4) { + $server_url = $param1; + if ($server_url == "") { + return; + } + $server_url = filter_var($server_url, FILTER_SANITIZE_URL); + if (substr(normalise_link($server_url), 0, 7) != "http://") { + return; + } + $result = "Checking server ".$server_url." - "; + $ret = PortableContact::checkServer($server_url); + if ($ret) { + $result .= "success"; + } else { + $result .= "failed"; + } + logger($result, LOGGER_DEBUG); + } elseif ($mode == 3) { + GlobalContact::updateSuggestions(); + } elseif (($mode == 2) && Config::get('system', 'poco_completion')) { + self::discoverUsers(); + } elseif (($mode == 1) && ($search != "") && Config::get('system', 'poco_local_search')) { + self::discoverDirectory($search); + self::gsSearchUser($search); + } elseif (($mode == 0) && ($search == "") && (Config::get('system', 'poco_discovery') > 0)) { + // Query Friendica and Hubzilla servers for their users + PortableContact::discover(); + + // Query GNU Social servers for their users ("statistics" addon has to be enabled on the GS server) + if (!Config::get('system', 'ostatus_disabled')) { + GlobalContact::discoverGsUsers(); + } + } + + logger('end '.$search); + + return; + } + + /** + * @brief Updates the first 250 servers + * + */ + private static function updateServer() { + $r = q("SELECT `url`, `created`, `last_failure`, `last_contact` FROM `gserver` ORDER BY rand()"); + + if (!DBM::is_result($r)) { + return; + } + + $updated = 0; + + foreach ($r AS $server) { + if (!PortableContact::updateNeeded($server["created"], "", $server["last_failure"], $server["last_contact"])) { + continue; + } + logger('Update server status for server '.$server["url"], LOGGER_DEBUG); + + Worker::add(PRIORITY_LOW, "DiscoverPoCo", "server", $server["url"]); + + if (++$updated > 250) { + return; + } + } + } + + private static function discoverUsers() { + logger("Discover users", LOGGER_DEBUG); + + $starttime = time(); + + $users = q("SELECT `url`, `created`, `updated`, `last_failure`, `last_contact`, `server_url`, `network` FROM `gcontact` + WHERE `last_contact` < UTC_TIMESTAMP - INTERVAL 1 MONTH AND + `last_failure` < UTC_TIMESTAMP - INTERVAL 1 MONTH AND + `network` IN ('%s', '%s', '%s', '%s', '') ORDER BY rand()", + dbesc(NETWORK_DFRN), dbesc(NETWORK_DIASPORA), + dbesc(NETWORK_OSTATUS), dbesc(NETWORK_FEED)); + + if (!$users) { + return; + } + $checked = 0; + + foreach ($users AS $user) { + + $urlparts = parse_url($user["url"]); + if (!isset($urlparts["scheme"])) { + q("UPDATE `gcontact` SET `network` = '%s' WHERE `nurl` = '%s'", + dbesc(NETWORK_PHANTOM), dbesc(normalise_link($user["url"]))); + continue; + } + + if (in_array($urlparts["host"], array("www.facebook.com", "facebook.com", "twitter.com", + "identi.ca", "alpha.app.net"))) { + $networks = array("www.facebook.com" => NETWORK_FACEBOOK, + "facebook.com" => NETWORK_FACEBOOK, + "twitter.com" => NETWORK_TWITTER, + "identi.ca" => NETWORK_PUMPIO, + "alpha.app.net" => NETWORK_APPNET); + + q("UPDATE `gcontact` SET `network` = '%s' WHERE `nurl` = '%s'", + dbesc($networks[$urlparts["host"]]), dbesc(normalise_link($user["url"]))); + continue; + } + + $server_url = PortableContact::detectServer($user["url"]); + $force_update = false; + + if ($user["server_url"] != "") { + + $force_update = (normalise_link($user["server_url"]) != normalise_link($server_url)); + + $server_url = $user["server_url"]; + } + + if ((($server_url == "") && ($user["network"] == NETWORK_FEED)) || $force_update || PortableContact::checkServer($server_url, $user["network"])) { + logger('Check profile '.$user["url"]); + Worker::add(PRIORITY_LOW, "DiscoverPoCo", "check_profile", $user["url"]); + + if (++$checked > 100) { + return; + } + } else { + q("UPDATE `gcontact` SET `last_failure` = '%s' WHERE `nurl` = '%s'", + dbesc(datetime_convert()), dbesc(normalise_link($user["url"]))); + } + + // Quit the loop after 3 minutes + if (time() > ($starttime + 180)) { + return; + } + } + } + + private static function discoverDirectory($search) { + + $data = Cache::get("dirsearch:".$search); + if (!is_null($data)) { + // Only search for the same item every 24 hours + if (time() < $data + (60 * 60 * 24)) { + logger("Already searched for ".$search." in the last 24 hours", LOGGER_DEBUG); + return; + } + } + + $x = fetch_url(get_server()."/lsearch?p=1&n=500&search=".urlencode($search)); + $j = json_decode($x); + + if (count($j->results)) { + foreach ($j->results as $jj) { + // Check if the contact already exists + $exists = q("SELECT `id`, `last_contact`, `last_failure`, `updated` FROM `gcontact` WHERE `nurl` = '%s'", normalise_link($jj->url)); + if (DBM::is_result($exists)) { + logger("Profile ".$jj->url." already exists (".$search.")", LOGGER_DEBUG); + + if (($exists[0]["last_contact"] < $exists[0]["last_failure"]) && + ($exists[0]["updated"] < $exists[0]["last_failure"])) { + continue; + } + // Update the contact + PortableContact::lastUpdated($jj->url); + continue; + } + + $server_url = PortableContact::detectServer($jj->url); + if ($server_url != '') { + if (!PortableContact::checkServer($server_url)) { + logger("Friendica server ".$server_url." doesn't answer.", LOGGER_DEBUG); + continue; + } + logger("Friendica server ".$server_url." seems to be okay.", LOGGER_DEBUG); + } + + $data = Probe::uri($jj->url); + if ($data["network"] == NETWORK_DFRN) { + logger("Profile ".$jj->url." is reachable (".$search.")", LOGGER_DEBUG); + logger("Add profile ".$jj->url." to local directory (".$search.")", LOGGER_DEBUG); + + if ($jj->tags != "") { + $data["keywords"] = $jj->tags; + } + + $data["server_url"] = $data["baseurl"]; + + GlobalContact::update($data); + } else { + logger("Profile ".$jj->url." is not responding or no Friendica contact - but network ".$data["network"], LOGGER_DEBUG); + } + } + } + Cache::set("dirsearch:".$search, time(), CACHE_DAY); + } + + /** + * @brief Search for GNU Social user with gstools.org + * + * @param str $search User name + */ + private static function gsSearchUser($search) { + + // Currently disabled, since the service isn't available anymore. + // It is not removed since I hope that there will be a successor. + return false; + + $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; + } + + /// @TODO AS is considered as a notation for constants (as they usually being written all upper-case) + /// @TODO find all those and convert to all lower-case which is a keyword then + foreach ($contacts->data AS $user) { + $contact = Probe::uri($user->site_address."/".$user->name); + if ($contact["network"] != NETWORK_PHANTOM) { + $contact["about"] = $user->description; + GlobalContact::update($contact); + } + } + } +} From 02e4cf2a02ce59af29daf2cfd2f3749d3a68e23a Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 18 Nov 2017 23:46:16 +0000 Subject: [PATCH 041/175] Missing variable --- src/Worker/DBUpdate.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Worker/DBUpdate.php b/src/Worker/DBUpdate.php index 0e1c9859b..5f85c8ebe 100644 --- a/src/Worker/DBUpdate.php +++ b/src/Worker/DBUpdate.php @@ -9,6 +9,8 @@ use Friendica\Core\Config; class DBUpdate { public static function execute() { + $a = get_app(); + // We are deleting the latest dbupdate entry. // This is done to avoid endless loops because the update was interupted. Config::delete('database', 'dbupdate_'.DB_UPDATE_VERSION); From 3616ff886ee8f0380b49fb155d14f1303a6528e4 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 19 Nov 2017 00:14:20 +0000 Subject: [PATCH 042/175] Corrected class name --- src/Worker/DiscoverPoCo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Worker/DiscoverPoCo.php b/src/Worker/DiscoverPoCo.php index b54c61a6f..96cfae00b 100644 --- a/src/Worker/DiscoverPoCo.php +++ b/src/Worker/DiscoverPoCo.php @@ -14,9 +14,9 @@ use Friendica\Protocol\PortableContact; require_once 'include/datetime.php'; -class DiscoverPoco { +class DiscoverPoCo { /// @todo Clean up this mess of a parameter hell and split it in several classes - public static function execute($command, $param1 = '', $param2 = '', $param3 = '', $param4 = '') + public static function execute($command = '', $param1 = '', $param2 = '', $param3 = '', $param4 = '') { /* This function can be called in these ways: From dc06b851f558b62f05edb8ac11ae8145203b0d05 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 19 Nov 2017 00:55:37 -0500 Subject: [PATCH 043/175] Update Composer autoload files --- vendor/composer/autoload_classmap.php | 23 +++++++++++++++++++++++ vendor/composer/autoload_static.php | 23 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 35482a8ff..10e576ad0 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -10,17 +10,40 @@ return array( 'Console_Getopt' => $vendorDir . '/pear-pear.php.net/Console_Getopt/Console/Getopt.php', 'Detection\\MobileDetect' => $vendorDir . '/mobiledetect/mobiledetectlib/namespaced/Detection/MobileDetect.php', 'Friendica\\App' => $baseDir . '/src/App.php', + 'Friendica\\Content\\Smilies' => $baseDir . '/src/Content/Smilies.php', + 'Friendica\\Core\\BaseObject' => $baseDir . '/src/Core/BaseObject.php', + 'Friendica\\Core\\Cache' => $baseDir . '/src/Core/Cache.php', 'Friendica\\Core\\Config' => $baseDir . '/src/Core/Config.php', + 'Friendica\\Core\\Conversation' => $baseDir . '/src/Core/Conversation.php', + 'Friendica\\Core\\Item' => $baseDir . '/src/Core/Item.php', 'Friendica\\Core\\NotificationsManager' => $baseDir . '/src/Core/NotificationsManager.php', 'Friendica\\Core\\PConfig' => $baseDir . '/src/Core/PConfig.php', 'Friendica\\Core\\System' => $baseDir . '/src/Core/System.php', 'Friendica\\Core\\Worker' => $baseDir . '/src/Core/Worker.php', 'Friendica\\Database\\DBM' => $baseDir . '/src/Database/DBM.php', + 'Friendica\\Model\\GlobalContact' => $baseDir . '/src/Model/GlobalContact.php', 'Friendica\\Network\\Probe' => $baseDir . '/src/Network/Probe.php', 'Friendica\\ParseUrl' => $baseDir . '/src/ParseUrl.php', 'Friendica\\Protocol\\DFRN' => $baseDir . '/src/Protocol/DFRN.php', 'Friendica\\Protocol\\Diaspora' => $baseDir . '/src/Protocol/Diaspora.php', + 'Friendica\\Protocol\\OStatus' => $baseDir . '/src/Protocol/OStatus.php', + 'Friendica\\Protocol\\PortableContact' => $baseDir . '/src/Protocol/PortableContact.php', 'Friendica\\Util\\Lock' => $baseDir . '/src/Util/Lock.php', + 'Friendica\\Util\\XML' => $baseDir . '/src/Util/XML.php', + 'Friendica\\Worker\\CheckVersion' => $baseDir . '/src/Worker/CheckVersion.php', + 'Friendica\\Worker\\Cron' => $baseDir . '/src/Worker/Cron.php', + 'Friendica\\Worker\\CronHooks' => $baseDir . '/src/Worker/CronHooks.php', + 'Friendica\\Worker\\CronJobs' => $baseDir . '/src/Worker/CronJobs.php', + 'Friendica\\Worker\\DBClean' => $baseDir . '/src/Worker/DBClean.php', + 'Friendica\\Worker\\DBUpdate' => $baseDir . '/src/Worker/DBUpdate.php', + 'Friendica\\Worker\\Directory' => $baseDir . '/src/Worker/Directory.php', + 'Friendica\\Worker\\DiscoverPoCo' => $baseDir . '/src/Worker/DiscoverPoCo.php', + 'Friendica\\Worker\\OnePoll' => $baseDir . '/src/Worker/OnePoll.php', + 'Friendica\\Worker\\RemoveContact' => $baseDir . '/src/Worker/RemoveContact.php', + 'Friendica\\Worker\\SpoolPost' => $baseDir . '/src/Worker/SpoolPost.php', + 'Friendica\\Worker\\TagUpdate' => $baseDir . '/src/Worker/TagUpdate.php', + 'Friendica\\Worker\\ThreadUpdate' => $baseDir . '/src/Worker/ThreadUpdate.php', + 'Friendica\\Worker\\UpdateGContact' => $baseDir . '/src/Worker/UpdateGContact.php', 'HTMLPurifier' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.php', 'HTMLPurifier_Arborize' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Arborize.php', 'HTMLPurifier_AttrCollections' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrCollections.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 9c40e66c6..8a188c2fa 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -62,17 +62,40 @@ class ComposerStaticInitFriendica 'Console_Getopt' => __DIR__ . '/..' . '/pear-pear.php.net/Console_Getopt/Console/Getopt.php', 'Detection\\MobileDetect' => __DIR__ . '/..' . '/mobiledetect/mobiledetectlib/namespaced/Detection/MobileDetect.php', 'Friendica\\App' => __DIR__ . '/../..' . '/src/App.php', + 'Friendica\\Content\\Smilies' => __DIR__ . '/../..' . '/src/Content/Smilies.php', + 'Friendica\\Core\\BaseObject' => __DIR__ . '/../..' . '/src/Core/BaseObject.php', + 'Friendica\\Core\\Cache' => __DIR__ . '/../..' . '/src/Core/Cache.php', 'Friendica\\Core\\Config' => __DIR__ . '/../..' . '/src/Core/Config.php', + 'Friendica\\Core\\Conversation' => __DIR__ . '/../..' . '/src/Core/Conversation.php', + 'Friendica\\Core\\Item' => __DIR__ . '/../..' . '/src/Core/Item.php', 'Friendica\\Core\\NotificationsManager' => __DIR__ . '/../..' . '/src/Core/NotificationsManager.php', 'Friendica\\Core\\PConfig' => __DIR__ . '/../..' . '/src/Core/PConfig.php', 'Friendica\\Core\\System' => __DIR__ . '/../..' . '/src/Core/System.php', 'Friendica\\Core\\Worker' => __DIR__ . '/../..' . '/src/Core/Worker.php', 'Friendica\\Database\\DBM' => __DIR__ . '/../..' . '/src/Database/DBM.php', + 'Friendica\\Model\\GlobalContact' => __DIR__ . '/../..' . '/src/Model/GlobalContact.php', 'Friendica\\Network\\Probe' => __DIR__ . '/../..' . '/src/Network/Probe.php', 'Friendica\\ParseUrl' => __DIR__ . '/../..' . '/src/ParseUrl.php', 'Friendica\\Protocol\\DFRN' => __DIR__ . '/../..' . '/src/Protocol/DFRN.php', 'Friendica\\Protocol\\Diaspora' => __DIR__ . '/../..' . '/src/Protocol/Diaspora.php', + 'Friendica\\Protocol\\OStatus' => __DIR__ . '/../..' . '/src/Protocol/OStatus.php', + 'Friendica\\Protocol\\PortableContact' => __DIR__ . '/../..' . '/src/Protocol/PortableContact.php', 'Friendica\\Util\\Lock' => __DIR__ . '/../..' . '/src/Util/Lock.php', + 'Friendica\\Util\\XML' => __DIR__ . '/../..' . '/src/Util/XML.php', + 'Friendica\\Worker\\CheckVersion' => __DIR__ . '/../..' . '/src/Worker/CheckVersion.php', + 'Friendica\\Worker\\Cron' => __DIR__ . '/../..' . '/src/Worker/Cron.php', + 'Friendica\\Worker\\CronHooks' => __DIR__ . '/../..' . '/src/Worker/CronHooks.php', + 'Friendica\\Worker\\CronJobs' => __DIR__ . '/../..' . '/src/Worker/CronJobs.php', + 'Friendica\\Worker\\DBClean' => __DIR__ . '/../..' . '/src/Worker/DBClean.php', + 'Friendica\\Worker\\DBUpdate' => __DIR__ . '/../..' . '/src/Worker/DBUpdate.php', + 'Friendica\\Worker\\Directory' => __DIR__ . '/../..' . '/src/Worker/Directory.php', + 'Friendica\\Worker\\DiscoverPoCo' => __DIR__ . '/../..' . '/src/Worker/DiscoverPoCo.php', + 'Friendica\\Worker\\OnePoll' => __DIR__ . '/../..' . '/src/Worker/OnePoll.php', + 'Friendica\\Worker\\RemoveContact' => __DIR__ . '/../..' . '/src/Worker/RemoveContact.php', + 'Friendica\\Worker\\SpoolPost' => __DIR__ . '/../..' . '/src/Worker/SpoolPost.php', + 'Friendica\\Worker\\TagUpdate' => __DIR__ . '/../..' . '/src/Worker/TagUpdate.php', + 'Friendica\\Worker\\ThreadUpdate' => __DIR__ . '/../..' . '/src/Worker/ThreadUpdate.php', + 'Friendica\\Worker\\UpdateGContact' => __DIR__ . '/../..' . '/src/Worker/UpdateGContact.php', 'HTMLPurifier' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.php', 'HTMLPurifier_Arborize' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Arborize.php', 'HTMLPurifier_AttrCollections' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrCollections.php', From 81c3ddd1fbcae84a471c232062dbfecf740049ce Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 19 Nov 2017 00:57:06 -0500 Subject: [PATCH 044/175] Add smart_flatten_conversation function - Fix doc - Fix formatting - Update conv_sort with smart threading --- include/conversation.php | 243 +++++++++++++++++++++++++-------------- 1 file changed, 158 insertions(+), 85 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 7abe97e06..196fb6389 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1361,13 +1361,20 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false) { return $o; } - -function get_item_children($arr, $parent) { - $children = array(); - $a = get_app(); - foreach ($arr as $item) { +/** + * Returns all the children in the given item list of the given parent. If threading + * is allowed, does it recursively. + * + * @param array $item_list + * @param array $parent + * @return type + */ +function get_item_children(array $item_list, array $parent, $recursive = true) +{ + $children = []; + foreach ($item_list as $item) { if ($item['id'] != $item['parent']) { - if (Config::get('system', 'thread_allow') && $a->theme_thread_allow) { + if ($recursive) { // Fallback to parent-uri if thr-parent is not set $thr_parent = $item['thr-parent']; if ($thr_parent == '') { @@ -1375,7 +1382,7 @@ function get_item_children($arr, $parent) { } if ($thr_parent == $parent['uri']) { - $item['children'] = get_item_children($arr, $item); + $item['children'] = get_item_children($item_list, $item); $children[] = $item; } } elseif ($item['parent'] == $parent['id']) { @@ -1386,54 +1393,124 @@ function get_item_children($arr, $parent) { return $children; } -/// @TODO Add type-hint -function sort_item_children($items) { +/** + * Recursively sorts a tree-like item array + * + * @param array $items + * @return array + */ +function sort_item_children(array $items) +{ $result = $items; usort($result, 'sort_thr_created_rev'); foreach ($result as $k => $i) { - if (count($result[$k]['children'])) { + if (isset($result[$k]['children'])) { $result[$k]['children'] = sort_item_children($result[$k]['children']); } } return $result; } -/// @TODO Add type-hint -function add_children_to_list($children, &$arr) { - foreach ($children as $y) { - $arr[] = $y; - if (count($y['children'])) { - add_children_to_list($y['children'], $arr); +/** + * Recursively add all children items at the top level of a list + * + * @param array $children List of items to append + * @param array $item_list + */ +function add_children_to_list(array $children, array &$item_list) +{ + foreach ($children as $child) { + $item_list[] = $child; + if (isset($child['children'])) { + add_children_to_list($child['children'], $item_list); } } } -/// @TODO Add type-hint -function conv_sort($arr, $order) { - - if ((!(is_array($arr) && count($arr)))) { - return array(); +/** + * This recursive function takes the item tree structure created by conv_sort() and + * flatten the extraneous depth levels when people reply sequentially, removing the + * stairs effect in threaded conversations limiting the available content width. + * + * The basic principle is the following: if a post item has only one reply and is + * the last reply of its parent, then the reply is moved to the parent. + * + * This process is rendered somewhat more complicated because items can be either + * replies or likes, and these don't factor at all in the reply count/last reply. + * + * @param array $parent A tree-like array of items + * @return array + */ +function smart_flatten_conversation(array $parent) +{ + if (! isset($parent['children']) || count($parent['children']) == 0) { + return $parent; } - $parents = array(); - $children = array(); - $newarr = array(); + // We use a for loop to ensure we process the newly-moved items + for ($i = 0; $i < count($parent['children']); $i++) { + $child = $parent['children'][$i]; - /* - * This is a preparation for having two different items with the same uri in one thread - * This will otherwise lead to an endless loop. - */ - foreach ($arr as $x) { - if (!isset($newarr[$x['uri']])) { - $newarr[$x['uri']] = $x; + if (isset($child['children']) && count($child['children'])) { + // This helps counting only the regular posts + $count_post_closure = function($var) { + return $var['verb'] === 'http://activitystrea.ms/schema/1.0/post'; + }; + + $child_post_count = count(array_filter($child['children'], $count_post_closure)); + + $remaining_post_count = count(array_filter(array_slice($parent['children'], $i), $count_post_closure)); + + // If there's only one child's children post and this is the last child post + if ($child_post_count == 1 && $remaining_post_count == 1) { + + // Searches the post item in the children + $j = 0; + while($child['children'][$j]['verb'] !== 'http://activitystrea.ms/schema/1.0/post' && $j < count($child['children'])) { + $j ++; + } + + $moved_item = $child['children'][$j]; + unset($parent['children'][$i]['children'][$j]); + $parent['children'][] = $moved_item; + } else { + $parent['children'][$i] = smart_flatten_conversation($child); + } } } - $arr = $newarr; + return $parent; +} - foreach ($arr as $x) { - if ($x['id'] == $x['parent']) { - $parents[] = $x; + +/** + * Expands a flat list of items into corresponding tree-like conversation structures, + * sort the top-level posts either on "created" or "commented", and finally + * append all the items at the top level (???) + * + * @param array $item_list A list of items belonging to one or more conversations + * @param string $order Either on "created" or "commented" + * @return array + */ +function conv_sort(array $item_list, $order) +{ + $parents = []; + + if (!(is_array($item_list) && count($item_list))) { + return $parents; + } + + $item_array = []; + + // Dedupes the item list on the uri to prevent infinite loops + foreach ($item_list as $item) { + $item_array[$item['uri']] = $item; + } + + // Extract the top level items + foreach ($item_array as $item) { + if ($item['id'] == $item['parent']) { + $parents[] = $item; } } @@ -1443,73 +1520,69 @@ function conv_sort($arr, $order) { usort($parents, 'sort_thr_commented'); } - if (count($parents)) { - foreach ($parents as $i => $_x) { - $parents[$i]['children'] = get_item_children($arr, $_x); + $thread_allowed = Config::get('system', 'thread_allow') && get_app()->theme_thread_allow; + + foreach ($parents as $i => $parent) { + $parents[$i]['children'] = get_item_children($item_array, $parent, $thread_allowed); + } + + foreach ($parents as $i => $parent) { + $parents[$i]['children'] = sort_item_children($parents[$i]['children']); + } + + if ($thread_allowed && PConfig::get(local_user(), 'system', 'smart_threading', 0)) { + foreach ($parents as $i => $parent) { + $parents[$i] = smart_flatten_conversation($parent); } } - /// @TODO Old-lost code? - /*foreach ($arr as $x) { - if ($x['id'] != $x['parent']) { - $p = find_thread_parent_index($parents,$x); - if ($p !== false) - $parents[$p]['children'][] = $x; - } - }*/ - if (count($parents)) { - foreach ($parents as $k => $v) { - if (count($parents[$k]['children'])) { - $parents[$k]['children'] = sort_item_children($parents[$k]['children']); - /// @TODO Old-lost code? - /*$y = $parents[$k]['children']; - usort($y,'sort_thr_created_rev'); - $parents[$k]['children'] = $y;*/ - } + /// @TODO: Stop recusrsively adding all children back to the top level (!!!) + /// However, this apparently ensures responses (likes, attendance) display (?!) + foreach ($parents as $parent) { + if (count($parent['children'])) { + add_children_to_list($parent['children'], $parents); } } - $ret = array(); - if (count($parents)) { - foreach ($parents as $x) { - $ret[] = $x; - if (count($x['children'])) { - add_children_to_list($x['children'], $ret); - /// @TODO Old-lost code? - /*foreach ($x['children'] as $y) - $ret[] = $y;*/ - } - } - } - - return $ret; + return $parents; } -/// @TODO Add type-hint -function sort_thr_created($a, $b) { +/** + * usort() callback to sort item arrays by the created key + * + * @param array $a + * @param array $b + * @return int + */ +function sort_thr_created(array $a, array $b) +{ return strcmp($b['created'], $a['created']); } -/// @TODO Add type-hint -function sort_thr_created_rev($a, $b) { +/** + * usort() callback to reverse sort item arrays by the created key + * + * @param array $a + * @param array $b + * @return int + */ +function sort_thr_created_rev(array $a, array $b) +{ return strcmp($a['created'], $b['created']); } -/// @TODO Add type-hint -function sort_thr_commented($a, $b) { +/** + * usort() callback to sort item arrays by the commented key + * + * @param array $a + * @param array $b + * @return type + */ +function sort_thr_commented(array $a, array $b) +{ return strcmp($b['commented'], $a['commented']); } -/// @TODO Add type-hint -function find_thread_parent_index($arr, $x) { - foreach ($arr as $k => $v) { - if ($v['id'] == $x['parent']) { - return $k; - } - } - return false; -} - /// @TODO Add type-hint function render_location_dummy($item) { if ($item['location'] != "") { From 2336fa9d74ff395439066e9ffcf77a83fb0a35c1 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 19 Nov 2017 00:57:31 -0500 Subject: [PATCH 045/175] Add smart_threading user setting --- mod/settings.php | 4 ++++ view/templates/settings_display.tpl | 1 + view/theme/frio/templates/settings_display.tpl | 1 + 3 files changed, 6 insertions(+) diff --git a/mod/settings.php b/mod/settings.php index c0b3d2cc1..bc6425171 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -303,6 +303,7 @@ function settings_post(App $a) { $infinite_scroll = x($_POST, 'infinite_scroll') ? intval($_POST['infinite_scroll']) : 0; $no_auto_update = x($_POST, 'no_auto_update') ? intval($_POST['no_auto_update']) : 0; $bandwidth_saver = x($_POST, 'bandwidth_saver') ? intval($_POST['bandwidth_saver']) : 0; + $smart_threading = x($_POST, 'smart_threading') ? intval($_POST['smart_threading']) : 0; $nowarn_insecure = x($_POST, 'nowarn_insecure') ? intval($_POST['nowarn_insecure']) : 0; $browser_update = x($_POST, 'browser_update') ? intval($_POST['browser_update']) : 0; if ($browser_update != -1) { @@ -335,6 +336,7 @@ function settings_post(App $a) { PConfig::set(local_user(), 'system', 'infinite_scroll' , $infinite_scroll); PConfig::set(local_user(), 'system', 'no_auto_update' , $no_auto_update); PConfig::set(local_user(), 'system', 'bandwidth_saver' , $bandwidth_saver); + PConfig::set(local_user(), 'system', 'smart_threading' , $smart_threading); if ($theme == $a->user['theme']) { // call theme_post only if theme has not been changed @@ -989,6 +991,7 @@ function settings_content(App $a) { $infinite_scroll = PConfig::get(local_user(), 'system', 'infinite_scroll', 0); $no_auto_update = PConfig::get(local_user(), 'system', 'no_auto_update', 0); $bandwidth_saver = PConfig::get(local_user(), 'system', 'bandwidth_saver', 0); + $smart_threading = PConfig::get(local_user(), 'system', 'smart_threading', 0); $theme_config = ""; if (($themeconfigfile = get_theme_config_file($theme_selected)) != null) { @@ -1017,6 +1020,7 @@ function settings_content(App $a) { '$infinite_scroll' => array('infinite_scroll', t("Infinite scroll"), $infinite_scroll, ''), '$no_auto_update' => array('no_auto_update', t("Automatic updates only at the top of the network page"), $no_auto_update, t('When disabled, the network page is updated all the time, which could be confusing while reading.')), '$bandwidth_saver' => array('bandwidth_saver', t('Bandwith Saver Mode'), $bandwidth_saver, t('When enabled, embedded content is not displayed on automatic updates, they only show on page reload.')), + '$smart_threading' => array('smart_threading', t('Smart Threading'), $smart_threading, t('When enabled, suppress extraneous thread indentation while keeping it where it matters. Only works if threading is available and enabled.')), '$d_tset' => t('General Theme Settings'), '$d_ctset' => t('Custom Theme Settings'), diff --git a/view/templates/settings_display.tpl b/view/templates/settings_display.tpl index ef2091035..ff3e4fba6 100644 --- a/view/templates/settings_display.tpl +++ b/view/templates/settings_display.tpl @@ -20,6 +20,7 @@ {{include file="field_checkbox.tpl" field=$noinfo}} {{include file="field_checkbox.tpl" field=$infinite_scroll}} {{include file="field_checkbox.tpl" field=$bandwidth_saver}} +{{include file="field_checkbox.tpl" field=$smart_threading}}

{{$calendar_title}}

{{include file="field_select.tpl" field=$first_day_of_week}} diff --git a/view/theme/frio/templates/settings_display.tpl b/view/theme/frio/templates/settings_display.tpl index 177fa6311..cc36762dc 100644 --- a/view/theme/frio/templates/settings_display.tpl +++ b/view/theme/frio/templates/settings_display.tpl @@ -75,6 +75,7 @@ {{include file="field_checkbox.tpl" field=$noinfo}} {{include file="field_checkbox.tpl" field=$infinite_scroll}} {{include file="field_checkbox.tpl" field=$bandwidth_saver}} + {{include file="field_checkbox.tpl" field=$smart_threading}}
From 9832ac7dabb7fe5535e325a658ad17bae3249f4d Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 19 Nov 2017 09:55:45 +0000 Subject: [PATCH 046/175] Always show dislikes - the setting now just hides the button --- src/Core/Item.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Core/Item.php b/src/Core/Item.php index 20d4db005..49f060338 100644 --- a/src/Core/Item.php +++ b/src/Core/Item.php @@ -217,10 +217,7 @@ class Item extends BaseObject }*/ // process action responses - e.g. like/dislike/attend/agree/whatever - $response_verbs = array('like'); - if (feature_enabled($conv->get_profile_owner(), 'dislike')) { - $response_verbs[] = 'dislike'; - } + $response_verbs = array('like', 'dislike'); if ($item['object-type'] === ACTIVITY_OBJ_EVENT) { $response_verbs[] = 'attendyes'; From 0fe42335695c210024733bdc1ea0b0491d9d593a Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 19 Nov 2017 08:41:16 -0500 Subject: [PATCH 047/175] Improve documentation with brief key --- include/conversation.php | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 196fb6389..31ab4eade 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1362,11 +1362,14 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false) { } /** - * Returns all the children in the given item list of the given parent. If threading - * is allowed, does it recursively. + * Returns all the children in the given item list of the given parent, recusrsively + * or not. + * + * @brief Returns all the children in the given item list of the given parent * * @param array $item_list * @param array $parent + * @param bool $recursive * @return type */ function get_item_children(array $item_list, array $parent, $recursive = true) @@ -1394,7 +1397,7 @@ function get_item_children(array $item_list, array $parent, $recursive = true) } /** - * Recursively sorts a tree-like item array + * @brief Recursively sorts a tree-like item array * * @param array $items * @return array @@ -1412,7 +1415,7 @@ function sort_item_children(array $items) } /** - * Recursively add all children items at the top level of a list + * @brief Recursively add all children items at the top level of a list * * @param array $children List of items to append * @param array $item_list @@ -1438,6 +1441,8 @@ function add_children_to_list(array $children, array &$item_list) * This process is rendered somewhat more complicated because items can be either * replies or likes, and these don't factor at all in the reply count/last reply. * + * @brief Selectively flattens a tree-like item structure to prevent threading stairs + * * @param array $parent A tree-like array of items * @return array */ @@ -1488,6 +1493,8 @@ function smart_flatten_conversation(array $parent) * sort the top-level posts either on "created" or "commented", and finally * append all the items at the top level (???) * + * @brief Expands a flat item list into a conversation array for display + * * @param array $item_list A list of items belonging to one or more conversations * @param string $order Either on "created" or "commented" * @return array @@ -1548,7 +1555,7 @@ function conv_sort(array $item_list, $order) } /** - * usort() callback to sort item arrays by the created key + * @brief usort() callback to sort item arrays by the created key * * @param array $a * @param array $b @@ -1560,7 +1567,7 @@ function sort_thr_created(array $a, array $b) } /** - * usort() callback to reverse sort item arrays by the created key + * @brief usort() callback to reverse sort item arrays by the created key * * @param array $a * @param array $b @@ -1572,7 +1579,7 @@ function sort_thr_created_rev(array $a, array $b) } /** - * usort() callback to sort item arrays by the commented key + * @brief usort() callback to sort item arrays by the commented key * * @param array $a * @param array $b From 4aa003f43fb18184de25d85e21c6146e51ac3e80 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 19 Nov 2017 08:41:33 -0500 Subject: [PATCH 048/175] Use constant instead of hardcoded string for ACTIVITY_POST --- include/conversation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 31ab4eade..2e6da4ce9 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1459,7 +1459,7 @@ function smart_flatten_conversation(array $parent) if (isset($child['children']) && count($child['children'])) { // This helps counting only the regular posts $count_post_closure = function($var) { - return $var['verb'] === 'http://activitystrea.ms/schema/1.0/post'; + return $var['verb'] === ACTIVITY_POST; }; $child_post_count = count(array_filter($child['children'], $count_post_closure)); @@ -1471,7 +1471,7 @@ function smart_flatten_conversation(array $parent) // Searches the post item in the children $j = 0; - while($child['children'][$j]['verb'] !== 'http://activitystrea.ms/schema/1.0/post' && $j < count($child['children'])) { + while($child['children'][$j]['verb'] !== ACTIVITY_POST && $j < count($child['children'])) { $j ++; } From 104a1d7fd302bc4d10a5da4f17528ecbcecf66a7 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 19 Nov 2017 10:22:18 -0500 Subject: [PATCH 049/175] Move ITemplateEngine to src - Fix method name format --- include/friendica_smarty.php | 9 +++++---- include/text.php | 4 ++-- object/TemplateEngine.php | 15 --------------- src/App.php | 2 +- src/Render/ITemplateEngine.php | 15 +++++++++++++++ 5 files changed, 23 insertions(+), 22 deletions(-) delete mode 100644 object/TemplateEngine.php create mode 100644 src/Render/ITemplateEngine.php diff --git a/include/friendica_smarty.php b/include/friendica_smarty.php index f497fbee0..5dd324bf7 100644 --- a/include/friendica_smarty.php +++ b/include/friendica_smarty.php @@ -1,6 +1,7 @@ parsed($template); } - public function get_template_file($file, $root=''){ + public function getTemplateFile($file, $root=''){ $a = get_app(); $template_file = get_template_file($a, SMARTY3_TEMPLATE_FOLDER.'/'.$file, $root); $template = new FriendicaSmarty(); diff --git a/include/text.php b/include/text.php index cf802513c..616c4adb8 100644 --- a/include/text.php +++ b/include/text.php @@ -30,7 +30,7 @@ function replace_macros($s, $r) { $t = $a->template_engine(); try { - $output = $t->replace_macros($s, $r); + $output = $t->replaceMacros($s, $r); } catch (Exception $e) { echo "
" . __FUNCTION__ . ": " . $e->getMessage() . "
"; killme(); @@ -591,7 +591,7 @@ function get_markup_template($s, $root = '') { $a = get_app(); $t = $a->template_engine(); try { - $template = $t->get_template_file($s, $root); + $template = $t->getTemplateFile($s, $root); } catch (Exception $e) { echo "
" . __FUNCTION__ . ": " . $e->getMessage() . "
"; killme(); diff --git a/object/TemplateEngine.php b/object/TemplateEngine.php deleted file mode 100644 index 61ccb01dc..000000000 --- a/object/TemplateEngine.php +++ /dev/null @@ -1,15 +0,0 @@ -register_template_engine($k); } } diff --git a/src/Render/ITemplateEngine.php b/src/Render/ITemplateEngine.php new file mode 100644 index 000000000..d59248119 --- /dev/null +++ b/src/Render/ITemplateEngine.php @@ -0,0 +1,15 @@ + Date: Sun, 19 Nov 2017 10:42:00 -0500 Subject: [PATCH 050/175] Add orphan items as children to their top-level post - Make get_item_children deplete the item list --- include/conversation.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 2e6da4ce9..9f6cfa0f5 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1362,20 +1362,19 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false) { } /** - * Returns all the children in the given item list of the given parent, recusrsively - * or not. + * Plucks the children of the given parent from a given item list. * - * @brief Returns all the children in the given item list of the given parent + * @brief Plucks all the children in the given item list of the given parent * * @param array $item_list * @param array $parent * @param bool $recursive * @return type */ -function get_item_children(array $item_list, array $parent, $recursive = true) +function get_item_children(array &$item_list, array $parent, $recursive = true) { $children = []; - foreach ($item_list as $item) { + foreach ($item_list as $i => $item) { if ($item['id'] != $item['parent']) { if ($recursive) { // Fallback to parent-uri if thr-parent is not set @@ -1387,9 +1386,11 @@ function get_item_children(array $item_list, array $parent, $recursive = true) if ($thr_parent == $parent['uri']) { $item['children'] = get_item_children($item_list, $item); $children[] = $item; + unset($item_list[$i]); } } elseif ($item['parent'] == $parent['id']) { $children[] = $item; + unset($item_list[$i]); } } } @@ -1529,8 +1530,14 @@ function conv_sort(array $item_list, $order) $thread_allowed = Config::get('system', 'thread_allow') && get_app()->theme_thread_allow; + /* + * Plucks children from the item_array, second pass collects eventual orphan + * items and add them as children of their top-level post. + */ foreach ($parents as $i => $parent) { - $parents[$i]['children'] = get_item_children($item_array, $parent, $thread_allowed); + $parents[$i]['children'] = + get_item_children($item_array, $parent, $thread_allowed) + + get_item_children($item_array, $parent, false); } foreach ($parents as $i => $parent) { From 501514bd5406253bcbcb420d89fa04199fe5b8c2 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 19 Nov 2017 16:25:13 +0000 Subject: [PATCH 051/175] expire and gprobe now moved as well --- include/expire.php | 76 --------------------------------- include/gprobe.php | 64 ---------------------------- include/identity.php | 2 +- src/Model/GlobalContact.php | 2 +- src/Worker/Cron.php | 2 +- src/Worker/Expire.php | 85 +++++++++++++++++++++++++++++++++++++ src/Worker/GProbe.php | 65 ++++++++++++++++++++++++++++ 7 files changed, 153 insertions(+), 143 deletions(-) delete mode 100644 include/expire.php delete mode 100644 include/gprobe.php create mode 100644 src/Worker/Expire.php create mode 100644 src/Worker/GProbe.php diff --git a/include/expire.php b/include/expire.php deleted file mode 100644 index 7a3549ada..000000000 --- a/include/expire.php +++ /dev/null @@ -1,76 +0,0 @@ - $row['id'])); - } - dba::close($r); - - logger('Delete expired items - done', LOGGER_DEBUG); - - // make this optional as it could have a performance impact on large sites - if (intval(Config::get('system', 'optimize_items'))) { - q("OPTIMIZE TABLE `item`"); - } - return; - } elseif (($argc == 2) && (intval($argv[1]) > 0)) { - $user = dba::select('user', array('uid', 'username', 'expire'), array('uid' => $argv[1]), array('limit' => 1)); - if (DBM::is_result($user)) { - logger('Expire items for user '.$user['uid'].' ('.$user['username'].') - interval: '.$user['expire'], LOGGER_DEBUG); - item_expire($user['uid'], $user['expire']); - logger('Expire items for user '.$user['uid'].' ('.$user['username'].') - done ', LOGGER_DEBUG); - } - return; - } elseif (($argc == 3) && ($argv[1] == 'hook') && is_array($a->hooks) && array_key_exists("expire", $a->hooks)) { - foreach ($a->hooks["expire"] as $hook) { - if ($hook[1] == $argv[2]) { - logger("Calling expire hook '" . $hook[1] . "'", LOGGER_DEBUG); - call_single_hook($a, $name, $hook, $data); - } - } - return; - } - - logger('expire: start'); - - Worker::add(array('priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true), - 'expire', 'delete'); - - $r = dba::p("SELECT `uid`, `username` FROM `user` WHERE `expire` != 0"); - while ($row = dba::fetch($r)) { - logger('Calling expiry for user '.$row['uid'].' ('.$row['username'].')', LOGGER_DEBUG); - Worker::add(array('priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true), - 'expire', (int)$row['uid']); - } - dba::close($r); - - logger('expire: calling hooks'); - - if (is_array($a->hooks) && array_key_exists('expire', $a->hooks)) { - foreach ($a->hooks['expire'] as $hook) { - logger("Calling expire hook for '" . $hook[1] . "'", LOGGER_DEBUG); - Worker::add(array('priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true), - 'expire', 'hook', $hook[1]); - } - } - - logger('expire: end'); - - return; -} diff --git a/include/gprobe.php b/include/gprobe.php deleted file mode 100644 index a6b46afc5..000000000 --- a/include/gprobe.php +++ /dev/null @@ -1,64 +0,0 @@ - $tmp_str, 'url' => $a->cmd); call_hooks('zrl_init', $arr); } diff --git a/src/Model/GlobalContact.php b/src/Model/GlobalContact.php index 2e16c687f..1ca814789 100644 --- a/src/Model/GlobalContact.php +++ b/src/Model/GlobalContact.php @@ -688,7 +688,7 @@ class GlobalContact if ($doprobing) { logger("Last Contact: ". $last_contact_str." - Last Failure: ".$last_failure_str." - Checking: ".$contact["url"], LOGGER_DEBUG); - Worker::add(PRIORITY_LOW, 'gprobe', $contact["url"]); + Worker::add(PRIORITY_LOW, 'GProbe', $contact["url"]); } return $gcontact_id; diff --git a/src/Worker/Cron.php b/src/Worker/Cron.php index b3f0f1f69..429aed3d9 100644 --- a/src/Worker/Cron.php +++ b/src/Worker/Cron.php @@ -79,7 +79,7 @@ Class Cron { Config::set('system', 'last_expire_day', $d2); - Worker::add(PRIORITY_LOW, 'expire'); + Worker::add(PRIORITY_LOW, 'Expire'); Worker::add(PRIORITY_MEDIUM, 'DBClean'); diff --git a/src/Worker/Expire.php b/src/Worker/Expire.php new file mode 100644 index 000000000..ac2577e77 --- /dev/null +++ b/src/Worker/Expire.php @@ -0,0 +1,85 @@ + $row['id'])); + } + dba::close($r); + + logger('Delete expired items - done', LOGGER_DEBUG); + + // make this optional as it could have a performance impact on large sites + if (intval(Config::get('system', 'optimize_items'))) { + dba::e("OPTIMIZE TABLE `item`"); + } + return; + } elseif (intval($param) > 0) { + $user = dba::select('user', array('uid', 'username', 'expire'), array('uid' => $param), array('limit' => 1)); + if (DBM::is_result($user)) { + logger('Expire items for user '.$user['uid'].' ('.$user['username'].') - interval: '.$user['expire'], LOGGER_DEBUG); + item_expire($user['uid'], $user['expire']); + logger('Expire items for user '.$user['uid'].' ('.$user['username'].') - done ', LOGGER_DEBUG); + } + return; + } elseif (!empty($hook_name) && ($param == 'hook') && is_array($a->hooks) && array_key_exists("expire", $a->hooks)) { + foreach ($a->hooks["expire"] as $hook) { + if ($hook[1] == $hook_name) { + logger("Calling expire hook '" . $hook[1] . "'", LOGGER_DEBUG); + call_single_hook($a, $name, $hook, $data); + } + } + return; + } + + logger('expire: start'); + + Worker::add(array('priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true), + 'expire', 'delete'); + + $r = dba::p("SELECT `uid`, `username` FROM `user` WHERE `expire` != 0"); + while ($row = dba::fetch($r)) { + logger('Calling expiry for user '.$row['uid'].' ('.$row['username'].')', LOGGER_DEBUG); + Worker::add(array('priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true), + 'expire', (int)$row['uid']); + } + dba::close($r); + + logger('expire: calling hooks'); + + if (is_array($a->hooks) && array_key_exists('expire', $a->hooks)) { + foreach ($a->hooks['expire'] as $hook) { + logger("Calling expire hook for '" . $hook[1] . "'", LOGGER_DEBUG); + Worker::add(array('priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true), + 'expire', 'hook', $hook[1]); + } + } + + logger('expire: end'); + + return; + } +} diff --git a/src/Worker/GProbe.php b/src/Worker/GProbe.php new file mode 100644 index 000000000..bfe277fe0 --- /dev/null +++ b/src/Worker/GProbe.php @@ -0,0 +1,65 @@ + Date: Sun, 19 Nov 2017 16:35:45 +0000 Subject: [PATCH 052/175] Queue.php is now moved as well --- include/queue.php | 191 ------------------------------------------ src/Worker/Cron.php | 2 +- src/Worker/Expire.php | 6 +- src/Worker/Queue.php | 186 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 190 insertions(+), 195 deletions(-) delete mode 100644 include/queue.php create mode 100644 src/Worker/Queue.php diff --git a/include/queue.php b/include/queue.php deleted file mode 100644 index 8a6564ce4..000000000 --- a/include/queue.php +++ /dev/null @@ -1,191 +0,0 @@ - 1) { - $queue_id = intval($argv[1]); - } else { - $queue_id = 0; - } - - $cachekey_deadguy = 'queue_run:deadguy:'; - $cachekey_server = 'queue_run:server:'; - - if (!$queue_id) { - logger('queue: start'); - - // Handling the pubsubhubbub requests - Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), 'pubsubpublish'); - - $r = q( - "SELECT `queue`.*, `contact`.`name`, `contact`.`uid` FROM `queue` - INNER JOIN `contact` ON `queue`.`cid` = `contact`.`id` - WHERE `queue`.`created` < UTC_TIMESTAMP() - INTERVAL 3 DAY" - ); - - if (DBM::is_result($r)) { - foreach ($r as $rr) { - logger('Removing expired queue item for ' . $rr['name'] . ', uid=' . $rr['uid']); - logger('Expired queue data: ' . $rr['content'], LOGGER_DATA); - } - q("DELETE FROM `queue` WHERE `created` < UTC_TIMESTAMP() - INTERVAL 3 DAY"); - } - - /* - * 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 AND `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE) OR (`last` < UTC_TIMESTAMP() - INTERVAL 1 HOUR)) ORDER BY `cid`, `created`"); - - call_hooks('queue_predeliver', $a, $r); - - if (DBM::is_result($r)) { - foreach ($r as $q_item) { - logger('Call queue for id '.$q_item['id']); - Worker::add(array('priority' => PRIORITY_LOW, 'dont_fork' => true), "queue", (int)$q_item['id']); - } - } - return; - } - - - // delivering - - require_once 'include/salmon.php'; - - $r = q( - "SELECT * FROM `queue` WHERE `id` = %d LIMIT 1", - intval($queue_id) - ); - - if (!DBM::is_result($r)) { - return; - } - - $q_item = $r[0]; - - $c = q( - "SELECT * FROM `contact` WHERE `id` = %d LIMIT 1", - intval($q_item['cid']) - ); - - if (!DBM::is_result($c)) { - remove_queue_item($q_item['id']); - return; - } - - $dead = Cache::get($cachekey_deadguy.$c[0]['notify']); - - if (!is_null($dead) && $dead) { - logger('queue: skipping known dead url: '.$c[0]['notify']); - update_queue_time($q_item['id']); - return; - } - - $server = PortableContact::detectServer($c[0]['url']); - - if ($server != "") { - $vital = Cache::get($cachekey_server.$server); - - if (is_null($vital)) { - logger("Check server ".$server." (".$c[0]["network"].")"); - - $vital = PortableContact::checkServer($server, $c[0]["network"], true); - Cache::set($cachekey_server.$server, $vital, CACHE_QUARTER_HOUR); - } - - if (!is_null($vital) && !$vital) { - logger('queue: skipping dead server: '.$server); - update_queue_time($q_item['id']); - return; - } - } - - $u = q( - "SELECT `user`.*, `user`.`pubkey` AS `upubkey`, `user`.`prvkey` AS `uprvkey` - FROM `user` WHERE `uid` = %d LIMIT 1", - intval($c[0]['uid']) - ); - if (!DBM::is_result($u)) { - remove_queue_item($q_item['id']); - return; - } - - $data = $q_item['content']; - $public = $q_item['batch']; - $contact = $c[0]; - $owner = $u[0]; - - $deliver_status = 0; - - switch ($contact['network']) { - case NETWORK_DFRN: - 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']); - Cache::set($cachekey_deadguy.$contact['notify'], true, CACHE_QUARTER_HOUR); - } else { - remove_queue_item($q_item['id']); - } - break; - case NETWORK_OSTATUS: - if ($contact['notify']) { - logger('queue: slapdelivery: item '.$q_item['id'].' for '.$contact['name'].' <'.$contact['url'].'>'); - $deliver_status = slapper($owner, $contact['notify'], $data); - - if ($deliver_status == (-1)) { - update_queue_time($q_item['id']); - Cache::set($cachekey_deadguy.$contact['notify'], true, CACHE_QUARTER_HOUR); - } 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'].' <'.$contact['url'].'>'); - $deliver_status = Diaspora::transmit($owner, $contact, $data, $public, true); - - if ($deliver_status == (-1)) { - update_queue_time($q_item['id']); - Cache::set($cachekey_deadguy.$contact['notify'], true, CACHE_QUARTER_HOUR); - } else { - remove_queue_item($q_item['id']); - } - } - break; - - default: - $params = array('owner' => $owner, 'contact' => $contact, 'queue' => $q_item, 'result' => false); - call_hooks('queue_deliver', $a, $params); - - if ($params['result']) { - remove_queue_item($q_item['id']); - } else { - update_queue_time($q_item['id']); - } - break; - } - logger('Deliver status '.(int)$deliver_status.' for item '.$q_item['id'].' to '.$contact['name'].' <'.$contact['url'].'>'); - - return; -} diff --git a/src/Worker/Cron.php b/src/Worker/Cron.php index 429aed3d9..a5ae466ce 100644 --- a/src/Worker/Cron.php +++ b/src/Worker/Cron.php @@ -39,7 +39,7 @@ Class Cron { logger('cron: start'); // run queue delivery process in the background - Worker::add(PRIORITY_NEGLIGIBLE, "queue"); + Worker::add(PRIORITY_NEGLIGIBLE, "Queue"); // run the process to discover global contacts in the background Worker::add(PRIORITY_LOW, "DiscoverPoCo"); diff --git a/src/Worker/Expire.php b/src/Worker/Expire.php index ac2577e77..11f12df03 100644 --- a/src/Worker/Expire.php +++ b/src/Worker/Expire.php @@ -58,13 +58,13 @@ class Expire { logger('expire: start'); Worker::add(array('priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true), - 'expire', 'delete'); + 'Expire', 'delete'); $r = dba::p("SELECT `uid`, `username` FROM `user` WHERE `expire` != 0"); while ($row = dba::fetch($r)) { logger('Calling expiry for user '.$row['uid'].' ('.$row['username'].')', LOGGER_DEBUG); Worker::add(array('priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true), - 'expire', (int)$row['uid']); + 'Expire', (int)$row['uid']); } dba::close($r); @@ -74,7 +74,7 @@ class Expire { foreach ($a->hooks['expire'] as $hook) { logger("Calling expire hook for '" . $hook[1] . "'", LOGGER_DEBUG); Worker::add(array('priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true), - 'expire', 'hook', $hook[1]); + 'Expire', 'hook', $hook[1]); } } diff --git a/src/Worker/Queue.php b/src/Worker/Queue.php new file mode 100644 index 000000000..8c7a6839a --- /dev/null +++ b/src/Worker/Queue.php @@ -0,0 +1,186 @@ + PRIORITY_HIGH, 'dont_fork' => true), 'pubsubpublish'); + + $r = q( + "SELECT `queue`.*, `contact`.`name`, `contact`.`uid` FROM `queue` + INNER JOIN `contact` ON `queue`.`cid` = `contact`.`id` + WHERE `queue`.`created` < UTC_TIMESTAMP() - INTERVAL 3 DAY" + ); + + if (DBM::is_result($r)) { + foreach ($r as $rr) { + logger('Removing expired queue item for ' . $rr['name'] . ', uid=' . $rr['uid']); + logger('Expired queue data: ' . $rr['content'], LOGGER_DATA); + } + q("DELETE FROM `queue` WHERE `created` < UTC_TIMESTAMP() - INTERVAL 3 DAY"); + } + + /* + * 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 AND `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE) OR (`last` < UTC_TIMESTAMP() - INTERVAL 1 HOUR)) ORDER BY `cid`, `created`"); + + call_hooks('queue_predeliver', $a, $r); + + if (DBM::is_result($r)) { + foreach ($r as $q_item) { + logger('Call queue for id '.$q_item['id']); + Worker::add(array('priority' => PRIORITY_LOW, 'dont_fork' => true), "Queue", (int)$q_item['id']); + } + } + return; + } + + + // delivering + + $r = q( + "SELECT * FROM `queue` WHERE `id` = %d LIMIT 1", + intval($queue_id) + ); + + if (!DBM::is_result($r)) { + return; + } + + $q_item = $r[0]; + + $c = q( + "SELECT * FROM `contact` WHERE `id` = %d LIMIT 1", + intval($q_item['cid']) + ); + + if (!DBM::is_result($c)) { + remove_queue_item($q_item['id']); + return; + } + + $dead = Cache::get($cachekey_deadguy.$c[0]['notify']); + + if (!is_null($dead) && $dead) { + logger('queue: skipping known dead url: '.$c[0]['notify']); + update_queue_time($q_item['id']); + return; + } + + $server = PortableContact::detectServer($c[0]['url']); + + if ($server != "") { + $vital = Cache::get($cachekey_server.$server); + + if (is_null($vital)) { + logger("Check server ".$server." (".$c[0]["network"].")"); + + $vital = PortableContact::checkServer($server, $c[0]["network"], true); + Cache::set($cachekey_server.$server, $vital, CACHE_QUARTER_HOUR); + } + + if (!is_null($vital) && !$vital) { + logger('queue: skipping dead server: '.$server); + update_queue_time($q_item['id']); + return; + } + } + + $u = q( + "SELECT `user`.*, `user`.`pubkey` AS `upubkey`, `user`.`prvkey` AS `uprvkey` + FROM `user` WHERE `uid` = %d LIMIT 1", + intval($c[0]['uid']) + ); + if (!DBM::is_result($u)) { + remove_queue_item($q_item['id']); + return; + } + + $data = $q_item['content']; + $public = $q_item['batch']; + $contact = $c[0]; + $owner = $u[0]; + + $deliver_status = 0; + + switch ($contact['network']) { + case NETWORK_DFRN: + 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']); + Cache::set($cachekey_deadguy.$contact['notify'], true, CACHE_QUARTER_HOUR); + } else { + remove_queue_item($q_item['id']); + } + break; + case NETWORK_OSTATUS: + if ($contact['notify']) { + logger('queue: slapdelivery: item '.$q_item['id'].' for '.$contact['name'].' <'.$contact['url'].'>'); + $deliver_status = slapper($owner, $contact['notify'], $data); + + if ($deliver_status == (-1)) { + update_queue_time($q_item['id']); + Cache::set($cachekey_deadguy.$contact['notify'], true, CACHE_QUARTER_HOUR); + } 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'].' <'.$contact['url'].'>'); + $deliver_status = Diaspora::transmit($owner, $contact, $data, $public, true); + + if ($deliver_status == (-1)) { + update_queue_time($q_item['id']); + Cache::set($cachekey_deadguy.$contact['notify'], true, CACHE_QUARTER_HOUR); + } else { + remove_queue_item($q_item['id']); + } + } + break; + + default: + $params = array('owner' => $owner, 'contact' => $contact, 'queue' => $q_item, 'result' => false); + call_hooks('queue_deliver', $a, $params); + + if ($params['result']) { + remove_queue_item($q_item['id']); + } else { + update_queue_time($q_item['id']); + } + break; + } + logger('Deliver status '.(int)$deliver_status.' for item '.$q_item['id'].' to '.$contact['name'].' <'.$contact['url'].'>'); + + return; + } +} From 2de457489ff1087b217d1c3e18350d4576a2a376 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 19 Nov 2017 16:59:37 +0000 Subject: [PATCH 053/175] "CreateShadowentry" and "ProfileUpdate" now moved as well --- include/api.php | 2 +- include/create_shadowentry.php | 19 ------------------- include/profile_update.php | 12 ------------ mod/item.php | 2 +- mod/profile_photo.php | 2 +- mod/profiles.php | 2 +- mod/settings.php | 2 +- src/Core/Worker.php | 2 +- src/Worker/CreateShadowentry.php | 21 +++++++++++++++++++++ src/Worker/ProfileUpdate.php | 19 +++++++++++++++++++ 10 files changed, 46 insertions(+), 37 deletions(-) delete mode 100644 include/create_shadowentry.php delete mode 100644 include/profile_update.php create mode 100644 src/Worker/CreateShadowentry.php create mode 100644 src/Worker/ProfileUpdate.php diff --git a/include/api.php b/include/api.php index 69569bdc1..d25aeb8c5 100644 --- a/include/api.php +++ b/include/api.php @@ -3873,7 +3873,7 @@ function api_account_update_profile_image($type) Worker::add(PRIORITY_LOW, "Directory", $url); } - Worker::add(PRIORITY_LOW, 'profile_update', api_user()); + Worker::add(PRIORITY_LOW, 'ProfileUpdate', api_user()); // output for client if ($data) { diff --git a/include/create_shadowentry.php b/include/create_shadowentry.php deleted file mode 100644 index 29222de5e..000000000 --- a/include/create_shadowentry.php +++ /dev/null @@ -1,19 +0,0 @@ - PRIORITY_HIGH, 'dont_fork' => true), "create_shadowentry", $post_id); + Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), "CreateShadowentry", $post_id); // Call the background process that is delivering the item to the receivers Worker::add(PRIORITY_HIGH, "notifier", $notify_type, $post_id); diff --git a/mod/profile_photo.php b/mod/profile_photo.php index 3ef0118da..e80b9ee84 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -135,7 +135,7 @@ function profile_photo_post(App $a) { Worker::add(PRIORITY_LOW, "Directory", $url); } - Worker::add(PRIORITY_LOW, 'profile_update', local_user()); + Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user()); } else { notice( t('Unable to process image') . EOL); } diff --git a/mod/profiles.php b/mod/profiles.php index 545fb2fc7..5a5a649bc 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -506,7 +506,7 @@ function profiles_post(App $a) { Worker::add(PRIORITY_LOW, "Directory", $url); } - Worker::add(PRIORITY_LOW, 'profile_update', local_user()); + Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user()); // Update the global contact for the user GlobalContact::updateForUser(local_user()); diff --git a/mod/settings.php b/mod/settings.php index bc6425171..a3ba2ecb9 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -651,7 +651,7 @@ function settings_post(App $a) { } } - Worker::add(PRIORITY_LOW, 'profile_update', local_user()); + Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user()); // Update the global contact for the user GlobalContact::updateForUser(local_user()); diff --git a/src/Core/Worker.php b/src/Core/Worker.php index 276179131..88b5bdea8 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -923,7 +923,7 @@ class Worker { * * next args are passed as $cmd command line * or: Worker::add(PRIORITY_HIGH, "notifier", "drop", $drop_id); - * or: Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), "create_shadowentry", $post_id); + * or: Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), "CreateShadowentry", $post_id); * * @note $cmd and string args are surrounded with "" * diff --git a/src/Worker/CreateShadowentry.php b/src/Worker/CreateShadowentry.php new file mode 100644 index 000000000..cc0542058 --- /dev/null +++ b/src/Worker/CreateShadowentry.php @@ -0,0 +1,21 @@ + Date: Sun, 19 Nov 2017 17:36:20 +0000 Subject: [PATCH 054/175] Now PubSubPublish moved as well --- include/notifier.php | 2 +- include/pubsubpublish.php | 94 ---------------------------------- src/Worker/PubSubPublish.php | 97 ++++++++++++++++++++++++++++++++++++ src/Worker/Queue.php | 2 +- 4 files changed, 99 insertions(+), 96 deletions(-) delete mode 100644 include/pubsubpublish.php create mode 100644 src/Worker/PubSubPublish.php diff --git a/include/notifier.php b/include/notifier.php index 55f2986d2..58926b935 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -602,7 +602,7 @@ function notifier_run(&$argv, &$argc){ // Handling the pubsubhubbub requests Worker::add(array('priority' => PRIORITY_HIGH, 'created' => $a->queue['created'], 'dont_fork' => true), - 'pubsubpublish'); + 'PubSubPublish'); } logger('notifier: calling hooks', LOGGER_DEBUG); diff --git a/include/pubsubpublish.php b/include/pubsubpublish.php deleted file mode 100644 index 4a6c3b49e..000000000 --- a/include/pubsubpublish.php +++ /dev/null @@ -1,94 +0,0 @@ - 1) { - $pubsubpublish_id = intval($argv[1]); - } else { - // We'll push to each subscriber that has push > 0, - // i.e. there has been an update (set in notifier.php). - $r = q("SELECT `id`, `callback_url` FROM `push_subscriber` WHERE `push` > 0 ORDER BY `last_update` DESC"); - - foreach ($r as $rr) { - logger("Publish feed to ".$rr["callback_url"], LOGGER_DEBUG); - Worker::add(array('priority' => PRIORITY_HIGH, 'created' => $a->queue['created'], 'dont_fork' => true), - 'pubsubpublish', (int)$rr["id"]); - } - } - - handle_pubsubhubbub($pubsubpublish_id); - - return; -} - -function handle_pubsubhubbub($id) { - global $a; - - $r = q("SELECT * FROM `push_subscriber` WHERE `id` = %d", intval($id)); - if (!DBM::is_result($r)) { - return; - } - - $rr = $r[0]; - - /// @todo Check server status with PortableContact::checkServer() - // Before this can be done we need a way to safely detect the server url. - - logger("Generate feed of user ".$rr['nickname']." to ".$rr['callback_url']." - last updated ".$rr['last_update'], LOGGER_DEBUG); - - $last_update = $rr['last_update']; - $params = OStatus::feed($a, $rr['nickname'], $last_update); - - if (!$params) { - return; - } - - $hmac_sig = hash_hmac("sha1", $params, $rr['secret']); - - $headers = array("Content-type: application/atom+xml", - sprintf("Link: <%s>;rel=hub,<%s>;rel=self", - System::baseUrl().'/pubsubhubbub/'.$rr['nickname'], - $rr['topic']), - "X-Hub-Signature: sha1=".$hmac_sig); - - logger('POST '.print_r($headers, true)."\n".$params, LOGGER_DEBUG); - - post_url($rr['callback_url'], $params, $headers); - $ret = $a->get_curl_code(); - - if ($ret >= 200 && $ret <= 299) { - logger('successfully pushed to '.$rr['callback_url']); - - // set last_update to the "created" date of the last item, and reset push=0 - q("UPDATE `push_subscriber` SET `push` = 0, last_update = '%s' WHERE id = %d", - dbesc($last_update), - intval($rr['id'])); - - } else { - logger('error when pushing to '.$rr['callback_url'].' HTTP: '.$ret); - - // we use the push variable also as a counter, if we failed we - // increment this until some upper limit where we give up - $new_push = intval($rr['push']) + 1; - - if ($new_push > 30) // OK, let's give up - $new_push = 0; - - q("UPDATE `push_subscriber` SET `push` = %d WHERE id = %d", - $new_push, - intval($rr['id'])); - } -} diff --git a/src/Worker/PubSubPublish.php b/src/Worker/PubSubPublish.php new file mode 100644 index 000000000..e2ecedbdf --- /dev/null +++ b/src/Worker/PubSubPublish.php @@ -0,0 +1,97 @@ + 0, + // i.e. there has been an update (set in notifier.php). + $r = q("SELECT `id`, `callback_url` FROM `push_subscriber` WHERE `push` > 0 ORDER BY `last_update` DESC"); + + foreach ($r as $rr) { + logger("Publish feed to ".$rr["callback_url"], LOGGER_DEBUG); + Worker::add(array('priority' => PRIORITY_HIGH, 'created' => $a->queue['created'], 'dont_fork' => true), + 'PubSubPublish', (int)$rr["id"]); + } + } + + self::publish($pubsubpublish_id); + + return; + } + + private static function publish($id) { + global $a; + + $r = q("SELECT * FROM `push_subscriber` WHERE `id` = %d", intval($id)); + if (!DBM::is_result($r)) { + return; + } + + $rr = $r[0]; + + /// @todo Check server status with PortableContact::checkServer() + // Before this can be done we need a way to safely detect the server url. + + logger("Generate feed of user ".$rr['nickname']." to ".$rr['callback_url']." - last updated ".$rr['last_update'], LOGGER_DEBUG); + + $last_update = $rr['last_update']; + $params = OStatus::feed($a, $rr['nickname'], $last_update); + + if (!$params) { + return; + } + + $hmac_sig = hash_hmac("sha1", $params, $rr['secret']); + + $headers = array("Content-type: application/atom+xml", + sprintf("Link: <%s>;rel=hub,<%s>;rel=self", + System::baseUrl().'/pubsubhubbub/'.$rr['nickname'], + $rr['topic']), + "X-Hub-Signature: sha1=".$hmac_sig); + + logger('POST '.print_r($headers, true)."\n".$params, LOGGER_DEBUG); + + post_url($rr['callback_url'], $params, $headers); + $ret = $a->get_curl_code(); + + if ($ret >= 200 && $ret <= 299) { + logger('successfully pushed to '.$rr['callback_url']); + + // set last_update to the "created" date of the last item, and reset push=0 + q("UPDATE `push_subscriber` SET `push` = 0, last_update = '%s' WHERE id = %d", + dbesc($last_update), + intval($rr['id'])); + + } else { + logger('error when pushing to '.$rr['callback_url'].' HTTP: '.$ret); + + // we use the push variable also as a counter, if we failed we + // increment this until some upper limit where we give up + $new_push = intval($rr['push']) + 1; + + if ($new_push > 30) // OK, let's give up + $new_push = 0; + + q("UPDATE `push_subscriber` SET `push` = %d WHERE id = %d", + $new_push, + intval($rr['id'])); + } + } +} diff --git a/src/Worker/Queue.php b/src/Worker/Queue.php index 8c7a6839a..530df0a7b 100644 --- a/src/Worker/Queue.php +++ b/src/Worker/Queue.php @@ -28,7 +28,7 @@ class Queue { logger('queue: start'); // Handling the pubsubhubbub requests - Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), 'pubsubpublish'); + Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), 'PubSubPublish'); $r = q( "SELECT `queue`.*, `contact`.`name`, `contact`.`uid` FROM `queue` From 8cd21269ff7b0ca48537b59496a85b06049453aa Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 19 Nov 2017 18:59:55 +0000 Subject: [PATCH 055/175] The last of the big workers moved ... delivery and notifier --- include/Contact.php | 2 +- include/items.php | 10 +- include/like.php | 4 +- include/message.php | 2 +- include/notifier.php | 617 ------------------ include/uimport.php | 2 +- mod/admin.php | 2 +- mod/dfrn_confirm.php | 4 +- mod/events.php | 2 +- mod/fsuggest.php | 2 +- mod/item.php | 4 +- mod/mood.php | 4 +- mod/photos.php | 8 +- mod/poke.php | 4 +- mod/profiles.php | 2 +- mod/settings.php | 2 +- mod/tagger.php | 2 +- mod/videos.php | 2 +- src/Core/Worker.php | 2 +- src/Protocol/DFRN.php | 6 +- src/Protocol/Diaspora.php | 8 +- .../delivery.php => src/Worker/Delivery.php | 68 +- src/Worker/Notifier.php | 606 +++++++++++++++++ 23 files changed, 672 insertions(+), 693 deletions(-) delete mode 100644 include/notifier.php rename include/delivery.php => src/Worker/Delivery.php (94%) create mode 100644 src/Worker/Notifier.php diff --git a/include/Contact.php b/include/Contact.php index 636bbc4a7..cd1696af5 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -34,7 +34,7 @@ function user_remove($uid) { // The user and related data will be deleted in "cron_expire_and_remove_users" (cronjobs.php) q("UPDATE `user` SET `account_removed` = 1, `account_expires_on` = UTC_TIMESTAMP() WHERE `uid` = %d", intval($uid)); - Worker::add(PRIORITY_HIGH, "notifier", "removeme", $uid); + Worker::add(PRIORITY_HIGH, "Notifier", "removeme", $uid); // Send an update to the directory Worker::add(PRIORITY_LOW, "Directory", $r['url']); diff --git a/include/items.php b/include/items.php index 64ee3ffbf..ed2204f60 100644 --- a/include/items.php +++ b/include/items.php @@ -1138,7 +1138,7 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f check_item_notification($current_post, $uid); if ($notify) { - Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), "notifier", $notify_type, $current_post); + Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), "Notifier", $notify_type, $current_post); } return $current_post; @@ -1421,7 +1421,7 @@ function tag_deliver($uid, $item_id) { ); update_thread($item_id); - Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), 'notifier', 'tgroup', $item_id); + Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), 'Notifier', 'tgroup', $item_id); } @@ -2055,7 +2055,7 @@ function item_expire($uid, $days, $network = "", $force = false) { drop_item($item['id'], false); } - Worker::add(array('priority' => PRIORITY_LOW, 'dont_fork' => true), "notifier", "expire", $uid); + Worker::add(array('priority' => PRIORITY_LOW, 'dont_fork' => true), "Notifier", "expire", $uid); } /// @TODO type-hint is array @@ -2077,7 +2077,7 @@ function drop_items($items) { // multiple threads may have been deleted, send an expire notification if ($uid) { - Worker::add(array('priority' => PRIORITY_LOW, 'dont_fork' => true), "notifier", "expire", $uid); + Worker::add(array('priority' => PRIORITY_LOW, 'dont_fork' => true), "Notifier", "expire", $uid); } } @@ -2269,7 +2269,7 @@ function drop_item($id, $interactive = true) { $drop_id = intval($item['id']); $priority = ($interactive ? PRIORITY_HIGH : PRIORITY_LOW); - Worker::add(array('priority' => $priority, 'dont_fork' => true), "notifier", "drop", $drop_id); + Worker::add(array('priority' => $priority, 'dont_fork' => true), "Notifier", "drop", $drop_id); if (! $interactive) { return $owner; diff --git a/include/like.php b/include/like.php index eee89168a..5e05121f6 100644 --- a/include/like.php +++ b/include/like.php @@ -167,7 +167,7 @@ function do_like($item_id, $verb) { ); $like_item_id = $like_item['id']; - Worker::add(PRIORITY_HIGH, "notifier", "like", $like_item_id); + Worker::add(PRIORITY_HIGH, "Notifier", "like", $like_item_id); if (!$event_verb_flag || $like_item['verb'] == $activity) { return true; @@ -254,7 +254,7 @@ EOT; call_hooks('post_local_end', $new_item); - Worker::add(PRIORITY_HIGH, "notifier", "like", $new_item_id); + Worker::add(PRIORITY_HIGH, "Notifier", "like", $new_item_id); return true; } diff --git a/include/message.php b/include/message.php index dcc1fbc12..e49647b6e 100644 --- a/include/message.php +++ b/include/message.php @@ -145,7 +145,7 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){ } if ($post_id) { - Worker::add(PRIORITY_HIGH, "notifier", "mail", $post_id); + Worker::add(PRIORITY_HIGH, "Notifier", "mail", $post_id); return intval($post_id); } else { return -3; diff --git a/include/notifier.php b/include/notifier.php deleted file mode 100644 index 58926b935..000000000 --- a/include/notifier.php +++ /dev/null @@ -1,617 +0,0 @@ - UTC_TIMESTAMP() - INTERVAL 10 MINUTE", - intval($item_id) - ); - $uid = $item_id; - $item_id = 0; - if (! count($items)) { - return; - } - } elseif ($cmd === 'suggest') { - $normal_mode = false; - $fsuggest = true; - - $suggest = q("SELECT * FROM `fsuggest` WHERE `id` = %d LIMIT 1", - intval($item_id) - ); - if (! count($suggest)) { - return; - } - $uid = $suggest[0]['uid']; - $recipients[] = $suggest[0]['cid']; - $item = $suggest[0]; - } elseif ($cmd === 'removeme') { - $r = q("SELECT `contact`.*, `user`.`pubkey` AS `upubkey`, `user`.`prvkey` AS `uprvkey`, - `user`.`timezone`, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`, - `user`.`page-flags`, `user`.`prvnets`, `user`.`account-type`, `user`.`guid` - FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid` - WHERE `contact`.`uid` = %d AND `contact`.`self` LIMIT 1", - intval($item_id)); - if (!$r) - return; - - $user = $r[0]; - - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` LIMIT 1", intval($item_id)); - if (!$r) - return; - - $self = $r[0]; - - $r = q("SELECT * FROM `contact` WHERE NOT `self` AND `uid` = %d", intval($item_id)); - if (!$r) { - return; - } - require_once 'include/Contact.php'; - foreach ($r as $contact) { - terminate_friendship($user, $self, $contact); - } - return; - } elseif ($cmd === 'relocate') { - $normal_mode = false; - $relocate = true; - $uid = $item_id; - - $recipients_relocate = q("SELECT * FROM `contact` WHERE `uid` = %d AND NOT `self` AND `network` IN ('%s', '%s')", - intval($uid), NETWORK_DFRN, NETWORK_DIASPORA); - } else { - // find ancestors - $r = q("SELECT * FROM `item` WHERE `id` = %d AND visible = 1 AND moderated = 0 LIMIT 1", - intval($item_id) - ); - - if ((! DBM::is_result($r)) || (! intval($r[0]['parent']))) { - return; - } - - $target_item = $r[0]; - $parent_id = intval($r[0]['parent']); - $uid = $r[0]['uid']; - $updated = $r[0]['edited']; - - $items = q("SELECT `item`.*, `sign`.`signed_text`,`sign`.`signature`,`sign`.`signer` - FROM `item` LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id` WHERE `parent` = %d AND visible = 1 AND moderated = 0 ORDER BY `id` ASC", - intval($parent_id) - ); - - if (! count($items)) { - return; - } - - // avoid race condition with deleting entries - - if ($items[0]['deleted']) { - foreach ($items as $item) { - $item['deleted'] = 1; - } - } - - if ((count($items) == 1) && ($items[0]['id'] === $target_item['id']) && ($items[0]['uri'] === $items[0]['parent-uri'])) { - logger('notifier: top level post'); - $top_level = true; - } - - } - - $r = q("SELECT `contact`.*, `user`.`pubkey` AS `upubkey`, `user`.`prvkey` AS `uprvkey`, - `user`.`timezone`, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`, - `user`.`page-flags`, `user`.`prvnets`, `user`.`account-type` - FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid` - WHERE `contact`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1", - intval($uid) - ); - - if (! DBM::is_result($r)) { - return; - } - - $owner = $r[0]; - - $walltowall = ((($top_level) && ($owner['id'] != $items[0]['contact-id'])) ? true : false); - - // Should the post be transmitted to Diaspora? - $diaspora_delivery = true; - - // If this is a public conversation, notify the feed hub - $public_message = true; - - // Do a PuSH - $push_notify = false; - - // Deliver directly to a forum, don't PuSH - $direct_forum_delivery = false; - - // fill this in with a single salmon slap if applicable - $slap = ''; - - if (! ($mail || $fsuggest || $relocate)) { - - $slap = OStatus::salmon($target_item, $owner); - - require_once 'include/group.php'; - - $parent = $items[0]; - - $thr_parent = q("SELECT `network`, `author-link`, `owner-link` FROM `item` WHERE `uri` = '%s' AND `uid` = %d", - dbesc($target_item["thr-parent"]), intval($target_item["uid"])); - - logger('GUID: '.$target_item["guid"].': Parent is '.$parent['network'].'. Thread parent is '.$thr_parent[0]['network'], LOGGER_DEBUG); - - // This is IMPORTANT!!!! - - // We will only send a "notify owner to relay" or followup message if the referenced post - // originated on our system by virtue of having our hostname somewhere - // in the URI, AND it was a comment (not top_level) AND the parent originated elsewhere. - - // if $parent['wall'] == 1 we will already have the parent message in our array - // and we will relay the whole lot. - - // expire sends an entire group of expire messages and cannot be forwarded. - // However the conversation owner will be a part of the conversation and will - // be notified during this run. - // Other DFRN conversation members will be alerted during polled updates. - - - - // Diaspora members currently are not notified of expirations, and other networks have - // either limited or no ability to process deletions. We should at least fix Diaspora - // by stringing togther an array of retractions and sending them onward. - - - $localhost = str_replace('www.','',$a->get_hostname()); - if (strpos($localhost,':')) { - $localhost = substr($localhost,0,strpos($localhost,':')); - } - /** - * - * Be VERY CAREFUL if you make any changes to the following several lines. Seemingly innocuous changes - * have been known to cause runaway conditions which affected several servers, along with - * permissions issues. - * - */ - - $relay_to_owner = false; - - if (!$top_level && ($parent['wall'] == 0) && !$expire && (stristr($target_item['uri'],$localhost))) { - $relay_to_owner = true; - } - - - if (($cmd === 'uplink') && (intval($parent['forum_mode']) == 1) && !$top_level) { - $relay_to_owner = true; - } - - // until the 'origin' flag has been in use for several months - // we will just use it as a fallback test - // later we will be able to use it as the primary test of whether or not to relay. - - if (! $target_item['origin']) { - $relay_to_owner = false; - } - if ($parent['origin']) { - $relay_to_owner = false; - } - - // Special treatment for forum posts - if (($target_item['author-link'] != $target_item['owner-link']) && - ($owner['id'] != $target_item['contact-id']) && - ($target_item['uri'] === $target_item['parent-uri'])) { - - $fields = array('forum', 'prv'); - $condition = array('id' => $target_item['contact-id']); - $contact = dba::select('contact', $fields, $condition, array('limit' => 1)); - if (!DBM::is_result($contact)) { - // Should never happen - return false; - } - - // Is the post from a forum? - if ($contact['forum'] || $contact['prv']) { - $relay_to_owner = true; - $direct_forum_delivery = true; - } - } - if ($relay_to_owner) { - logger('notifier: followup '.$target_item["guid"], LOGGER_DEBUG); - // local followup to remote post - $followup = true; - $public_message = false; // not public - $conversant_str = dbesc($parent['contact-id']); - $recipients = array($parent['contact-id']); - $recipients_followup = array($parent['contact-id']); - - //if (!$target_item['private'] && $target_item['wall'] && - if (!$target_item['private'] && - (strlen($target_item['allow_cid'].$target_item['allow_gid']. - $target_item['deny_cid'].$target_item['deny_gid']) == 0)) - $push_notify = true; - - if (($thr_parent && ($thr_parent[0]['network'] == NETWORK_OSTATUS)) || ($parent['network'] == NETWORK_OSTATUS)) { - - $push_notify = true; - - if ($parent["network"] == NETWORK_OSTATUS) { - // Distribute the message to the DFRN contacts as if this wasn't a followup since OStatus can't relay comments - // Currently it is work at progress - $r = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `network` = '%s' AND NOT `blocked` AND NOT `pending` AND NOT `archive`", - intval($uid), - dbesc(NETWORK_DFRN) - ); - if (DBM::is_result($r)) { - foreach ($r as $rr) { - $recipients_followup[] = $rr['id']; - } - } - } - } - - if ($direct_forum_delivery) { - $push_notify = false; - } - - logger("Notify ".$target_item["guid"]." via PuSH: ".($push_notify?"Yes":"No"), LOGGER_DEBUG); - } else { - $followup = false; - - logger('Distributing directly '.$target_item["guid"], LOGGER_DEBUG); - - // don't send deletions onward for other people's stuff - - if ($target_item['deleted'] && (! intval($target_item['wall']))) { - logger('notifier: ignoring delete notification for non-wall item'); - return; - } - - if ((strlen($parent['allow_cid'])) - || (strlen($parent['allow_gid'])) - || (strlen($parent['deny_cid'])) - || (strlen($parent['deny_gid']))) { - $public_message = false; // private recipients, not public - } - - $allow_people = expand_acl($parent['allow_cid']); - $allow_groups = expand_groups(expand_acl($parent['allow_gid']),true); - $deny_people = expand_acl($parent['deny_cid']); - $deny_groups = expand_groups(expand_acl($parent['deny_gid'])); - - // if our parent is a public forum (forum_mode == 1), uplink to the origional author causing - // a delivery fork. private groups (forum_mode == 2) do not uplink - - if ((intval($parent['forum_mode']) == 1) && (! $top_level) && ($cmd !== 'uplink')) { - Worker::add($a->queue['priority'], 'notifier', 'uplink', $item_id); - } - - $conversants = array(); - - foreach ($items as $item) { - $recipients[] = $item['contact-id']; - $conversants[] = $item['contact-id']; - // pull out additional tagged people to notify (if public message) - if ($public_message && strlen($item['inform'])) { - $people = explode(',',$item['inform']); - foreach ($people as $person) { - if (substr($person,0,4) === 'cid:') { - $recipients[] = intval(substr($person,4)); - $conversants[] = intval(substr($person,4)); - } else { - $url_recipients[] = substr($person,4); - } - } - } - } - - if (count($url_recipients)) - logger('notifier: '.$target_item["guid"].' url_recipients ' . print_r($url_recipients,true)); - - $conversants = array_unique($conversants); - - - $recipients = array_unique(array_merge($recipients,$allow_people,$allow_groups)); - $deny = array_unique(array_merge($deny_people,$deny_groups)); - $recipients = array_diff($recipients,$deny); - - $conversant_str = dbesc(implode(', ',$conversants)); - } - - // If the thread parent is OStatus then do some magic to distribute the messages. - // We have not only to look at the parent, since it could be a Friendica thread. - if (($thr_parent && ($thr_parent[0]['network'] == NETWORK_OSTATUS)) || ($parent['network'] == NETWORK_OSTATUS)) { - - $diaspora_delivery = false; - - logger('Some parent is OStatus for '.$target_item["guid"]." - Author: ".$thr_parent[0]['author-link']." - Owner: ".$thr_parent[0]['owner-link'], LOGGER_DEBUG); - - // Send a salmon to the parent author - $r = q("SELECT `url`, `notify` FROM `contact` WHERE `nurl`='%s' AND `uid` IN (0, %d) AND `notify` != ''", - dbesc(normalise_link($thr_parent[0]['author-link'])), - intval($uid)); - if (DBM::is_result($r)) { - $probed_contact = $r[0]; - } else { - $probed_contact = Probe::uri($thr_parent[0]['author-link']); - } - - if ($probed_contact["notify"] != "") { - logger('Notify parent author '.$probed_contact["url"].': '.$probed_contact["notify"]); - $url_recipients[$probed_contact["notify"]] = $probed_contact["notify"]; - } - - // Send a salmon to the parent owner - $r = q("SELECT `url`, `notify` FROM `contact` WHERE `nurl`='%s' AND `uid` IN (0, %d) AND `notify` != ''", - dbesc(normalise_link($thr_parent[0]['owner-link'])), - intval($uid)); - if (DBM::is_result($r)) { - $probed_contact = $r[0]; - } else { - $probed_contact = Probe::uri($thr_parent[0]['owner-link']); - } - - if ($probed_contact["notify"] != "") { - logger('Notify parent owner '.$probed_contact["url"].': '.$probed_contact["notify"]); - $url_recipients[$probed_contact["notify"]] = $probed_contact["notify"]; - } - - // Send a salmon notification to every person we mentioned in the post - $arr = explode(',',$target_item['tag']); - foreach ($arr as $x) { - //logger('Checking tag '.$x, LOGGER_DEBUG); - $matches = null; - if (preg_match('/@\[url=([^\]]*)\]/',$x,$matches)) { - $probed_contact = Probe::uri($matches[1]); - if ($probed_contact["notify"] != "") { - logger('Notify mentioned user '.$probed_contact["url"].': '.$probed_contact["notify"]); - $url_recipients[$probed_contact["notify"]] = $probed_contact["notify"]; - } - } - } - - // It only makes sense to distribute answers to OStatus messages to Friendica and OStatus - but not Diaspora - $sql_extra = " AND `network` IN ('".NETWORK_OSTATUS."', '".NETWORK_DFRN."')"; - } else { - $sql_extra = " AND `network` IN ('".NETWORK_OSTATUS."', '".NETWORK_DFRN."', '".NETWORK_DIASPORA."', '".NETWORK_MAIL."', '".NETWORK_MAIL2."')"; - } - } else { - $public_message = false; - } - - // If this is a public message and pubmail is set on the parent, include all your email contacts - - $mail_disabled = ((function_exists('imap_open') && (!Config::get('system','imap_disabled'))) ? 0 : 1); - - if (! $mail_disabled) { - if ((! strlen($target_item['allow_cid'])) && (! strlen($target_item['allow_gid'])) - && (! strlen($target_item['deny_cid'])) && (! strlen($target_item['deny_gid'])) - && (intval($target_item['pubmail']))) { - $r = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `network` = '%s'", - intval($uid), - dbesc(NETWORK_MAIL) - ); - if (DBM::is_result($r)) { - foreach ($r as $rr) { - $recipients[] = $rr['id']; - } - } - } - } - - if ($followup) { - $recip_str = implode(', ', $recipients_followup); - } else { - $recip_str = implode(', ', $recipients); - } - if ($relocate) { - $r = $recipients_relocate; - } else { - $r = q("SELECT `id`, `url`, `network`, `self` FROM `contact` - WHERE `id` IN (%s) AND NOT `blocked` AND NOT `pending` AND NOT `archive`".$sql_extra, - dbesc($recip_str) - ); - } - - // delivery loop - - if (DBM::is_result($r)) { - foreach ($r as $contact) { - if ($contact['self']) { - continue; - } - logger("Deliver ".$target_item["guid"]." to ".$contact['url']." via network ".$contact['network'], LOGGER_DEBUG); - - Worker::add(array('priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true), - 'delivery', $cmd, $item_id, (int)$contact['id']); - } - } - - // send salmon slaps to mentioned remote tags (@foo@example.com) in OStatus posts - // They are especially used for notifications to OStatus users that don't follow us. - - if ($slap && count($url_recipients) && ($public_message || $push_notify) && $normal_mode) { - if (!Config::get('system','dfrn_only')) { - foreach ($url_recipients as $url) { - if ($url) { - logger('notifier: urldelivery: ' . $url); - $deliver_status = slapper($owner,$url,$slap); - /// @TODO Redeliver/queue these items on failure, though there is no contact record - } - } - } - } - - - if ($public_message) { - - $r0 = array(); - $r1 = array(); - - if ($diaspora_delivery) { - if (!$followup) { - $r0 = Diaspora::relay_list(); - } - - $r1 = q("SELECT `batch`, ANY_VALUE(`id`) AS `id`, ANY_VALUE(`name`) AS `name`, ANY_VALUE(`network`) AS `network` - FROM `contact` WHERE `network` = '%s' AND `batch` != '' - AND `uid` = %d AND `rel` != %d AND NOT `blocked` AND NOT `pending` AND NOT `archive` GROUP BY `batch`", - dbesc(NETWORK_DIASPORA), - intval($owner['uid']), - intval(CONTACT_IS_SHARING) - ); - } - - $r2 = q("SELECT `id`, `name`,`network` FROM `contact` - WHERE `network` in ('%s', '%s') AND `uid` = %d AND NOT `blocked` AND NOT `pending` AND NOT `archive` AND `rel` != %d", - dbesc(NETWORK_DFRN), - dbesc(NETWORK_MAIL2), - intval($owner['uid']), - intval(CONTACT_IS_SHARING) - ); - - $r = array_merge($r2,$r1,$r0); - - if (DBM::is_result($r)) { - logger('pubdeliver '.$target_item["guid"].': '.print_r($r,true), LOGGER_DEBUG); - - foreach ($r as $rr) { - - // except for Diaspora batch jobs - // Don't deliver to folks who have already been delivered to - - if (($rr['network'] !== NETWORK_DIASPORA) && (in_array($rr['id'],$conversants))) { - logger('notifier: already delivered id=' . $rr['id']); - continue; - } - - if ((! $mail) && (! $fsuggest) && (! $followup)) { - logger('notifier: delivery agent: '.$rr['name'].' '.$rr['id'].' '.$rr['network'].' '.$target_item["guid"]); - Worker::add(array('priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true), - 'delivery', $cmd, $item_id, (int)$rr['id']); - } - } - } - - $push_notify = true; - - } - - // Notify PuSH subscribers (Used for OStatus distribution of regular posts) - if ($push_notify) { - // Set push flag for PuSH subscribers to this topic, - // they will be notified in queue.php - q("UPDATE `push_subscriber` SET `push` = 1 ". - "WHERE `nickname` = '%s' AND `push` = 0", dbesc($owner['nickname'])); - - logger('Activating internal PuSH for item '.$item_id, LOGGER_DEBUG); - - // Handling the pubsubhubbub requests - Worker::add(array('priority' => PRIORITY_HIGH, 'created' => $a->queue['created'], 'dont_fork' => true), - 'PubSubPublish'); - } - - logger('notifier: calling hooks', LOGGER_DEBUG); - - if ($normal_mode) { - call_hooks('notifier_normal',$target_item); - } - - call_hooks('notifier_end',$target_item); - - return; -} diff --git a/include/uimport.php b/include/uimport.php index af4f434d4..e0edb7091 100644 --- a/include/uimport.php +++ b/include/uimport.php @@ -286,7 +286,7 @@ function import_account(App $a, $file) { } // send relocate messages - Worker::add(PRIORITY_HIGH, 'notifier', 'relocate', $newuid); + Worker::add(PRIORITY_HIGH, 'Notifier', 'relocate', $newuid); info(t("Done. You can now login with your username and password")); goaway(System::baseUrl() . "/login"); diff --git a/mod/admin.php b/mod/admin.php index cda6d1a3b..ee456a23f 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -778,7 +778,7 @@ function admin_page_site_post(App $a) { $users = q("SELECT `uid` FROM `user` WHERE `account_removed` = 0 AND `account_expired` = 0"); foreach ($users as $user) { - Worker::add(PRIORITY_HIGH, 'notifier', 'relocate', $user['uid']); + Worker::add(PRIORITY_HIGH, 'Notifier', 'relocate', $user['uid']); } info("Relocation started. Could take a while to complete."); diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php index 98bdfbe15..8484ace2c 100644 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -498,7 +498,7 @@ function dfrn_confirm_post(App $a, $handsfree = null) { $i = item_store($arr); if($i) - Worker::add(PRIORITY_HIGH, "notifier", "activity", $i); + Worker::add(PRIORITY_HIGH, "Notifier", "activity", $i); } } } @@ -800,7 +800,7 @@ function dfrn_confirm_post(App $a, $handsfree = null) { $i = item_store($arr); if($i) - Worker::add(PRIORITY_HIGH, "notifier", "activity", $i); + Worker::add(PRIORITY_HIGH, "Notifier", "activity", $i); } } diff --git a/mod/events.php b/mod/events.php index b72c8f188..7a05274e2 100644 --- a/mod/events.php +++ b/mod/events.php @@ -180,7 +180,7 @@ function events_post(App $a) { $item_id = event_store($datarray); if (! $cid) { - Worker::add(PRIORITY_HIGH, "notifier", "event", $item_id); + Worker::add(PRIORITY_HIGH, "Notifier", "event", $item_id); } goaway($_SESSION['return_url']); diff --git a/mod/fsuggest.php b/mod/fsuggest.php index c2d9455b0..dd698db58 100644 --- a/mod/fsuggest.php +++ b/mod/fsuggest.php @@ -61,7 +61,7 @@ function fsuggest_post(App $a) { intval($fsuggest_id), intval(local_user()) ); - Worker::add(PRIORITY_HIGH, 'notifier', 'suggest', $fsuggest_id); + Worker::add(PRIORITY_HIGH, 'Notifier', 'suggest', $fsuggest_id); } info( t('Friend suggestion sent.') . EOL); diff --git a/mod/item.php b/mod/item.php index 5f5a96d5e..0e2e65704 100644 --- a/mod/item.php +++ b/mod/item.php @@ -834,7 +834,7 @@ function item_post(App $a) { // update filetags in pconfig file_tag_update_pconfig($uid,$categories_old,$categories_new,'category'); - Worker::add(PRIORITY_HIGH, "notifier", 'edit_post', $post_id); + Worker::add(PRIORITY_HIGH, "Notifier", 'edit_post', $post_id); if ((x($_REQUEST, 'return')) && strlen($return_path)) { logger('return: ' . $return_path); goaway($return_path); @@ -1067,7 +1067,7 @@ function item_post(App $a) { Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), "CreateShadowentry", $post_id); // Call the background process that is delivering the item to the receivers - Worker::add(PRIORITY_HIGH, "notifier", $notify_type, $post_id); + Worker::add(PRIORITY_HIGH, "Notifier", $notify_type, $post_id); logger('post_complete'); diff --git a/mod/mood.php b/mod/mood.php index 084750ef8..bffe37f3b 100644 --- a/mod/mood.php +++ b/mod/mood.php @@ -100,13 +100,13 @@ function mood_init(App $a) { intval($uid), intval($item_id) ); - Worker::add(PRIORITY_HIGH, "notifier", "tag", $item_id); + Worker::add(PRIORITY_HIGH, "Notifier", "tag", $item_id); } call_hooks('post_local_end', $arr); - Worker::add(PRIORITY_HIGH, "notifier", "like", $post_id); + Worker::add(PRIORITY_HIGH, "Notifier", "like", $post_id); return; } diff --git a/mod/photos.php b/mod/photos.php index f18ce38af..1546bd9a8 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -306,7 +306,7 @@ function photos_post(App $a) { // send the notification upstream/downstream as the case may be if ($rr['visible']) { - Worker::add(PRIORITY_HIGH, "notifier", "drop", $drop_id); + Worker::add(PRIORITY_HIGH, "Notifier", "drop", $drop_id); } } } @@ -383,7 +383,7 @@ function photos_post(App $a) { photo_albums($page_owner_uid, true); if ($i[0]['visible']) { - Worker::add(PRIORITY_HIGH, "notifier", "drop", $drop_id); + Worker::add(PRIORITY_HIGH, "Notifier", "drop", $drop_id); } } } @@ -731,7 +731,7 @@ function photos_post(App $a) { $item_id = item_store($arr); if ($item_id) { - Worker::add(PRIORITY_HIGH, "notifier", "tag", $item_id); + Worker::add(PRIORITY_HIGH, "Notifier", "tag", $item_id); } } } @@ -936,7 +936,7 @@ function photos_post(App $a) { photo_albums($page_owner_uid, true); if ($visible) { - Worker::add(PRIORITY_HIGH, "notifier", 'wall-new', $item_id); + Worker::add(PRIORITY_HIGH, "Notifier", 'wall-new', $item_id); } call_hooks('photo_post_end',intval($item_id)); diff --git a/mod/poke.php b/mod/poke.php index 848ed817d..2f989dd7d 100644 --- a/mod/poke.php +++ b/mod/poke.php @@ -139,13 +139,13 @@ function poke_init(App $a) { // intval($uid), // intval($item_id) //); - Worker::add(PRIORITY_HIGH, "notifier", "tag", $item_id); + Worker::add(PRIORITY_HIGH, "Notifier", "tag", $item_id); } call_hooks('post_local_end', $arr); - Worker::add(PRIORITY_HIGH, "notifier", "like", $post_id); + Worker::add(PRIORITY_HIGH, "Notifier", "like", $post_id); return; } diff --git a/mod/profiles.php b/mod/profiles.php index 5a5a649bc..bbce17c33 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -600,7 +600,7 @@ function profile_activity($changed, $value) { $i = item_store($arr); if ($i) { - Worker::add(PRIORITY_HIGH, "notifier", "activity", $i); + Worker::add(PRIORITY_HIGH, "Notifier", "activity", $i); } } diff --git a/mod/settings.php b/mod/settings.php index a3ba2ecb9..6a32b7ed0 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -360,7 +360,7 @@ function settings_post(App $a) { check_form_security_token_redirectOnErr('/settings', 'settings'); if (x($_POST,'resend_relocate')) { - Worker::add(PRIORITY_HIGH, 'notifier', 'relocate', local_user()); + Worker::add(PRIORITY_HIGH, 'Notifier', 'relocate', local_user()); info(t("Relocate message has been send to your contacts")); goaway('settings'); } diff --git a/mod/tagger.php b/mod/tagger.php index c91fb4aba..c7e8a9469 100644 --- a/mod/tagger.php +++ b/mod/tagger.php @@ -216,7 +216,7 @@ EOT; call_hooks('post_local_end', $arr); - Worker::add(PRIORITY_HIGH, "notifier", "tag", $post_id); + Worker::add(PRIORITY_HIGH, "Notifier", "tag", $post_id); killme(); diff --git a/mod/videos.php b/mod/videos.php index bea315c59..a46f5de1a 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -173,7 +173,7 @@ function videos_post(App $a) { $drop_id = intval($i[0]['id']); if ($i[0]['visible']) { - Worker::add(PRIORITY_HIGH, "notifier", "drop", $drop_id); + Worker::add(PRIORITY_HIGH, "Notifier", "drop", $drop_id); } } } diff --git a/src/Core/Worker.php b/src/Core/Worker.php index 88b5bdea8..7d130c1e3 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -922,7 +922,7 @@ class Worker { * @param (integer|array) priority or parameter array, strings are deprecated and are ignored * * next args are passed as $cmd command line - * or: Worker::add(PRIORITY_HIGH, "notifier", "drop", $drop_id); + * or: Worker::add(PRIORITY_HIGH, "Notifier", "drop", $drop_id); * or: Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), "CreateShadowentry", $post_id); * * @note $cmd and string args are surrounded with "" diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index a88d69d56..d4a5efe8d 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -2106,7 +2106,7 @@ class DFRN $changed = true; if ($entrytype == DFRN_REPLY_RC) { - Worker::add(PRIORITY_HIGH, "notifier", "comment-import", $current["id"]); + Worker::add(PRIORITY_HIGH, "Notifier", "comment-import", $current["id"]); } } @@ -2752,7 +2752,7 @@ class DFRN if ($posted_id && $parent && ($entrytype == DFRN_REPLY_RC)) { logger("Notifying followers about comment ".$posted_id, LOGGER_DEBUG); - Worker::add(PRIORITY_HIGH, "notifier", "comment-import", $posted_id); + Worker::add(PRIORITY_HIGH, "Notifier", "comment-import", $posted_id); } return true; @@ -2940,7 +2940,7 @@ class DFRN if ($entrytype == DFRN_REPLY_RC) { logger("Notifying followers about deletion of post " . $item["id"], LOGGER_DEBUG); - Worker::add(PRIORITY_HIGH, "notifier", "drop", $item["id"]); + Worker::add(PRIORITY_HIGH, "Notifier", "drop", $item["id"]); } } } diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 0c0c3bb2f..bf58f23e9 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -1696,7 +1696,7 @@ class Diaspora dba::insert('sign', array('iid' => $message_id, 'signed_text' => json_encode($data))); // notify others - Worker::add(PRIORITY_HIGH, "notifier", "comment-import", $message_id); + Worker::add(PRIORITY_HIGH, "Notifier", "comment-import", $message_id); } return true; @@ -2024,7 +2024,7 @@ class Diaspora dba::insert('sign', array('iid' => $message_id, 'signed_text' => json_encode($data))); // notify others - Worker::add(PRIORITY_HIGH, "notifier", "comment-import", $message_id); + Worker::add(PRIORITY_HIGH, "Notifier", "comment-import", $message_id); } return true; @@ -2320,7 +2320,7 @@ class Diaspora $i = item_store($arr); if ($i) { - Worker::add(PRIORITY_HIGH, "notifier", "activity", $i); + Worker::add(PRIORITY_HIGH, "Notifier", "activity", $i); } } } @@ -2768,7 +2768,7 @@ class Diaspora // Now check if the retraction needs to be relayed by us if ($parent["origin"]) { // notify others - Worker::add(PRIORITY_HIGH, "notifier", "drop", $item["id"]); + Worker::add(PRIORITY_HIGH, "Notifier", "drop", $item["id"]); } } diff --git a/include/delivery.php b/src/Worker/Delivery.php similarity index 94% rename from include/delivery.php rename to src/Worker/Delivery.php index 15b97567e..e450deed1 100644 --- a/include/delivery.php +++ b/src/Worker/Delivery.php @@ -1,7 +1,10 @@ UTC_TIMESTAMP() - INTERVAL 10 MINUTE", + intval($item_id) + ); + $uid = $item_id; + $item_id = 0; + if (! count($items)) { + return; + } + } elseif ($cmd === 'suggest') { + $normal_mode = false; + $fsuggest = true; + + $suggest = q("SELECT * FROM `fsuggest` WHERE `id` = %d LIMIT 1", + intval($item_id) + ); + if (! count($suggest)) { + return; + } + $uid = $suggest[0]['uid']; + $recipients[] = $suggest[0]['cid']; + $item = $suggest[0]; + } elseif ($cmd === 'removeme') { + $r = q("SELECT `contact`.*, `user`.`pubkey` AS `upubkey`, `user`.`prvkey` AS `uprvkey`, + `user`.`timezone`, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`, + `user`.`page-flags`, `user`.`prvnets`, `user`.`account-type`, `user`.`guid` + FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid` + WHERE `contact`.`uid` = %d AND `contact`.`self` LIMIT 1", + intval($item_id)); + if (!$r) + return; + + $user = $r[0]; + + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` LIMIT 1", intval($item_id)); + if (!$r) + return; + + $self = $r[0]; + + $r = q("SELECT * FROM `contact` WHERE NOT `self` AND `uid` = %d", intval($item_id)); + if (!$r) { + return; + } + require_once 'include/Contact.php'; + foreach ($r as $contact) { + terminate_friendship($user, $self, $contact); + } + return; + } elseif ($cmd === 'relocate') { + $normal_mode = false; + $relocate = true; + $uid = $item_id; + + $recipients_relocate = q("SELECT * FROM `contact` WHERE `uid` = %d AND NOT `self` AND `network` IN ('%s', '%s')", + intval($uid), NETWORK_DFRN, NETWORK_DIASPORA); + } else { + // find ancestors + $r = q("SELECT * FROM `item` WHERE `id` = %d AND visible = 1 AND moderated = 0 LIMIT 1", + intval($item_id) + ); + + if ((! DBM::is_result($r)) || (! intval($r[0]['parent']))) { + return; + } + + $target_item = $r[0]; + $parent_id = intval($r[0]['parent']); + $uid = $r[0]['uid']; + $updated = $r[0]['edited']; + + $items = q("SELECT `item`.*, `sign`.`signed_text`,`sign`.`signature`,`sign`.`signer` + FROM `item` LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id` WHERE `parent` = %d AND visible = 1 AND moderated = 0 ORDER BY `id` ASC", + intval($parent_id) + ); + + if (! count($items)) { + return; + } + + // avoid race condition with deleting entries + + if ($items[0]['deleted']) { + foreach ($items as $item) { + $item['deleted'] = 1; + } + } + + if ((count($items) == 1) && ($items[0]['id'] === $target_item['id']) && ($items[0]['uri'] === $items[0]['parent-uri'])) { + logger('notifier: top level post'); + $top_level = true; + } + + } + + $r = q("SELECT `contact`.*, `user`.`pubkey` AS `upubkey`, `user`.`prvkey` AS `uprvkey`, + `user`.`timezone`, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`, + `user`.`page-flags`, `user`.`prvnets`, `user`.`account-type` + FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid` + WHERE `contact`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1", + intval($uid) + ); + + if (! DBM::is_result($r)) { + return; + } + + $owner = $r[0]; + + $walltowall = ((($top_level) && ($owner['id'] != $items[0]['contact-id'])) ? true : false); + + // Should the post be transmitted to Diaspora? + $diaspora_delivery = true; + + // If this is a public conversation, notify the feed hub + $public_message = true; + + // Do a PuSH + $push_notify = false; + + // Deliver directly to a forum, don't PuSH + $direct_forum_delivery = false; + + // fill this in with a single salmon slap if applicable + $slap = ''; + + if (! ($mail || $fsuggest || $relocate)) { + + $slap = OStatus::salmon($target_item, $owner); + + require_once 'include/group.php'; + + $parent = $items[0]; + + $thr_parent = q("SELECT `network`, `author-link`, `owner-link` FROM `item` WHERE `uri` = '%s' AND `uid` = %d", + dbesc($target_item["thr-parent"]), intval($target_item["uid"])); + + logger('GUID: '.$target_item["guid"].': Parent is '.$parent['network'].'. Thread parent is '.$thr_parent[0]['network'], LOGGER_DEBUG); + + // This is IMPORTANT!!!! + + // We will only send a "notify owner to relay" or followup message if the referenced post + // originated on our system by virtue of having our hostname somewhere + // in the URI, AND it was a comment (not top_level) AND the parent originated elsewhere. + + // if $parent['wall'] == 1 we will already have the parent message in our array + // and we will relay the whole lot. + + // expire sends an entire group of expire messages and cannot be forwarded. + // However the conversation owner will be a part of the conversation and will + // be notified during this run. + // Other DFRN conversation members will be alerted during polled updates. + + + + // Diaspora members currently are not notified of expirations, and other networks have + // either limited or no ability to process deletions. We should at least fix Diaspora + // by stringing togther an array of retractions and sending them onward. + + + $localhost = str_replace('www.','',$a->get_hostname()); + if (strpos($localhost,':')) { + $localhost = substr($localhost,0,strpos($localhost,':')); + } + /** + * + * Be VERY CAREFUL if you make any changes to the following several lines. Seemingly innocuous changes + * have been known to cause runaway conditions which affected several servers, along with + * permissions issues. + * + */ + + $relay_to_owner = false; + + if (!$top_level && ($parent['wall'] == 0) && !$expire && (stristr($target_item['uri'],$localhost))) { + $relay_to_owner = true; + } + + + if (($cmd === 'uplink') && (intval($parent['forum_mode']) == 1) && !$top_level) { + $relay_to_owner = true; + } + + // until the 'origin' flag has been in use for several months + // we will just use it as a fallback test + // later we will be able to use it as the primary test of whether or not to relay. + + if (! $target_item['origin']) { + $relay_to_owner = false; + } + if ($parent['origin']) { + $relay_to_owner = false; + } + + // Special treatment for forum posts + if (($target_item['author-link'] != $target_item['owner-link']) && + ($owner['id'] != $target_item['contact-id']) && + ($target_item['uri'] === $target_item['parent-uri'])) { + + $fields = array('forum', 'prv'); + $condition = array('id' => $target_item['contact-id']); + $contact = dba::select('contact', $fields, $condition, array('limit' => 1)); + if (!DBM::is_result($contact)) { + // Should never happen + return false; + } + + // Is the post from a forum? + if ($contact['forum'] || $contact['prv']) { + $relay_to_owner = true; + $direct_forum_delivery = true; + } + } + if ($relay_to_owner) { + logger('notifier: followup '.$target_item["guid"], LOGGER_DEBUG); + // local followup to remote post + $followup = true; + $public_message = false; // not public + $conversant_str = dbesc($parent['contact-id']); + $recipients = array($parent['contact-id']); + $recipients_followup = array($parent['contact-id']); + + //if (!$target_item['private'] && $target_item['wall'] && + if (!$target_item['private'] && + (strlen($target_item['allow_cid'].$target_item['allow_gid']. + $target_item['deny_cid'].$target_item['deny_gid']) == 0)) + $push_notify = true; + + if (($thr_parent && ($thr_parent[0]['network'] == NETWORK_OSTATUS)) || ($parent['network'] == NETWORK_OSTATUS)) { + + $push_notify = true; + + if ($parent["network"] == NETWORK_OSTATUS) { + // Distribute the message to the DFRN contacts as if this wasn't a followup since OStatus can't relay comments + // Currently it is work at progress + $r = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `network` = '%s' AND NOT `blocked` AND NOT `pending` AND NOT `archive`", + intval($uid), + dbesc(NETWORK_DFRN) + ); + if (DBM::is_result($r)) { + foreach ($r as $rr) { + $recipients_followup[] = $rr['id']; + } + } + } + } + + if ($direct_forum_delivery) { + $push_notify = false; + } + + logger("Notify ".$target_item["guid"]." via PuSH: ".($push_notify?"Yes":"No"), LOGGER_DEBUG); + } else { + $followup = false; + + logger('Distributing directly '.$target_item["guid"], LOGGER_DEBUG); + + // don't send deletions onward for other people's stuff + + if ($target_item['deleted'] && (! intval($target_item['wall']))) { + logger('notifier: ignoring delete notification for non-wall item'); + return; + } + + if ((strlen($parent['allow_cid'])) + || (strlen($parent['allow_gid'])) + || (strlen($parent['deny_cid'])) + || (strlen($parent['deny_gid']))) { + $public_message = false; // private recipients, not public + } + + $allow_people = expand_acl($parent['allow_cid']); + $allow_groups = expand_groups(expand_acl($parent['allow_gid']),true); + $deny_people = expand_acl($parent['deny_cid']); + $deny_groups = expand_groups(expand_acl($parent['deny_gid'])); + + // if our parent is a public forum (forum_mode == 1), uplink to the origional author causing + // a delivery fork. private groups (forum_mode == 2) do not uplink + + if ((intval($parent['forum_mode']) == 1) && (! $top_level) && ($cmd !== 'uplink')) { + Worker::add($a->queue['priority'], 'Notifier', 'uplink', $item_id); + } + + $conversants = array(); + + foreach ($items as $item) { + $recipients[] = $item['contact-id']; + $conversants[] = $item['contact-id']; + // pull out additional tagged people to notify (if public message) + if ($public_message && strlen($item['inform'])) { + $people = explode(',',$item['inform']); + foreach ($people as $person) { + if (substr($person,0,4) === 'cid:') { + $recipients[] = intval(substr($person,4)); + $conversants[] = intval(substr($person,4)); + } else { + $url_recipients[] = substr($person,4); + } + } + } + } + + if (count($url_recipients)) + logger('notifier: '.$target_item["guid"].' url_recipients ' . print_r($url_recipients,true)); + + $conversants = array_unique($conversants); + + + $recipients = array_unique(array_merge($recipients,$allow_people,$allow_groups)); + $deny = array_unique(array_merge($deny_people,$deny_groups)); + $recipients = array_diff($recipients,$deny); + + $conversant_str = dbesc(implode(', ',$conversants)); + } + + // If the thread parent is OStatus then do some magic to distribute the messages. + // We have not only to look at the parent, since it could be a Friendica thread. + if (($thr_parent && ($thr_parent[0]['network'] == NETWORK_OSTATUS)) || ($parent['network'] == NETWORK_OSTATUS)) { + + $diaspora_delivery = false; + + logger('Some parent is OStatus for '.$target_item["guid"]." - Author: ".$thr_parent[0]['author-link']." - Owner: ".$thr_parent[0]['owner-link'], LOGGER_DEBUG); + + // Send a salmon to the parent author + $r = q("SELECT `url`, `notify` FROM `contact` WHERE `nurl`='%s' AND `uid` IN (0, %d) AND `notify` != ''", + dbesc(normalise_link($thr_parent[0]['author-link'])), + intval($uid)); + if (DBM::is_result($r)) { + $probed_contact = $r[0]; + } else { + $probed_contact = Probe::uri($thr_parent[0]['author-link']); + } + + if ($probed_contact["notify"] != "") { + logger('Notify parent author '.$probed_contact["url"].': '.$probed_contact["notify"]); + $url_recipients[$probed_contact["notify"]] = $probed_contact["notify"]; + } + + // Send a salmon to the parent owner + $r = q("SELECT `url`, `notify` FROM `contact` WHERE `nurl`='%s' AND `uid` IN (0, %d) AND `notify` != ''", + dbesc(normalise_link($thr_parent[0]['owner-link'])), + intval($uid)); + if (DBM::is_result($r)) { + $probed_contact = $r[0]; + } else { + $probed_contact = Probe::uri($thr_parent[0]['owner-link']); + } + + if ($probed_contact["notify"] != "") { + logger('Notify parent owner '.$probed_contact["url"].': '.$probed_contact["notify"]); + $url_recipients[$probed_contact["notify"]] = $probed_contact["notify"]; + } + + // Send a salmon notification to every person we mentioned in the post + $arr = explode(',',$target_item['tag']); + foreach ($arr as $x) { + //logger('Checking tag '.$x, LOGGER_DEBUG); + $matches = null; + if (preg_match('/@\[url=([^\]]*)\]/',$x,$matches)) { + $probed_contact = Probe::uri($matches[1]); + if ($probed_contact["notify"] != "") { + logger('Notify mentioned user '.$probed_contact["url"].': '.$probed_contact["notify"]); + $url_recipients[$probed_contact["notify"]] = $probed_contact["notify"]; + } + } + } + + // It only makes sense to distribute answers to OStatus messages to Friendica and OStatus - but not Diaspora + $sql_extra = " AND `network` IN ('".NETWORK_OSTATUS."', '".NETWORK_DFRN."')"; + } else { + $sql_extra = " AND `network` IN ('".NETWORK_OSTATUS."', '".NETWORK_DFRN."', '".NETWORK_DIASPORA."', '".NETWORK_MAIL."', '".NETWORK_MAIL2."')"; + } + } else { + $public_message = false; + } + + // If this is a public message and pubmail is set on the parent, include all your email contacts + + $mail_disabled = ((function_exists('imap_open') && (!Config::get('system','imap_disabled'))) ? 0 : 1); + + if (! $mail_disabled) { + if ((! strlen($target_item['allow_cid'])) && (! strlen($target_item['allow_gid'])) + && (! strlen($target_item['deny_cid'])) && (! strlen($target_item['deny_gid'])) + && (intval($target_item['pubmail']))) { + $r = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `network` = '%s'", + intval($uid), + dbesc(NETWORK_MAIL) + ); + if (DBM::is_result($r)) { + foreach ($r as $rr) { + $recipients[] = $rr['id']; + } + } + } + } + + if ($followup) { + $recip_str = implode(', ', $recipients_followup); + } else { + $recip_str = implode(', ', $recipients); + } + if ($relocate) { + $r = $recipients_relocate; + } else { + $r = q("SELECT `id`, `url`, `network`, `self` FROM `contact` + WHERE `id` IN (%s) AND NOT `blocked` AND NOT `pending` AND NOT `archive`".$sql_extra, + dbesc($recip_str) + ); + } + + // delivery loop + + if (DBM::is_result($r)) { + foreach ($r as $contact) { + if ($contact['self']) { + continue; + } + logger("Deliver ".$target_item["guid"]." to ".$contact['url']." via network ".$contact['network'], LOGGER_DEBUG); + + Worker::add(array('priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true), + 'Delivery', $cmd, $item_id, (int)$contact['id']); + } + } + + // send salmon slaps to mentioned remote tags (@foo@example.com) in OStatus posts + // They are especially used for notifications to OStatus users that don't follow us. + + if ($slap && count($url_recipients) && ($public_message || $push_notify) && $normal_mode) { + if (!Config::get('system','dfrn_only')) { + foreach ($url_recipients as $url) { + if ($url) { + logger('notifier: urldelivery: ' . $url); + $deliver_status = slapper($owner,$url,$slap); + /// @TODO Redeliver/queue these items on failure, though there is no contact record + } + } + } + } + + + if ($public_message) { + + $r0 = array(); + $r1 = array(); + + if ($diaspora_delivery) { + if (!$followup) { + $r0 = Diaspora::relay_list(); + } + + $r1 = q("SELECT `batch`, ANY_VALUE(`id`) AS `id`, ANY_VALUE(`name`) AS `name`, ANY_VALUE(`network`) AS `network` + FROM `contact` WHERE `network` = '%s' AND `batch` != '' + AND `uid` = %d AND `rel` != %d AND NOT `blocked` AND NOT `pending` AND NOT `archive` GROUP BY `batch`", + dbesc(NETWORK_DIASPORA), + intval($owner['uid']), + intval(CONTACT_IS_SHARING) + ); + } + + $r2 = q("SELECT `id`, `name`,`network` FROM `contact` + WHERE `network` in ('%s', '%s') AND `uid` = %d AND NOT `blocked` AND NOT `pending` AND NOT `archive` AND `rel` != %d", + dbesc(NETWORK_DFRN), + dbesc(NETWORK_MAIL2), + intval($owner['uid']), + intval(CONTACT_IS_SHARING) + ); + + $r = array_merge($r2,$r1,$r0); + + if (DBM::is_result($r)) { + logger('pubdeliver '.$target_item["guid"].': '.print_r($r,true), LOGGER_DEBUG); + + foreach ($r as $rr) { + + // except for Diaspora batch jobs + // Don't deliver to folks who have already been delivered to + + if (($rr['network'] !== NETWORK_DIASPORA) && (in_array($rr['id'],$conversants))) { + logger('notifier: already delivered id=' . $rr['id']); + continue; + } + + if ((! $mail) && (! $fsuggest) && (! $followup)) { + logger('notifier: delivery agent: '.$rr['name'].' '.$rr['id'].' '.$rr['network'].' '.$target_item["guid"]); + Worker::add(array('priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true), + 'Delivery', $cmd, $item_id, (int)$rr['id']); + } + } + } + + $push_notify = true; + + } + + // Notify PuSH subscribers (Used for OStatus distribution of regular posts) + if ($push_notify) { + // Set push flag for PuSH subscribers to this topic, + // they will be notified in queue.php + q("UPDATE `push_subscriber` SET `push` = 1 ". + "WHERE `nickname` = '%s' AND `push` = 0", dbesc($owner['nickname'])); + + logger('Activating internal PuSH for item '.$item_id, LOGGER_DEBUG); + + // Handling the pubsubhubbub requests + Worker::add(array('priority' => PRIORITY_HIGH, 'created' => $a->queue['created'], 'dont_fork' => true), + 'PubSubPublish'); + } + + logger('notifier: calling hooks', LOGGER_DEBUG); + + if ($normal_mode) { + call_hooks('notifier_normal',$target_item); + } + + call_hooks('notifier_end',$target_item); + + return; + } +} From 183999ee08b433bb12c7f3c7a76d297beca00bcc Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 19 Nov 2017 19:47:04 +0000 Subject: [PATCH 056/175] No german compound wording :-) --- mod/item.php | 2 +- src/Core/Worker.php | 2 +- src/Worker/{CreateShadowentry.php => CreateShadowEntry.php} | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename src/Worker/{CreateShadowentry.php => CreateShadowEntry.php} (84%) diff --git a/mod/item.php b/mod/item.php index 0e2e65704..2fcaa6c3f 100644 --- a/mod/item.php +++ b/mod/item.php @@ -1064,7 +1064,7 @@ function item_post(App $a) { // We now do it in the background to save some time. // This is important in interactive environments like the frontend or the API. // We don't fork a new process since this is done anyway with the following command - Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), "CreateShadowentry", $post_id); + Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), "CreateShadowEntry", $post_id); // Call the background process that is delivering the item to the receivers Worker::add(PRIORITY_HIGH, "Notifier", $notify_type, $post_id); diff --git a/src/Core/Worker.php b/src/Core/Worker.php index 7d130c1e3..9e69d4173 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -923,7 +923,7 @@ class Worker { * * next args are passed as $cmd command line * or: Worker::add(PRIORITY_HIGH, "Notifier", "drop", $drop_id); - * or: Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), "CreateShadowentry", $post_id); + * or: Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), "CreateShadowEntry", $post_id); * * @note $cmd and string args are surrounded with "" * diff --git a/src/Worker/CreateShadowentry.php b/src/Worker/CreateShadowEntry.php similarity index 84% rename from src/Worker/CreateShadowentry.php rename to src/Worker/CreateShadowEntry.php index cc0542058..cf95ec622 100644 --- a/src/Worker/CreateShadowentry.php +++ b/src/Worker/CreateShadowEntry.php @@ -1,6 +1,6 @@ Date: Sun, 19 Nov 2017 19:58:11 +0000 Subject: [PATCH 057/175] Additional features can now be changed again --- include/features.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/features.php b/include/features.php index 5ff93eacd..9895fd6f7 100644 --- a/include/features.php +++ b/include/features.php @@ -125,7 +125,7 @@ function get_features($filtered = true) { $kquantity = count($arr[$k]); for ($y = 0; $y < $kquantity; $y ++) { if (is_array($arr[$k][$y])) { - if ($arr[$k][$y][4] === false) { + if (is_null($arr[$k][$y][4])) { $has_items = true; } else { From d9e9cbe7534ec05a131ac250ef9912cdaf7078ee Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Sun, 19 Nov 2017 14:15:25 -0500 Subject: [PATCH 058/175] Coding Standards A few updates for coding standards --- include/conversation.php | 4 +- index.php | 106 +++++++++---------- mod/smilies.php | 4 +- src/Content/Smilies.php | 24 +++-- src/Core/BaseObject.php | 8 +- src/Core/Cache.php | 4 + src/Core/Config.php | 53 +++++----- src/Core/Conversation.php | 77 +++++++++----- src/Core/Item.php | 163 ++++++++++++++++++++++-------- src/Core/NotificationsManager.php | 72 +++++++------ src/Core/PConfig.php | 67 ++++++------ src/Core/System.php | 24 +++-- 12 files changed, 357 insertions(+), 249 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 9f6cfa0f5..218d7405b 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -905,11 +905,11 @@ function conversation(App $a, $items, $mode, $update, $preview = false) { if ($item['id'] == $item['parent']) { $item_object = new Item($item); - $conv->add_thread($item_object); + $conv->addThread($item_object); } } - $threads = $conv->get_template_data($conv_responses); + $threads = $conv->getTemplateData($conv_responses); if (!$threads) { logger('[ERROR] conversation : Failed to get template data.', LOGGER_DEBUG); diff --git a/index.php b/index.php index c31b1adc0..5e8860afd 100644 --- a/index.php +++ b/index.php @@ -20,7 +20,7 @@ require_once 'boot.php'; if (empty($a)) { $a = new App(__DIR__); } -BaseObject::set_app($a); +BaseObject::setApp($a); // We assume that the index.php is called by a frontend process // The value is set to "true" by default in boot.php @@ -40,9 +40,7 @@ if (!$install) { } /** - * * Try to open the database; - * */ require_once "include/dba.php"; @@ -64,9 +62,10 @@ if (!$install) { die("System is currently unavailable. Please try again later"); } - if (Config::get('system', 'force_ssl') && ($a->get_scheme() == "http") && - (intval(Config::get('system', 'ssl_policy')) == SSL_POLICY_FULL) && - (substr(System::baseUrl(), 0, 8) == "https://")) { + if (Config::get('system', 'force_ssl') && ($a->get_scheme() == "http") + && (intval(Config::get('system', 'ssl_policy')) == SSL_POLICY_FULL) + && (substr(System::baseUrl(), 0, 8) == "https://") + ) { header("HTTP/1.1 302 Moved Temporarily"); header("Location: " . System::baseUrl() . "/" . $a->query_string); exit(); @@ -84,14 +83,12 @@ $lang = get_browser_language(); load_translation_table($lang); /** - * * Important stuff we always need to do. * * The order of these may be important so use caution if you think they're all * intertwingled with no logical order and decide to sort it out. Some of the * dependencies have changed, but at least at one time in the recent past - the * order was critical to everything working properly - * */ // Exclude the backend processes from the session management @@ -107,7 +104,7 @@ if (!$a->is_backend()) { * Language was set earlier, but we can over-ride it in the session. * We have to do it here because the session was just now opened. */ -if (x($_SESSION,'authenticated') && !x($_SESSION,'language')) { +if (x($_SESSION, 'authenticated') && !x($_SESSION, 'language')) { // we didn't loaded user data yet, but we need user language $r = dba::select('user', array('language'), array('uid' => $_SESSION['uid']), array('limit' => 1)); $_SESSION['language'] = $lang; @@ -116,18 +113,19 @@ if (x($_SESSION,'authenticated') && !x($_SESSION,'language')) { } } -if ((x($_SESSION,'language')) && ($_SESSION['language'] !== $lang)) { +if ((x($_SESSION, 'language')) && ($_SESSION['language'] !== $lang)) { $lang = $_SESSION['language']; load_translation_table($lang); } -if ((x($_GET,'zrl')) && (!$install && !$maintenance)) { +if ((x($_GET, 'zrl')) && (!$install && !$maintenance)) { // Only continue when the given profile link seems valid // Valid profile links contain a path with "/profile/" and no query parameters - if ((parse_url($_GET['zrl'], PHP_URL_QUERY) == "") && - strstr(parse_url($_GET['zrl'], PHP_URL_PATH), "/profile/")) { + if ((parse_url($_GET['zrl'], PHP_URL_QUERY) == "") + && strstr(parse_url($_GET['zrl'], PHP_URL_PATH), "/profile/") + ) { $_SESSION['my_url'] = $_GET['zrl']; - $a->query_string = preg_replace('/[\?&]zrl=(.*?)([\?&]|$)/is','',$a->query_string); + $a->query_string = preg_replace('/[\?&]zrl=(.*?)([\?&]|$)/is', '', $a->query_string); zrl_init($a); } else { // Someone came with an invalid parameter, maybe as a DDoS attempt @@ -140,23 +138,21 @@ if ((x($_GET,'zrl')) && (!$install && !$maintenance)) { } /** - * * For Mozilla auth manager - still needs sorting, and this might conflict with LRDD header. * Apache/PHP lumps the Link: headers into one - and other services might not be able to parse it * this way. There's a PHP flag to link the headers because by default this will over-write any other * link header. * * What we really need to do is output the raw headers ourselves so we can keep them separate. - * */ // header('Link: <' . System::baseUrl() . '/amcd>; rel="acct-mgmt";'); -if (x($_COOKIE["Friendica"]) || (x($_SESSION,'authenticated')) || (x($_POST,'auth-params')) || ($a->module === 'login')) { - require("include/auth.php"); +if (x($_COOKIE["Friendica"]) || (x($_SESSION, 'authenticated')) || (x($_POST, 'auth-params')) || ($a->module === 'login')) { + require "include/auth.php"; } -if (! x($_SESSION,'authenticated')) { +if (! x($_SESSION, 'authenticated')) { header('X-Account-Management-Status: none'); } @@ -165,16 +161,16 @@ $a->page['htmlhead'] = ''; $a->page['end'] = ''; -if (! x($_SESSION,'sysmsg')) { +if (! x($_SESSION, 'sysmsg')) { $_SESSION['sysmsg'] = array(); } -if (! x($_SESSION,'sysmsg_info')) { +if (! x($_SESSION, 'sysmsg_info')) { $_SESSION['sysmsg_info'] = array(); } // Array for informations about last received items -if (! x($_SESSION,'last_updated')) { +if (! x($_SESSION, 'last_updated')) { $_SESSION['last_updated'] = array(); } /* @@ -198,7 +194,7 @@ if ($install && $a->module!="view") { nav_set_selected('nothing'); //Don't populate apps_menu if apps are private -$privateapps = Config::get('config','private_addons'); +$privateapps = Config::get('config', 'private_addons'); if ((local_user()) || (! $privateapps === "1")) { $arr = array('app_menu' => $a->apps); @@ -208,7 +204,6 @@ if ((local_user()) || (! $privateapps === "1")) { } /** - * * We have already parsed the server path into $a->argc and $a->argv * * $a->argv[0] is our module name. We will load the file mod/{$a->argv[0]}.php @@ -229,10 +224,8 @@ if ((local_user()) || (! $privateapps === "1")) { if (strlen($a->module)) { /** - * * We will always have a module name. * First see if we have a plugin which is masquerading as a module. - * */ // Compatibility with the Android Diaspora client @@ -245,14 +238,14 @@ if (strlen($a->module)) { $a->module = "login"; } - $privateapps = Config::get('config','private_addons'); + $privateapps = Config::get('config', 'private_addons'); - if (is_array($a->plugins) && in_array($a->module,$a->plugins) && file_exists("addon/{$a->module}/{$a->module}.php")) { + if (is_array($a->plugins) && in_array($a->module, $a->plugins) && file_exists("addon/{$a->module}/{$a->module}.php")) { //Check if module is an app and if public access to apps is allowed or not if ((!local_user()) && plugin_is_app($a->module) && $privateapps === "1") { - info( t("You must be logged in to use addons. ")); + info(t("You must be logged in to use addons. ")); } else { - include_once("addon/{$a->module}/{$a->module}.php"); + include_once "addon/{$a->module}/{$a->module}.php"; if (function_exists($a->module . '_module')) { $a->module_loaded = true; } @@ -264,12 +257,11 @@ if (strlen($a->module)) { */ if ((! $a->module_loaded) && (file_exists("mod/{$a->module}.php"))) { - include_once("mod/{$a->module}.php"); + include_once "mod/{$a->module}.php"; $a->module_loaded = true; } /** - * * The URL provided does not resolve to a valid module. * * On Dreamhost sites, quite often things go wrong for no apparent reason and they send us to '/internal_error.html'. @@ -278,17 +270,15 @@ if (strlen($a->module)) { * this will often succeed and eventually do the right thing. * * Otherwise we are going to emit a 404 not found. - * */ if (! $a->module_loaded) { - // Stupid browser tried to pre-fetch our Javascript img template. Don't log the event or return anything - just quietly exit. - if ((x($_SERVER,'QUERY_STRING')) && preg_match('/{[0-9]}/',$_SERVER['QUERY_STRING']) !== 0) { + if ((x($_SERVER, 'QUERY_STRING')) && preg_match('/{[0-9]}/', $_SERVER['QUERY_STRING']) !== 0) { killme(); } - if ((x($_SERVER,'QUERY_STRING')) && ($_SERVER['QUERY_STRING'] === 'q=internal_error.html') && isset($dreamhost_error_hack)) { + if ((x($_SERVER, 'QUERY_STRING')) && ($_SERVER['QUERY_STRING'] === 'q=internal_error.html') && isset($dreamhost_error_hack)) { logger('index.php: dreamhost_error_hack invoked. Original URI =' . $_SERVER['REQUEST_URI']); goaway(System::baseUrl() . $_SERVER['REQUEST_URI']); } @@ -296,29 +286,31 @@ if (strlen($a->module)) { logger('index.php: page not found: ' . $_SERVER['REQUEST_URI'] . ' ADDRESS: ' . $_SERVER['REMOTE_ADDR'] . ' QUERY: ' . $_SERVER['QUERY_STRING'], LOGGER_DEBUG); header($_SERVER["SERVER_PROTOCOL"] . ' 404 ' . t('Not Found')); $tpl = get_markup_template("404.tpl"); - $a->page['content'] = replace_macros($tpl, array( - '$message' => t('Page not found.' ) - )); + $a->page['content'] = replace_macros( + $tpl, + array( + '$message' => t('Page not found.')) + ); } } /** - * load current theme info + * Load current theme info */ $theme_info_file = "view/theme/".current_theme()."/theme.php"; -if (file_exists($theme_info_file)){ - require_once($theme_info_file); +if (file_exists($theme_info_file)) { + require_once $theme_info_file; } /* initialise content region */ -if (! x($a->page,'content')) { +if (! x($a->page, 'content')) { $a->page['content'] = ''; } if (!$install && !$maintenance) { - call_hooks('page_content_top',$a->page['content']); + call_hooks('page_content_top', $a->page['content']); } /** @@ -335,21 +327,22 @@ if ($a->module_loaded) { $func($a); } - if (function_exists(str_replace('-','_',current_theme()) . '_init')) { - $func = str_replace('-','_',current_theme()) . '_init'; + if (function_exists(str_replace('-', '_', current_theme()) . '_init')) { + $func = str_replace('-', '_', current_theme()) . '_init'; $func($a); } if (($_SERVER['REQUEST_METHOD'] === 'POST') && (! $a->error) && (function_exists($a->module . '_post')) - && (! x($_POST,'auth-params'))) { + && (! x($_POST, 'auth-params')) + ) { call_hooks($a->module . '_mod_post', $_POST); $func = $a->module . '_post'; $func($a); } if ((! $a->error) && (function_exists($a->module . '_afterpost'))) { - call_hooks($a->module . '_mod_afterpost',$placeholder); + call_hooks($a->module . '_mod_afterpost', $placeholder); $func = $a->module . '_afterpost'; $func($a); } @@ -364,8 +357,8 @@ if ($a->module_loaded) { $a->page['content'] .= $arr['content']; } - if (function_exists(str_replace('-','_',current_theme()) . '_content_loaded')) { - $func = str_replace('-','_',current_theme()) . '_content_loaded'; + if (function_exists(str_replace('-', '_', current_theme()) . '_content_loaded')) { + $func = str_replace('-', '_', current_theme()) . '_content_loaded'; $func($a); } } @@ -427,10 +420,12 @@ if ($a->is_mobile || $a->is_tablet) { } else { $link = 'toggle_mobile?off=1&address=' . curPageURL(); } - $a->page['footer'] = replace_macros(get_markup_template("toggle_mobile_footer.tpl"), array( - '$toggle_link' => $link, - '$toggle_text' => t('toggle mobile') - )); + $a->page['footer'] = replace_macros( + get_markup_template("toggle_mobile_footer.tpl"), + array( + '$toggle_link' => $link, + '$toggle_text' => t('toggle mobile')) + ); } /** @@ -443,7 +438,7 @@ if (!$a->theme['stylesheet']) { $stylesheet = $a->theme['stylesheet']; } -$a->page['htmlhead'] = str_replace('{{$stylesheet}}',$stylesheet,$a->page['htmlhead']); +$a->page['htmlhead'] = str_replace('{{$stylesheet}}', $stylesheet, $a->page['htmlhead']); //$a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array('$stylesheet' => $stylesheet)); if (isset($_GET["mode"]) && (($_GET["mode"] == "raw") || ($_GET["mode"] == "minimal"))) { @@ -470,7 +465,6 @@ if (isset($_GET["mode"]) && (($_GET["mode"] == "raw") || ($_GET["mode"] == "mini } if (isset($_GET["mode"]) && ($_GET["mode"] == "raw")) { - header("Content-type: text/html; charset=utf-8"); echo substr($target->saveHTML(), 6, -8); diff --git a/mod/smilies.php b/mod/smilies.php index 04bdbe88e..50d6836f7 100644 --- a/mod/smilies.php +++ b/mod/smilies.php @@ -6,10 +6,10 @@ use Friendica\App; use Friendica\Content\Smilies; -function smilies_content(App $a) +function smiliesContent(App $a) { if ($a->argv[1] === "json") { - $tmp = Smilies::get_list(); + $tmp = Smilies::getList(); $results = array(); for ($i = 0; $i < count($tmp['texts']); $i++) { $results[] = array('text' => $tmp['texts'][$i], 'icon' => $tmp['icons'][$i]); diff --git a/src/Content/Smilies.php b/src/Content/Smilies.php index 464b5ee83..ce785d66f 100644 --- a/src/Content/Smilies.php +++ b/src/Content/Smilies.php @@ -33,6 +33,8 @@ class Smilies * @param array $b Array of emoticons * @param string $smiley The text smilie * @param string $representation The replacement + * + * @return void */ public static function add(&$b, $smiley, $representation) { @@ -57,7 +59,7 @@ class Smilies * * @hook smilie ('texts' => smilies texts array, 'icons' => smilies html array) */ - public static function get_list() + public static function getList() { $texts = array( '<3', @@ -154,7 +156,7 @@ class Smilies * bbcode source for HTML display * * @param string $s Text that should be replaced - * @param boolean $sample + * @param boolean $sample optional, default false * @param boolean $no_images Only replace emoticons without images * * @return string HML Output of the Smilie @@ -170,7 +172,7 @@ class Smilies $s = preg_replace_callback('/
(.*?)<\/pre>/ism', 'self::encode', $s);
 		$s = preg_replace_callback('/(.*?)<\/code>/ism', 'self::encode', $s);
 
-		$params = self::get_list();
+		$params = self::getList();
 
 		if ($no_images) {
 			$cleaned = array('texts' => array(), 'icons' => array());
@@ -192,7 +194,7 @@ class Smilies
 				$s .= '
' . $params['texts'][$x] . '
' . $params['icons'][$x] . '
'; } } else { - $params['string'] = preg_replace_callback('/<(3+)/', 'self::preg_heart', $params['string']); + $params['string'] = preg_replace_callback('/<(3+)/', 'self::pregHeart', $params['string']); $s = str_replace($params['texts'], $params['icons'], $params['string']); } @@ -202,11 +204,21 @@ class Smilies return $s; } + /** + * @param string $m string + * + * @return string base64 encoded string + */ private static function encode($m) { return(str_replace($m[1], base64url_encode($m[1]), $m[0])); } + /** + * @param string $m string + * + * @return string base64 decoded string + */ private static function decode($m) { return(str_replace($m[1], base64url_decode($m[1]), $m[0])); @@ -216,13 +228,13 @@ class Smilies /** * @brief expand <3333 to the correct number of hearts * - * @param string $x + * @param string $x string * * @return string HTML Output * * @todo: Rework because it doesn't work correctly */ - private static function preg_heart($x) + private static function pregHeart($x) { if (strlen($x[1]) == 1) { return $x[0]; diff --git a/src/Core/BaseObject.php b/src/Core/BaseObject.php index ade8d9219..d6ea17f70 100644 --- a/src/Core/BaseObject.php +++ b/src/Core/BaseObject.php @@ -19,8 +19,10 @@ class BaseObject * Get the app * * Same as get_app from boot.php + * + * @return object */ - public function get_app() + public function getApp() { if (self::$app) { return self::$app; @@ -35,8 +37,10 @@ class BaseObject * Set the app * * @param object $app App + * + * @return void */ - public static function set_app($app) + public static function setApp($app) { self::$app = $app; } diff --git a/src/Core/Cache.php b/src/Core/Cache.php index ab87bc375..39f5d12fa 100644 --- a/src/Core/Cache.php +++ b/src/Core/Cache.php @@ -134,6 +134,8 @@ class Cache * @param string $key The key to the cached data * @param mixed $value The value that is about to be stored * @param integer $duration The cache lifespan + * + * @return void */ public static function set($key, $value, $duration = CACHE_MONTH) { @@ -159,6 +161,8 @@ class Cache * @brief Remove outdated data from the cache * * @param integer $max_level The maximum cache level that is to be cleared + * + * @return void */ public static function clear($max_level = CACHE_MONTH) { diff --git a/src/Core/Config.php b/src/Core/Config.php index 56b85dba4..219831ad9 100644 --- a/src/Core/Config.php +++ b/src/Core/Config.php @@ -21,8 +21,8 @@ use dba; * There are a few places in the code (such as the admin panel) where boolean * configurations need to be fixed as of 10/08/2011. */ -class Config { - +class Config +{ private static $cache; private static $in_db; @@ -32,12 +32,12 @@ class Config { * All configuration values of the system are stored in global cache * which is available under the global variable $a->config * - * @param string $family - * The category of the configuration value + * @param string $family The category of the configuration value + * * @return void */ - public static function load($family = "config") { - + public static function load($family = "config") + { // We don't preload "system" anymore. // This reduces the number of database reads a lot. if ($family === 'system') { @@ -72,18 +72,15 @@ class Config { * local config cache, pull it into the cache so we don't have * to hit the DB again for this item. * - * @param string $family - * The category of the configuration value - * @param string $key - * The configuration key to query - * @param mixed $default_value optional - * The value to return if key is not set (default: null) - * @param boolean $refresh optional - * If true the config is loaded from the db and not from the cache (default: false) + * @param string $family The category of the configuration value + * @param string $key The configuration key to query + * @param mixed $default_value optional, The value to return if key is not set (default: null) + * @param boolean $refresh optional, If true the config is loaded from the db and not from the cache (default: false) + * * @return mixed Stored value or null if it does not exist */ - public static function get($family, $key, $default_value = null, $refresh = false) { - + public static function get($family, $key, $default_value = null, $refresh = false) + { $a = get_app(); if (!$refresh) { @@ -128,15 +125,14 @@ class Config { * * Note: Please do not store booleans - convert to 0/1 integer values! * - * @param string $family - * The category of the configuration value - * @param string $key - * The configuration key to set - * @param string $value - * The value to store + * @param string $family The category of the configuration value + * @param string $key The configuration key to set + * @param string $value The value to store + * * @return mixed Stored $value or false if the database update failed */ - public static function set($family, $key, $value) { + public static function set($family, $key, $value) + { $a = get_app(); // We store our setting values in a string variable. @@ -177,14 +173,13 @@ class Config { * Removes the configured value from the stored cache in $a->config * and removes it from the database. * - * @param string $family - * The category of the configuration value - * @param string $key - * The configuration key to delete + * @param string $family The category of the configuration value + * @param string $key The configuration key to delete + * * @return mixed */ - public static function delete($family, $key) { - + public static function delete($family, $key) + { if (isset(self::$cache[$family][$key])) { unset(self::$cache[$family][$key]); unset(self::$in_db[$family][$key]); diff --git a/src/Core/Conversation.php b/src/Core/Conversation.php index 4cb11d9ae..10d0e46f1 100644 --- a/src/Core/Conversation.php +++ b/src/Core/Conversation.php @@ -23,22 +23,32 @@ class Conversation extends BaseObject private $profile_owner = 0; private $preview = false; + /** + * Constructor + * + * @param string $mode The mode + * @param boolean $preview boolean value + */ public function __construct($mode, $preview) { - $this->set_mode($mode); + $this->setMode($mode); $this->preview = $preview; } /** * Set the mode we'll be displayed on + * + * @param string $mode The mode to set + * + * @return void */ - private function set_mode($mode) + private function setMode($mode) { - if ($this->get_mode() == $mode) { + if ($this->getMode() == $mode) { return; } - $a = $this->get_app(); + $a = $this->getApp(); switch ($mode) { case 'network': @@ -55,7 +65,7 @@ class Conversation extends BaseObject $this->writable = can_write_wall($a, $this->profile_owner); break; default: - logger('[ERROR] Conversation::set_mode : Unhandled mode ('. $mode .').', LOGGER_DEBUG); + logger('[ERROR] Conversation::setMode : Unhandled mode ('. $mode .').', LOGGER_DEBUG); return false; break; } @@ -64,32 +74,40 @@ class Conversation extends BaseObject /** * Get mode + * + * @return string */ - public function get_mode() + public function getMode() { return $this->mode; } /** * Check if page is writable + * + * @return boolean */ - public function is_writable() + public function isWritable() { return $this->writable; } /** * Check if page is a preview + * + * @return boolean */ - public function is_preview() + public function isPreview() { return $this->preview; } /** * Get profile owner + * + * @return integer */ - public function get_profile_owner() + public function getProfileOwner() { return $this->profile_owner; } @@ -97,21 +115,22 @@ class Conversation extends BaseObject /** * Add a thread to the conversation * - * Returns: - * _ The inserted item on success - * _ false on failure + * @param object $item The item to insert + * + * @return mixed The inserted item on success + * false on failure */ - public function add_thread($item) + public function addThread($item) { $item_id = $item->getId(); if (!$item_id) { - logger('[ERROR] Conversation::add_thread : Item has no ID!!', LOGGER_DEBUG); + logger('[ERROR] Conversation::addThread : Item has no ID!!', LOGGER_DEBUG); return false; } - if ($this->get_thread($item->getId())) { - logger('[WARN] Conversation::add_thread : Thread already exists ('. $item->getId() .').', LOGGER_DEBUG); + if ($this->getThread($item->getId())) { + logger('[WARN] Conversation::addThread : Thread already exists ('. $item->getId() .').', LOGGER_DEBUG); return false; } @@ -119,12 +138,12 @@ class Conversation extends BaseObject * Only add will be displayed */ if ($item->getDataValue('network') === NETWORK_MAIL && local_user() != $item->getDataValue('uid')) { - logger('[WARN] Conversation::add_thread : Thread is a mail ('. $item->getId() .').', LOGGER_DEBUG); + logger('[WARN] Conversation::addThread : Thread is a mail ('. $item->getId() .').', LOGGER_DEBUG); return false; } if ($item->getDataValue('verb') === ACTIVITY_LIKE || $item->getDataValue('verb') === ACTIVITY_DISLIKE) { - logger('[WARN] Conversation::add_thread : Thread is a (dis)like ('. $item->getId() .').', LOGGER_DEBUG); + logger('[WARN] Conversation::addThread : Thread is a (dis)like ('. $item->getId() .').', LOGGER_DEBUG); return false; } @@ -139,13 +158,14 @@ class Conversation extends BaseObject * * We should find a way to avoid using those arguments (at least most of them) * - * Returns: - * _ The data requested on success - * _ false on failure + * @param object $conv_responses data + * + * @return mixed The data requested on success + * false on failure */ - public function get_template_data($conv_responses) + public function getTemplateData($conv_responses) { - $a = get_app(); + $a = getApp(); $result = array(); $i = 0; @@ -157,7 +177,7 @@ class Conversation extends BaseObject $item_data = $item->getTemplateData($conv_responses); if (!$item_data) { - logger('[ERROR] Conversation::get_template_data : Failed to get item template data ('. $item->getId() .').', LOGGER_DEBUG); + logger('[ERROR] Conversation::getTemplateData : Failed to get item template data ('. $item->getId() .').', LOGGER_DEBUG); return false; } $result[] = $item_data; @@ -169,11 +189,12 @@ class Conversation extends BaseObject /** * Get a thread based on its item id * - * Returns: - * _ The found item on success - * _ false on failure + * @param integer $id Item id + * + * @return mixed The found item on success + * false on failure */ - private function get_thread($id) + private function getThread($id) { foreach ($this->threads as $item) { if ($item->getId() == $id) { diff --git a/src/Core/Item.php b/src/Core/Item.php index 49f060338..24e524d2e 100644 --- a/src/Core/Item.php +++ b/src/Core/Item.php @@ -39,9 +39,14 @@ class Item extends BaseObject private $threaded = false; private $visiting = false; + /** + * Constructor + * + * @param array $data data array + */ public function __construct($data) { - $a = $this->get_app(); + $a = $this->getApp(); $this->data = $data; $this->setTemplate('wall'); @@ -92,9 +97,11 @@ class Item extends BaseObject /** * Get data in a form usable by a conversation template * - * Returns: - * _ The data requested on success - * _ false on failure + * @param object $conv_responses conversation responses + * @param integer $thread_level default = 1 + * + * @return mixed The data requested on success + * false on failure */ public function getTemplateData($conv_responses, $thread_level = 1) { @@ -102,7 +109,7 @@ class Item extends BaseObject $result = array(); - $a = $this->get_app(); + $a = $this->getApp(); $item = $this->getData(); $edited = false; @@ -136,7 +143,7 @@ class Item extends BaseObject || strlen($item['deny_cid']) || strlen($item['deny_gid'])))) ? t('Private Message') : false); - $shareable = ((($conv->get_profile_owner() == local_user()) && ($item['private'] != 1)) ? true : false); + $shareable = ((($conv->getProfileOwner() == local_user()) && ($item['private'] != 1)) ? true : false); if (local_user() && link_compare($a->contact['url'], $item['author-link'])) { if ($item["event-id"] != 0) { $edpost = array("events/event/".$item['event-id'], t("Edit")); @@ -153,12 +160,12 @@ class Item extends BaseObject $drop = array( 'dropping' => $dropping, - 'pagedrop' => ((feature_enabled($conv->get_profile_owner(), 'multi_delete')) ? $item['pagedrop'] : ''), + 'pagedrop' => ((feature_enabled($conv->getProfileOwner(), 'multi_delete')) ? $item['pagedrop'] : ''), 'select' => t('Select'), 'delete' => t('Delete'), ); - $filer = (($conv->get_profile_owner() == local_user()) ? t("save to folder") : false); + $filer = (($conv->getProfileOwner() == local_user()) ? t("save to folder") : false); $diff_author = ((link_compare($item['url'], $item['author-link'])) ? false : true); $profile_name = htmlentities(((strlen($item['author-name'])) && $diff_author) ? $item['author-name'] : $item['name']); @@ -179,7 +186,7 @@ class Item extends BaseObject } if (!isset($item['author-thumb']) || ($item['author-thumb'] == "")) { - $author_contact = get_contact_details_by_url($item['author-link'], $conv->get_profile_owner()); + $author_contact = get_contact_details_by_url($item['author-link'], $conv->getProfileOwner()); if ($author_contact["thumb"]) { $item['author-thumb'] = $author_contact["thumb"]; } else { @@ -188,7 +195,7 @@ class Item extends BaseObject } if (!isset($item['owner-thumb']) || ($item['owner-thumb'] == "")) { - $owner_contact = get_contact_details_by_url($item['owner-link'], $conv->get_profile_owner()); + $owner_contact = get_contact_details_by_url($item['owner-link'], $conv->getProfileOwner()); if ($owner_contact["thumb"]) { $item['owner-thumb'] = $owner_contact["thumb"]; } else { @@ -223,7 +230,7 @@ class Item extends BaseObject $response_verbs[] = 'attendyes'; $response_verbs[] = 'attendno'; $response_verbs[] = 'attendmaybe'; - if ($conv->is_writable()) { + if ($conv->isWritable()) { $isevent = true; $attend = array( t('I will attend'), t('I will not attend'), t('I might attend')); } @@ -247,7 +254,7 @@ class Item extends BaseObject } if ($this->isToplevel()) { - if ($conv->get_profile_owner() == local_user()) { + if ($conv->getProfileOwner() == local_user()) { $isstarred = (($item['starred']) ? "starred" : "unstarred"); $star = array( @@ -271,7 +278,7 @@ class Item extends BaseObject } $tagger = ''; - if (feature_enabled($conv->get_profile_owner(), 'commtag')) { + if (feature_enabled($conv->getProfileOwner(), 'commtag')) { $tagger = array( 'add' => t("add tag"), 'class' => "", @@ -282,10 +289,10 @@ class Item extends BaseObject $indent = 'comment'; } - if ($conv->is_writable()) { + if ($conv->isWritable()) { $buttons = array( 'like' => array( t("I like this \x28toggle\x29"), t("like")), - 'dislike' => ((feature_enabled($conv->get_profile_owner(), 'dislike')) ? array( t("I don't like this \x28toggle\x29"), t("dislike")) : ''), + 'dislike' => ((feature_enabled($conv->getProfileOwner(), 'dislike')) ? array( t("I don't like this \x28toggle\x29"), t("dislike")) : ''), ); if ($shareable) { $buttons['share'] = array( t('Share this'), t('share')); @@ -379,12 +386,12 @@ class Item extends BaseObject 'owner_photo' => $a->remove_baseurl(proxy_url($item['owner-thumb'], false, PROXY_SIZE_THUMB)), 'owner_name' => htmlentities($owner_name_e), 'plink' => get_plink($item), - 'edpost' => ((feature_enabled($conv->get_profile_owner(), 'edit_posts')) ? $edpost : ''), + 'edpost' => ((feature_enabled($conv->getProfileOwner(), 'edit_posts')) ? $edpost : ''), 'isstarred' => $isstarred, - 'star' => ((feature_enabled($conv->get_profile_owner(), 'star_posts')) ? $star : ''), - 'ignore' => ((feature_enabled($conv->get_profile_owner(), 'ignore_posts')) ? $ignore : ''), + 'star' => ((feature_enabled($conv->getProfileOwner(), 'star_posts')) ? $star : ''), + 'ignore' => ((feature_enabled($conv->getProfileOwner(), 'ignore_posts')) ? $ignore : ''), 'tagger' => $tagger, - 'filer' => ((feature_enabled($conv->get_profile_owner(), 'filing')) ? $filer : ''), + 'filer' => ((feature_enabled($conv->getProfileOwner(), 'filing')) ? $filer : ''), 'drop' => $drop, 'vote' => $buttons, 'like' => $responses['like']['output'], @@ -392,7 +399,7 @@ class Item extends BaseObject 'responses' => $responses, 'switchcomment' => t('Comment'), 'comment' => $comment, - 'previewing' => ($conv->is_preview() ? ' preview ' : ''), + 'previewing' => ($conv->isPreview() ? ' preview ' : ''), 'wait' => t('Please wait'), 'thread_level' => $thread_level, 'edited' => $edited, @@ -449,11 +456,17 @@ class Item extends BaseObject return $result; } + /** + * @return integer + */ public function getId() { return $this->getDataValue('id'); } + /** + * @return boolean + */ public function isThreaded() { return $this->threaded; @@ -461,6 +474,10 @@ class Item extends BaseObject /** * Add a child item + * + * @param object $item The child item to add + * + * @return mixed */ public function addChild(Item $item) { @@ -489,6 +506,10 @@ class Item extends BaseObject /** * Get a child by its ID + * + * @param integer $id The child id + * + * @return mixed */ public function getChild($id) { @@ -502,7 +523,9 @@ class Item extends BaseObject } /** - * Get all ou children + * Get all our children + * + * @return object */ public function getChildren() { @@ -511,6 +534,10 @@ class Item extends BaseObject /** * Set our parent + * + * @param object $item The item to set as parent + * + * @return void */ protected function setParent($item) { @@ -525,6 +552,8 @@ class Item extends BaseObject /** * Remove our parent + * + * @return void */ protected function removeParent() { @@ -534,6 +563,10 @@ class Item extends BaseObject /** * Remove a child + * + * @param object $item The child to be removed + * + * @return boolean Success or failure */ public function removeChild($item) { @@ -553,6 +586,8 @@ class Item extends BaseObject /** * Get parent item + * + * @return object */ protected function getParent() { @@ -560,11 +595,15 @@ class Item extends BaseObject } /** - * set conversation + * Set conversation + * + * @param object $conv The conversation + * + * @return void */ public function setConversation($conv) { - $previous_mode = ($this->conversation ? $this->conversation->get_mode() : ''); + $previous_mode = ($this->conversation ? $this->conversation->getMode() : ''); $this->conversation = $conv; @@ -575,7 +614,9 @@ class Item extends BaseObject } /** - * get conversation + * Get conversation + * + * @return object */ public function getConversation() { @@ -586,6 +627,8 @@ class Item extends BaseObject * Get raw data * * We shouldn't need this + * + * @return array */ public function getData() { @@ -595,9 +638,10 @@ class Item extends BaseObject /** * Get a data value * - * Returns: - * _ value on success - * _ false on failure + * @param object $name key + * + * @return mixed value on success + * false on failure */ public function getDataValue($name) { @@ -611,6 +655,10 @@ class Item extends BaseObject /** * Set template + * + * @param object $name template name + * + * @return void */ private function setTemplate($name) { @@ -624,6 +672,8 @@ class Item extends BaseObject /** * Get template + * + * @return object */ private function getTemplate() { @@ -632,6 +682,8 @@ class Item extends BaseObject /** * Check if this is a toplevel post + * + * @return boolean */ private function isToplevel() { @@ -640,6 +692,8 @@ class Item extends BaseObject /** * Check if this is writable + * + * @return boolean */ private function isWritable() { @@ -650,18 +704,20 @@ class Item extends BaseObject // and community forums even if somebody else wrote the post. // bug #517 - this fixes for conversation owner - if ($conv->get_mode() == 'profile' && $conv->get_profile_owner() == local_user()) { + if ($conv->getMode() == 'profile' && $conv->getProfileOwner() == local_user()) { return true; } // this fixes for visitors - return ($this->writable || ($this->isVisiting() && $conv->get_mode() == 'profile')); + return ($this->writable || ($this->isVisiting() && $conv->getMode() == 'profile')); } return $this->writable; } /** * Count the total of our descendants + * + * @return integer */ private function countDescendants() { @@ -678,6 +734,8 @@ class Item extends BaseObject /** * Get the template for the comment box + * + * @return string */ private function getCommentBoxTemplate() { @@ -687,13 +745,14 @@ class Item extends BaseObject /** * Get the comment box * - * Returns: - * _ The comment box string (empty if no comment box) - * _ false on failure + * @param string $indent Indent value + * + * @return mixed The comment box string (empty if no comment box) + * false on failure */ private function getCommentBox($indent) { - $a = $this->get_app(); + $a = $this->getApp(); if (!$this->isToplevel() && !(Config::get('system', 'thread_allow') && $a->theme_thread_allow)) { return ''; } @@ -702,11 +761,11 @@ class Item extends BaseObject $conv = $this->getConversation(); $template = get_markup_template($this->getCommentBoxTemplate()); $ww = ''; - if (($conv->get_mode() === 'network') && $this->isWallToWall()) { + if (($conv->getMode() === 'network') && $this->isWallToWall()) { $ww = 'ww'; } - if ($conv->is_writable() && $this->isWritable()) { + if ($conv->isWritable() && $this->isWritable()) { $qc = $qcomment = null; /* @@ -723,13 +782,13 @@ class Item extends BaseObject array( '$return_path' => $a->query_string, '$threaded' => $this->isThreaded(), - // '$jsreload' => (($conv->get_mode() === 'display') ? $_SESSION['return_url'] : ''), + // '$jsreload' => (($conv->getMode() === 'display') ? $_SESSION['return_url'] : ''), '$jsreload' => '', - '$type' => (($conv->get_mode() === 'profile') ? 'wall-comment' : 'net-comment'), + '$type' => (($conv->getMode() === 'profile') ? 'wall-comment' : 'net-comment'), '$id' => $this->getId(), '$parent' => $this->getId(), '$qcomment' => $qcomment, - '$profile_uid' => $conv->get_profile_owner(), + '$profile_uid' => $conv->getProfileOwner(), '$mylink' => $a->remove_baseurl($a->contact['url']), '$mytitle' => t('This is you'), '$myphoto' => $a->remove_baseurl($a->contact['thumb']), @@ -743,10 +802,10 @@ class Item extends BaseObject '$edimg' => t('Image'), '$edurl' => t('Link'), '$edvideo' => t('Video'), - '$preview' => ((feature_enabled($conv->get_profile_owner(), 'preview')) ? t('Preview') : ''), + '$preview' => ((feature_enabled($conv->getProfileOwner(), 'preview')) ? t('Preview') : ''), '$indent' => $indent, '$sourceapp' => t($a->sourcename), - '$ww' => (($conv->get_mode() === 'network') ? $ww : ''), + '$ww' => (($conv->getMode() === 'network') ? $ww : ''), '$rand_num' => random_digits(12)) ); } @@ -754,6 +813,9 @@ class Item extends BaseObject return $comment_box; } + /** + * @return string + */ private function getRedirectUrl() { return $this->redirect_url; @@ -761,15 +823,17 @@ class Item extends BaseObject /** * Check if we are a wall to wall item and set the relevant properties + * + * @return void */ protected function checkWallToWall() { - $a = $this->get_app(); + $a = $this->getApp(); $conv = $this->getConversation(); $this->wall_to_wall = false; if ($this->isToplevel()) { - if ($conv->get_mode() !== 'profile') { + if ($conv->getMode() !== 'profile') { if ($this->getDataValue('wall') && !$this->getDataValue('self')) { // On the network page, I am the owner. On the display page it will be the profile owner. // This will have been stored in $a->page_contact by our calling page. @@ -819,26 +883,41 @@ class Item extends BaseObject } } + /** + * @return boolean + */ private function isWallToWall() { return $this->wall_to_wall; } + /** + * @return string + */ private function getOwnerUrl() { return $this->owner_url; } + /** + * @return string + */ private function getOwnerPhoto() { return $this->owner_photo; } + /** + * @return string + */ private function getOwnerName() { return $this->owner_name; } + /** + * @return boolean + */ private function isVisiting() { return $this->visiting; diff --git a/src/Core/NotificationsManager.php b/src/Core/NotificationsManager.php index ea3d4c0cc..318d5a8e8 100644 --- a/src/Core/NotificationsManager.php +++ b/src/Core/NotificationsManager.php @@ -322,7 +322,7 @@ class NotificationsManager 'link' => System::baseUrl(true).'/display/'.$it['pguid'], 'image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO), 'url' => $it['author-link'], - 'text' => sprintf( t("%s is not attending %s's event"), $it['author-name'], $it['pname']), + 'text' => sprintf(t("%s is not attending %s's event"), $it['author-name'], $it['pname']), 'when' => $default_item_when, 'ago' => $default_item_ago, 'seen' => $it['seen'] @@ -381,9 +381,9 @@ class NotificationsManager /** * @brief Total number of network notifications - * @param int|string $seen - * If 0 only include notifications into the query - * which aren't marked as "seen" + * @param int|string $seen If 0 only include notifications into the query + * which aren't marked as "seen" + * * @return int Number of network notifications */ private function networkTotal($seen = 0) @@ -413,9 +413,8 @@ class NotificationsManager /** * @brief Get network notifications * - * @param int|string $seen - * If 0 only include notifications into the query - * which aren't marked as "seen" + * @param int|string $seen If 0 only include notifications into the query + * which aren't marked as "seen" * @param int $start Start the query at this point * @param int $limit Maximum number of query results * @@ -465,9 +464,9 @@ class NotificationsManager /** * @brief Total number of system notifications - * @param int|string $seen - * If 0 only include notifications into the query - * which aren't marked as "seen" + * @param int|string $seen If 0 only include notifications into the query + * which aren't marked as "seen" + * * @return int Number of system notifications */ private function systemTotal($seen = 0) @@ -493,9 +492,8 @@ class NotificationsManager /** * @brief Get system notifications * - * @param int|string $seen - * If 0 only include notifications into the query - * which aren't marked as "seen" + * @param int|string $seen If 0 only include notifications into the query + * which aren't marked as "seen" * @param int $start Start the query at this point * @param int $limit Maximum number of query results * @@ -541,7 +539,7 @@ class NotificationsManager * * @return string The additional sql query */ - private function _personal_sql_extra() + private function personalSqlExtra() { $myurl = System::baseUrl(true) . '/profile/'. $this->a->user['nickname']; $myurl = substr($myurl, strpos($myurl, '://') + 3); @@ -559,15 +557,15 @@ class NotificationsManager /** * @brief Total number of personal notifications - * @param int|string $seen - * If 0 only include notifications into the query - * which aren't marked as "seen" + * @param int|string $seen If 0 only include notifications into the query + * which aren't marked as "seen" + * * @return int Number of personal notifications */ private function personalTotal($seen = 0) { $sql_seen = ""; - $sql_extra = $this->_personal_sql_extra(); + $sql_extra = $this->personalSqlExtra(); if ($seen === 0) { $sql_seen = " AND `item`.`unseen` = 1 "; @@ -579,7 +577,7 @@ class NotificationsManager WHERE `item`.`visible` = 1 $sql_extra $sql_seen - AND `item`.`deleted` = 0 AND `item`.`uid` = %d AND `item`.`wall` = 0 " , + AND `item`.`deleted` = 0 AND `item`.`uid` = %d AND `item`.`wall` = 0 ", intval(local_user()) ); @@ -593,9 +591,8 @@ class NotificationsManager /** * @brief Get personal notifications * - * @param int|string $seen - * If 0 only include notifications into the query - * which aren't marked as "seen" + * @param int|string $seen If 0 only include notifications into the query + * which aren't marked as "seen" * @param int $start Start the query at this point * @param int $limit Maximum number of query results * @@ -608,7 +605,7 @@ class NotificationsManager { $ident = 'personal'; $total = $this->personalTotal($seen); - $sql_extra = $this->_personal_sql_extra(); + $sql_extra = $this->personalSqlExtra(); $notifs = array(); $sql_seen = ""; @@ -646,9 +643,9 @@ class NotificationsManager /** * @brief Total number of home notifications - * @param int|string $seen - * If 0 only include notifications into the query - * which aren't marked as "seen" + * @param int|string $seen If 0 only include notifications into the query + * which aren't marked as "seen" + * * @return int Number of home notifications */ private function homeTotal($seen = 0) @@ -677,9 +674,8 @@ class NotificationsManager /** * @brief Get home notifications * - * @param int|string $seen - * If 0 only include notifications into the query - * which aren't marked as "seen" + * @param int|string $seen If 0 only include notifications into the query + * which aren't marked as "seen" * @param int $start Start the query at this point * @param int $limit Maximum number of query results * @@ -728,9 +724,9 @@ class NotificationsManager /** * @brief Total number of introductions - * @param bool $all - * If false only include introductions into the query - * which aren't marked as ignored + * @param bool $all If false only include introductions into the query + * which aren't marked as ignored + * * @return int Number of introductions */ private function introTotal($all = false) @@ -757,18 +753,18 @@ class NotificationsManager /** * @brief Get introductions * - * @param bool $all - * If false only include introductions into the query - * which aren't marked as ignored - * @param int $start Start the query at this point - * @param int $limit Maximum number of query results + * @param bool $all If false only include introductions into the query + * which aren't marked as ignored + * @param int $start Start the query at this point + * @param int $limit Maximum number of query results * * @return array with * string 'ident' => Notification identifier * int 'total' => Total number of available introductions * array 'notifications' => Introductions */ - public function introNotifs($all = false, $start = 0, $limit = 80) { + public function introNotifs($all = false, $start = 0, $limit = 80) + { $ident = 'introductions'; $total = $this->introTotal($seen); $notifs = array(); diff --git a/src/Core/PConfig.php b/src/Core/PConfig.php index b60dcd1b3..3467032fa 100644 --- a/src/Core/PConfig.php +++ b/src/Core/PConfig.php @@ -1,4 +1,7 @@ config[$uid]. * - * @param string $uid - * The user_id - * @param string $family - * The category of the configuration value + * @param string $uid The user_id + * @param string $family The category of the configuration value + * * @return void */ - public static function load($uid, $family) { + public static function load($uid, $family) + { $a = get_app(); $r = dba::select('pconfig', array('v', 'k'), array('cat' => $family, 'uid' => $uid)); @@ -57,20 +60,16 @@ class PConfig { * Get a particular user's config value from the given category ($family) * and the $key from a cached storage in $a->config[$uid]. * - * @param string $uid - * The user_id - * @param string $family - * The category of the configuration value - * @param string $key - * The configuration key to query - * @param mixed $default_value optional - * The value to return if key is not set (default: null) - * @param boolean $refresh optional - * If true the config is loaded from the db and not from the cache (default: false) + * @param string $uid The user_id + * @param string $family The category of the configuration value + * @param string $key The configuration key to query + * @param mixed $default_value optional, The value to return if key is not set (default: null) + * @param boolean $refresh optional, If true the config is loaded from the db and not from the cache (default: false) + * * @return mixed Stored value or null if it does not exist */ - public static function get($uid, $family, $key, $default_value = null, $refresh = false) { - + public static function get($uid, $family, $key, $default_value = null, $refresh = false) + { $a = get_app(); if (!$refresh) { @@ -112,18 +111,15 @@ class PConfig { * * @note Please do not store booleans - convert to 0/1 integer values! * - * @param string $uid - * The user_id - * @param string $family - * The category of the configuration value - * @param string $key - * The configuration key to set - * @param string $value - * The value to store + * @param string $uid The user_id + * @param string $family The category of the configuration value + * @param string $key The configuration key to set + * @param string $value The value to store + * * @return mixed Stored $value or false */ - public static function set($uid, $family, $key, $value) { - + public static function set($uid, $family, $key, $value) + { $a = get_app(); // We store our setting values in a string variable. @@ -157,15 +153,14 @@ class PConfig { * Removes the configured value from the stored cache in $a->config[$uid] * and removes it from the database. * - * @param string $uid The user_id - * @param string $family - * The category of the configuration value - * @param string $key - * The configuration key to delete + * @param string $uid The user_id + * @param string $family The category of the configuration value + * @param string $key The configuration key to delete + * * @return mixed */ - public static function delete($uid,$family,$key) { - + public static function delete($uid, $family, $key) + { $a = get_app(); if (x($a->config[$uid][$family], $key)) { diff --git a/src/Core/System.php b/src/Core/System.php index a2c6f6509..45e4f652a 100644 --- a/src/Core/System.php +++ b/src/Core/System.php @@ -1,4 +1,7 @@ get_baseurl($ssl); } @@ -42,21 +48,23 @@ class System { /** * @brief Removes the baseurl from an url. This avoids some mixed content problems. * - * @param string $orig_url + * @param string $orig_url The url to be cleaned * * @return string The cleaned url */ - public static function removedBaseUrl($orig_url) { + public static function removedBaseUrl($orig_url) + { self::init(); return self::$a->remove_baseurl($orig_url); } /** * @brief Returns a string with a callstack. Can be used for logging. - * + * @param integer $depth optional, default 4 * @return string */ - public static function callstack($depth = 4) { + public static function callstack($depth = 4) + { $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); // We remove the first two items from the list since they contain data that we don't need. From 8057afb039b0fbfa0f9e142e36b5a4509c03074b Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Sun, 19 Nov 2017 14:19:03 -0500 Subject: [PATCH 059/175] Function call this one must be coming from boot.php --- src/Core/Conversation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Conversation.php b/src/Core/Conversation.php index 10d0e46f1..ba3302d64 100644 --- a/src/Core/Conversation.php +++ b/src/Core/Conversation.php @@ -165,7 +165,7 @@ class Conversation extends BaseObject */ public function getTemplateData($conv_responses) { - $a = getApp(); + $a = get_app(); $result = array(); $i = 0; From a6d501bc4eb107cf9bca55600ef85d4749bd00a0 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Sun, 19 Nov 2017 16:14:16 -0500 Subject: [PATCH 060/175] Overzealous rename reverted change to function name. --- mod/smilies.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mod/smilies.php b/mod/smilies.php index 50d6836f7..b19ba2e43 100644 --- a/mod/smilies.php +++ b/mod/smilies.php @@ -6,7 +6,11 @@ use Friendica\App; use Friendica\Content\Smilies; -function smiliesContent(App $a) +/** + * @param object $a App + * @return mixed + */ +function smilies_content(App $a) { if ($a->argv[1] === "json") { $tmp = Smilies::getList(); From cabfcfc904ed782f09c91ed35da6b2ad65ce0f09 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 19 Nov 2017 21:21:54 +0000 Subject: [PATCH 061/175] We now are having a "scripts" folder --- boot.php | 12 ---- include/dbstructure.php | 70 ------------------------ {util => scripts}/daemon.php | 0 scripts/dbstructure.php | 63 +++++++++++++++++++++ include/poller.php => scripts/worker.php | 0 src/Core/Worker.php | 2 +- 6 files changed, 64 insertions(+), 83 deletions(-) rename {util => scripts}/daemon.php (100%) create mode 100644 scripts/dbstructure.php rename include/poller.php => scripts/worker.php (100%) diff --git a/boot.php b/boot.php index 402273bdd..0364bd4e7 100644 --- a/boot.php +++ b/boot.php @@ -1064,18 +1064,6 @@ function get_max_import_size() return ((x($a->config, 'max_import_size')) ? $a->config['max_import_size'] : 0 ); } -/** - * @brief compatibilty wrapper for Worker::add function - * - * @param (integer|array) priority or parameter array, strings are deprecated and are ignored - * - * @return boolean "false" if proc_run couldn't be executed - */ -function proc_run() -{ - $proc_args = func_get_args(); - call_user_func_array('Friendica\Core\Worker::add', $proc_args); -} function current_theme() { diff --git a/include/dbstructure.php b/include/dbstructure.php index 1df82b1be..dde3dc6f1 100644 --- a/include/dbstructure.php +++ b/include/dbstructure.php @@ -1757,73 +1757,3 @@ function db_definition() { return($database); } - - -/* - * run from command line - */ -function dbstructure_run(&$argv, &$argc) { - global $a; - - if (empty($a)) { - $a = new App(dirname(__DIR__)); - } - - @include ".htconfig.php"; - require_once "include/dba.php"; - dba::connect($db_host, $db_user, $db_pass, $db_data); - unset($db_host, $db_user, $db_pass, $db_data); - - if ($argc == 2) { - switch ($argv[1]) { - case "dryrun": - update_structure(true, false); - return; - case "update": - update_structure(true, true); - - $build = Config::get('system','build'); - if (!x($build)) { - Config::set('system', 'build', DB_UPDATE_VERSION); - $build = DB_UPDATE_VERSION; - } - - $stored = intval($build); - $current = intval(DB_UPDATE_VERSION); - - // run any left update_nnnn functions in update.php - for ($x = $stored; $x < $current; $x ++) { - $r = run_update_function($x); - if (!$r) { - break; - } - } - - Config::set('system','build',DB_UPDATE_VERSION); - return; - case "dumpsql": - print_structure(db_definition()); - return; - case "toinnodb": - convert_to_innodb(); - return; - } - } - - - // print help - echo $argv[0]." \n"; - echo "\n"; - echo "Commands:\n"; - echo "dryrun show database update schema queries without running them\n"; - echo "update update database schema\n"; - echo "dumpsql dump database schema\n"; - echo "toinnodb convert all tables from MyISAM to InnoDB\n"; - return; - -} - -if (array_search(__FILE__,get_included_files())===0) { - dbstructure_run($_SERVER["argv"],$_SERVER["argc"]); - killme(); -} diff --git a/util/daemon.php b/scripts/daemon.php similarity index 100% rename from util/daemon.php rename to scripts/daemon.php diff --git a/scripts/dbstructure.php b/scripts/dbstructure.php new file mode 100644 index 000000000..cf14c929f --- /dev/null +++ b/scripts/dbstructure.php @@ -0,0 +1,63 @@ +\n"; +echo "\n"; +echo "Commands:\n"; +echo "dryrun show database update schema queries without running them\n"; +echo "update update database schema\n"; +echo "dumpsql dump database schema\n"; +echo "toinnodb convert all tables from MyISAM to InnoDB\n"; +killme(); + diff --git a/include/poller.php b/scripts/worker.php similarity index 100% rename from include/poller.php rename to scripts/worker.php diff --git a/src/Core/Worker.php b/src/Core/Worker.php index 9e69d4173..e949ff2da 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -912,7 +912,7 @@ class Worker { } public static function spawnWorker() { - $args = array("include/poller.php", "no_cron"); + $args = array("scripts/worker.php", "no_cron"); get_app()->proc_run($args); } From 920160cb28135e33b35a9ada579ca5393be000a5 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 19 Nov 2017 21:47:21 +0000 Subject: [PATCH 062/175] The poller is now the worker --- INSTALL.txt | 8 ++++---- boot.php | 2 +- doc/Install.md | 8 ++++---- doc/Message-Flow.md | 4 ++-- doc/de/Install.md | 4 ++-- doc/de/Message-Flow.md | 2 +- doc/htconfig.md | 4 ++-- include/uimport.php | 2 +- mod/admin.php | 4 ++-- mod/install.php | 4 ++-- mod/worker.php | 2 +- src/Core/Worker.php | 20 ++++++++++---------- src/Worker/OnePoll.php | 16 ++++++++-------- util/vagrant_provision.sh | 2 +- 14 files changed, 41 insertions(+), 41 deletions(-) diff --git a/INSTALL.txt b/INSTALL.txt index 4a88ac841..7ec862dc6 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -105,14 +105,14 @@ tables, so that you can start fresh. 8. Set up a cron job or scheduled task to run the poller once every 5-10 minutes to pick up the recent "public" postings of your friends. Example: - cd /base/directory; /path/to/php include/poller.php + cd /base/directory; /path/to/php scripts/worker.php Change "/base/directory", and "/path/to/php" as appropriate for your situation. If you are using a Linux server, run "crontab -e" and add a line like the one shown, substituting for your unique paths and settings: -*/10 * * * * cd /home/myname/mywebsite; /usr/bin/php include/poller.php +*/10 * * * * cd /home/myname/mywebsite; /usr/bin/php scripts/worker.php You can generally find the location of PHP by executing "which php". If you have troubles with this section please contact your hosting provider for @@ -285,14 +285,14 @@ cron by using something like */10 * * * * cd /var/www/friendica/friendica/ && sudo -u www-data /usr/bin/php -d suhosin.executor.func.blacklist=none -d suhosin.executor.eval.blacklist=none --f include/poller.php +-f scripts/worker.php This worked well for simple test cases, but the friendica-cron still failed with a fatal error: suhosin[22962]: ALERT - function within blacklist called: proc_open() (attacker 'REMOTE_ADDR not set', file '/var/www/friendica/friendica/boot.php', line 1341) -After a while I noticed, that include/poller.php calls further php script via +After a while I noticed, that scripts/worker.php calls further php script via proc_open. These scripts themselves also use proc_open and fail, because they are NOT called with -d suhosin.executor.func.blacklist=none. diff --git a/boot.php b/boot.php index 0364bd4e7..ce96aa5ab 100644 --- a/boot.php +++ b/boot.php @@ -618,7 +618,7 @@ function is_ajax() /** * @brief Function to check if request was an AJAX (xmlhttprequest) request. * - * @param boolean $via_worker boolean Is the check run via the poller? + * @param boolean $via_worker boolean Is the check run via the worker? */ function check_db($via_worker) { diff --git a/doc/Install.md b/doc/Install.md index 9b7b5a947..8f6067a87 100644 --- a/doc/Install.md +++ b/doc/Install.md @@ -94,19 +94,19 @@ Registration errors should all be recoverable automatically. If you get any *critical* failure at this point, it generally indicates the database was not installed correctly. You might wish to move/rename .htconfig.php to another name and empty (called 'dropping') the database tables, so that you can start fresh. -###Set up the poller +###Set up the worker -Set up a cron job or scheduled task to run the poller once every 5-10 minutes in order to perform background processing. +Set up a cron job or scheduled task to run the worker once every 5-10 minutes in order to perform background processing. Example: - cd /base/directory; /path/to/php include/poller.php + cd /base/directory; /path/to/php scripts/worker.php Change "/base/directory", and "/path/to/php" as appropriate for your situation. If you are using a Linux server, run "crontab -e" and add a line like the one shown, substituting for your unique paths and settings: - */10 * * * * cd /home/myname/mywebsite; /usr/bin/php include/poller.php + */10 * * * * cd /home/myname/mywebsite; /usr/bin/php scripts/worker.php You can generally find the location of PHP by executing "which php". If you run into trouble with this section please contact your hosting provider for assistance. diff --git a/doc/Message-Flow.md b/doc/Message-Flow.md index 9a6785d59..9692ae88c 100644 --- a/doc/Message-Flow.md +++ b/doc/Message-Flow.md @@ -19,7 +19,7 @@ Salmon notifications arrive via mod/salmon.php. Push (pubsubhubbub) feeds arrive via mod/pubsub.php -DFRN-poll feed imports arrive via include/poller.php as a scheduled task, this implements the local side of the DFRN-poll protocol. +DFRN-poll feed imports arrive via src/Worker/OnePoll.php as a scheduled task, this implements the local side of the DFRN-poll protocol. ### Scenario #1. Bob posts a public status message @@ -28,7 +28,7 @@ There are two paths it can take - as a bbcode path to DFRN clients, and converte When a PuSH hub is operational, dfrn-poll clients prefer to receive their information through the PuSH channel. They will fall back on a daily poll in case the hub has delivery issues (this is quite common when using the default Google reference hub). If there is no specified hub or hubs, DFRN clients will poll at a configurable (per-contact) rate at up to 5-minute intervals. -Feeds retrieved via dfrn-poll are bbcode and may also contain private conversations which the poller has permissions to see. +Feeds retrieved via dfrn-poll are bbcode and may also contain private conversations which the worker has permissions to see. ### Scenario #2. Jack replies to Bob's public message. Jack is on the Friendica/DFRN network. diff --git a/doc/de/Install.md b/doc/de/Install.md index 2c06d797c..20c479e1c 100644 --- a/doc/de/Install.md +++ b/doc/de/Install.md @@ -84,13 +84,13 @@ Wenn du irgendwelche **kritischen** Fehler zu diesen Zeitpunkt erhalten solltest 7. Erstelle einen Cron job oder einen regelmäßigen Task, um den Poller alle 5-10 Minuten im Hintergrund ablaufen zu lassen. Beispiel: - `cd /base/directory; /path/to/php include/poller.php` + `cd /base/directory; /path/to/php scripts/worker.php` Ändere "/base/directory" und "/path/to/php" auf deine Systemvorgaben. Wenn du einen Linux-Server nutzt, benutze den Befehl "crontab -e" und ergänze eine Zeile wie die Folgende; angepasst an dein System -`*/10 * * * * cd /home/myname/mywebsite; /usr/bin/php include/poller.php` +`*/10 * * * * cd /home/myname/mywebsite; /usr/bin/php scripts/worker.php` Du kannst den PHP-Pfad finden, indem du den Befehl „which php“ ausführst. Wenn du Schwierigkeiten mit diesem Schritt hast, kannst du deinen Hosting-Anbieter kontaktieren. diff --git a/doc/de/Message-Flow.md b/doc/de/Message-Flow.md index 3d4c912cc..8ef8704d1 100644 --- a/doc/de/Message-Flow.md +++ b/doc/de/Message-Flow.md @@ -21,7 +21,7 @@ Salmon-Benachrichtigungen kommen via mod/salmon.php an. PuSh-Feeds (pubsubhubbub) kommen via mod/pubsub.php an. -DFRN-poll Feed-Imports kommen via include/poller.php als geplanter Task an, das implementiert die lokale Bearbeitung (local side) des DFRN-Protokolls. +DFRN-poll Feed-Imports kommen via src/Worker/OnePoll.php als geplanter Task an, das implementiert die lokale Bearbeitung (local side) des DFRN-Protokolls. ### Szenario #1. Bob schreibt eine öffentliche Statusnachricht diff --git a/doc/htconfig.md b/doc/htconfig.md index 684be22fb..9e0a2184d 100644 --- a/doc/htconfig.md +++ b/doc/htconfig.md @@ -50,8 +50,8 @@ Example: To set the directory value please add this line to your .htconfig.php: * **local_block** (Boolean) - Used in conjunction with "block_public". * **local_search** (Boolean) - Blocks search for users who are not logged in to prevent crawlers from blocking your system. * **local_tags** (Boolean) - If activated, all hashtags will point to the local server. -* **max_connections** - The maximum number of database connections which can be in use before the poller process is deferred to it's next interval. When the system can't detect the maximum numbers of connection then this value can be used. -* **max_connections_level** - The maximum level of connections that are allowed to let the poller start. It is a percentage value. Default value is 75. +* **max_connections** - The maximum number of database connections which can be in use before the worker process is deferred to it's next interval. When the system can't detect the maximum numbers of connection then this value can be used. +* **max_connections_level** - The maximum level of connections that are allowed to let the worker start. It is a percentage value. Default value is 75. * **max_contact_queue** - Default value is 500. * **max_batch_queue** - Default value is 1000. * **max_processes_backend** - Maximum number of concurrent database processes for background tasks. Default value is 5. diff --git a/include/uimport.php b/include/uimport.php index e0edb7091..93f978c07 100644 --- a/include/uimport.php +++ b/include/uimport.php @@ -189,7 +189,7 @@ function import_account(App $a, $file) { } } if ($contact['uid'] == $olduid && $contact['self'] == '0') { - // set contacts 'avatar-date' to NULL_DATE to let poller to update urls + // set contacts 'avatar-date' to NULL_DATE to let worker to update urls $contact["avatar-date"] = NULL_DATE; switch ($contact['network']) { diff --git a/mod/admin.php b/mod/admin.php index ee456a23f..7bb683fe8 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -1237,7 +1237,7 @@ function admin_page_site(App $a) { '$timeout' => array('timeout', t("Network timeout"), (x(Config::get('system','curl_timeout'))?Config::get('system','curl_timeout'):60), t("Value is in seconds. Set to 0 for unlimited (not recommended).")), '$maxloadavg' => array('maxloadavg', t("Maximum Load Average"), ((intval(Config::get('system','maxloadavg')) > 0)?Config::get('system','maxloadavg'):50), t("Maximum system load before delivery and poll processes are deferred - default 50.")), '$maxloadavg_frontend' => array('maxloadavg_frontend', t("Maximum Load Average (Frontend)"), ((intval(Config::get('system','maxloadavg_frontend')) > 0)?Config::get('system','maxloadavg_frontend'):50), t("Maximum system load before the frontend quits service - default 50.")), - '$min_memory' => array('min_memory', t("Minimal Memory"), ((intval(Config::get('system','min_memory')) > 0)?Config::get('system','min_memory'):0), t("Minimal free memory in MB for the poller. Needs access to /proc/meminfo - default 0 (deactivated).")), + '$min_memory' => array('min_memory', t("Minimal Memory"), ((intval(Config::get('system','min_memory')) > 0)?Config::get('system','min_memory'):0), t("Minimal free memory in MB for the worker. Needs access to /proc/meminfo - default 0 (deactivated).")), '$optimize_max_tablesize'=> array('optimize_max_tablesize', t("Maximum table size for optimization"), $optimize_max_tablesize, t("Maximum table size (in MB) for the automatic optimization - default 100 MB. Enter -1 to disable it.")), '$optimize_fragmentation'=> array('optimize_fragmentation', t("Minimum level of fragmentation"), ((intval(Config::get('system','optimize_fragmentation')) > 0)?Config::get('system','optimize_fragmentation'):30), t("Minimum fragmenation level to start the automatic optimization - default value is 30%.")), @@ -1264,7 +1264,7 @@ function admin_page_site(App $a) { '$rino' => array('rino', t("RINO Encryption"), intval(Config::get('system','rino_encrypt')), t("Encryption layer between nodes."), array("Disabled", "RINO1 (deprecated)", "RINO2")), '$worker_queues' => array('worker_queues', t("Maximum number of parallel workers"), Config::get('system','worker_queues'), t("On shared hosters set this to 2. On larger systems, values of 10 are great. Default value is 4.")), - '$worker_dont_fork' => array('worker_dont_fork', t("Don't use 'proc_open' with the worker"), Config::get('system','worker_dont_fork'), t("Enable this if your system doesn't allow the use of 'proc_open'. This can happen on shared hosters. If this is enabled you should increase the frequency of poller calls in your crontab.")), + '$worker_dont_fork' => array('worker_dont_fork', t("Don't use 'proc_open' with the worker"), Config::get('system','worker_dont_fork'), t("Enable this if your system doesn't allow the use of 'proc_open'. This can happen on shared hosters. If this is enabled you should increase the frequency of worker calls in your crontab.")), '$worker_fastlane' => array('worker_fastlane', t("Enable fastlane"), Config::get('system','worker_fastlane'), t("When enabed, the fastlane mechanism starts an additional worker if processes with higher priority are blocked by processes of lower priority.")), '$worker_frontend' => array('worker_frontend', t('Enable frontend worker'), Config::get('system','frontend_worker'), sprintf(t('When enabled the Worker process is triggered when backend access is performed (e.g. messages being delivered). On smaller sites you might want to call %s/worker on a regular basis via an external cron job. You should only enable this option if you cannot utilize cron/scheduled jobs on your server.'), System::baseUrl())), diff --git a/mod/install.php b/mod/install.php index 2d0362c95..9c9d60eef 100755 --- a/mod/install.php +++ b/mod/install.php @@ -317,7 +317,7 @@ function check_php(&$phpath, &$checks) { $help = ""; if (!$passed) { $help .= t('Could not find a command line version of PHP in the web server PATH.'). EOL; - $help .= t("If you don't have a command line version of PHP installed on server, you will not be able to run the background processing. See 'Setup the poller'") . EOL; + $help .= t("If you don't have a command line version of PHP installed on server, you will not be able to run the background processing. See 'Setup the worker'") . EOL; $help .= EOL . EOL; $tpl = get_markup_template('field_input.tpl'); $help .= replace_macros($tpl, array( @@ -545,7 +545,7 @@ function what_next() { $baseurl = System::baseUrl(); return t('

What next

') - ."

".t('IMPORTANT: You will need to [manually] setup a scheduled task for the poller.') + ."

".t('IMPORTANT: You will need to [manually] setup a scheduled task for the worker.') .t('Please see the file "INSTALL.txt".') ."

" .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/worker.php b/mod/worker.php index f540010bd..d6ecbecc2 100644 --- a/mod/worker.php +++ b/mod/worker.php @@ -1,7 +1,7 @@ ($starttime + 300)) { logger('Process lifetime reached, quitting.', LOGGER_DEBUG); return; @@ -152,7 +152,7 @@ class Worker { /** * @brief Returns the highest priority in the worker queue that isn't executed * - * @return integer Number of active poller processes + * @return integer Number of active worker processes */ private static function highestPriority() { $condition = array("`executed` <= ? AND NOT `done`", NULL_DATE); @@ -431,7 +431,7 @@ class Worker { // Fetch the max value from the config. This is needed when the system cannot detect the correct value by itself. $max = Config::get("system", "max_connections"); - // Fetch the percentage level where the poller will get active + // Fetch the percentage level where the worker will get active $maxlevel = Config::get("system", "max_connections_level", 75); if ($max == 0) { @@ -636,9 +636,9 @@ class Worker { } /** - * @brief Returns the number of active poller processes + * @brief Returns the number of active worker processes * - * @return integer Number of active poller processes + * @return integer Number of active worker processes */ private static function activeWorkers() { $workers = dba::fetch_first("SELECT COUNT(*) AS `processes` FROM `process` WHERE `command` = 'Worker.php'"); @@ -840,7 +840,7 @@ class Worker { return; } - // Do we have "proc_open"? Then we can fork the poller + // Do we have "proc_open"? Then we can fork the worker if (function_exists("proc_open")) { // When was the last time that we called the worker? // Less than one minute? Then we quit @@ -861,7 +861,7 @@ class Worker { self::runCron(); - logger('Call poller', LOGGER_DEBUG); + logger('Call worker', LOGGER_DEBUG); self::spawnWorker(); return; } @@ -999,7 +999,7 @@ class Worker { dba::insert('workerqueue', array('parameter' => $parameters, 'created' => $created, 'priority' => $priority)); } - // Should we quit and wait for the poller to be called as a cronjob? + // Should we quit and wait for the worker to be called as a cronjob? if ($dont_fork) { return true; } @@ -1017,7 +1017,7 @@ class Worker { return true; } - // Now call the poller to execute the jobs that we just added to the queue + // Now call the worker to execute the jobs that we just added to the queue self::spawnWorker(); return true; diff --git a/src/Worker/OnePoll.php b/src/Worker/OnePoll.php index 11e7d30c3..374c69f13 100644 --- a/src/Worker/OnePoll.php +++ b/src/Worker/OnePoll.php @@ -190,7 +190,7 @@ Class OnePoll if (!strlen($handshake_xml) || ($html_code >= 400) || !$html_code) { - logger("poller: $url appears to be dead - marking for death "); + logger("$url appears to be dead - marking for death "); // dead connection - might be a transient event, or this might // mean the software was uninstalled or the domain expired. @@ -206,7 +206,7 @@ Class OnePoll } if (!strstr($handshake_xml, '<')) { - logger('poller: response from ' . $url . ' did not contain XML.'); + logger('response from ' . $url . ' did not contain XML.'); mark_for_death($contact); @@ -220,7 +220,7 @@ Class OnePoll $res = parse_xml_string($handshake_xml); if (intval($res->status) == 1) { - logger("poller: $url replied status 1 - marking for death "); + logger("$url replied status 1 - marking for death "); // we may not be friends anymore. Will keep trying for one month. // set the last-update so we don't keep polling @@ -229,7 +229,7 @@ Class OnePoll mark_for_death($contact); } elseif ($contact['term-date'] > NULL_DATE) { - logger("poller: $url back from the dead - removing mark for death"); + logger("$url back from the dead - removing mark for death"); unmark_for_death($contact); } @@ -264,7 +264,7 @@ Class OnePoll } if ($final_dfrn_id != $orig_id) { - logger('poller: ID did not decode: ' . $contact['id'] . ' orig: ' . $orig_id . ' final: ' . $final_dfrn_id); + logger('ID did not decode: ' . $contact['id'] . ' orig: ' . $orig_id . ' final: ' . $final_dfrn_id); // did not decode properly - cannot trust this site return; } @@ -555,9 +555,9 @@ Class OnePoll } if ($xml) { - logger('poller: received xml : ' . $xml, LOGGER_DATA); + logger('received xml : ' . $xml, LOGGER_DATA); if (!strstr($xml, '<')) { - logger('poller: post_handshake: response from ' . $url . ' did not contain XML.'); + logger('post_handshake: response from ' . $url . ' did not contain XML.'); $fields = array('last-update' => datetime_convert(), 'failure_update' => datetime_convert()); dba::update('contact', $fields, array('id' => $contact['id'])); @@ -590,7 +590,7 @@ Class OnePoll logger("Contact ".$contact['id']." returned hub: ".$hub." Network: ".$contact['network']." Relation: ".$contact['rel']." Update: ".$hub_update); if (strlen($hub) && $hub_update && (($contact['rel'] != CONTACT_IS_FOLLOWER) || $contact['network'] == NETWORK_FEED)) { - logger('poller: hub ' . $hubmode . ' : ' . $hub . ' contact name : ' . $contact['name'] . ' local user : ' . $importer['name']); + logger('hub ' . $hubmode . ' : ' . $hub . ' contact name : ' . $contact['name'] . ' local user : ' . $importer['name']); $hubs = explode(',', $hub); if (count($hubs)) { foreach ($hubs as $h) { diff --git a/util/vagrant_provision.sh b/util/vagrant_provision.sh index bf2599445..2029d97d5 100644 --- a/util/vagrant_provision.sh +++ b/util/vagrant_provision.sh @@ -88,7 +88,7 @@ echo "create database friendica DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_ge $MYSQL -uroot -proot friendica < /vagrant/friendica_test_data.sql # create cronjob - activate if you have enough memory in you dev VM -echo "*/10 * * * * cd /vagrant; /usr/bin/php include/poller.php" >> friendicacron +echo "*/10 * * * * cd /vagrant; /usr/bin/php scripts/worker.php" >> friendicacron sudo crontab friendicacron sudo rm friendicacron From f43aaf5227af34b870bae3715f2cb1de293aa272 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 19 Nov 2017 16:50:49 -0500 Subject: [PATCH 063/175] Move Item and Conversation from Core to Object - Move BaseObject from Core\ to Friendica\ --- include/conversation.php | 4 ++-- index.php | 2 +- src/{Core => }/BaseObject.php | 8 ++++---- src/{Core => Object}/Conversation.php | 12 ++++++------ src/{Core => Object}/Item.php | 20 ++++++++++---------- 5 files changed, 23 insertions(+), 23 deletions(-) rename src/{Core => }/BaseObject.php (79%) rename src/{Core => Object}/Conversation.php (96%) rename src/{Core => Object}/Item.php (98%) diff --git a/include/conversation.php b/include/conversation.php index 218d7405b..3eae184a8 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -4,11 +4,11 @@ */ use Friendica\App; use Friendica\Core\Config; -use Friendica\Core\Conversation; -use Friendica\Core\Item; use Friendica\Core\PConfig; use Friendica\Core\System; use Friendica\Database\DBM; +use Friendica\Object\Conversation; +use Friendica\Object\Item; require_once "include/bbcode.php"; require_once "include/acl_selectors.php"; diff --git a/index.php b/index.php index 5e8860afd..0290a38be 100644 --- a/index.php +++ b/index.php @@ -9,7 +9,7 @@ */ use Friendica\App; -use Friendica\Core\BaseObject; +use Friendica\BaseObject; use Friendica\Core\System; use Friendica\Core\Config; use Friendica\Core\Worker; diff --git a/src/Core/BaseObject.php b/src/BaseObject.php similarity index 79% rename from src/Core/BaseObject.php rename to src/BaseObject.php index d6ea17f70..01957164c 100644 --- a/src/Core/BaseObject.php +++ b/src/BaseObject.php @@ -1,8 +1,8 @@ getApp(); + $a = self::getApp(); switch ($mode) { case 'network': @@ -165,7 +165,7 @@ class Conversation extends BaseObject */ public function getTemplateData($conv_responses) { - $a = get_app(); + $a = self::getApp(); $result = array(); $i = 0; diff --git a/src/Core/Item.php b/src/Object/Item.php similarity index 98% rename from src/Core/Item.php rename to src/Object/Item.php index 24e524d2e..082ecae03 100644 --- a/src/Core/Item.php +++ b/src/Object/Item.php @@ -1,14 +1,14 @@ getApp(); + $a = self::getApp(); $this->data = $data; $this->setTemplate('wall'); @@ -109,7 +109,7 @@ class Item extends BaseObject $result = array(); - $a = $this->getApp(); + $a = self::getApp(); $item = $this->getData(); $edited = false; @@ -186,7 +186,7 @@ class Item extends BaseObject } if (!isset($item['author-thumb']) || ($item['author-thumb'] == "")) { - $author_contact = get_contact_details_by_url($item['author-link'], $conv->getProfileOwner()); + $author_contact = Contact::getDetailsByURL($item['author-link'], $conv->getProfileOwner()); if ($author_contact["thumb"]) { $item['author-thumb'] = $author_contact["thumb"]; } else { @@ -195,7 +195,7 @@ class Item extends BaseObject } if (!isset($item['owner-thumb']) || ($item['owner-thumb'] == "")) { - $owner_contact = get_contact_details_by_url($item['owner-link'], $conv->getProfileOwner()); + $owner_contact = Contact::getDetailsByURL($item['owner-link'], $conv->getProfileOwner()); if ($owner_contact["thumb"]) { $item['owner-thumb'] = $owner_contact["thumb"]; } else { @@ -752,7 +752,7 @@ class Item extends BaseObject */ private function getCommentBox($indent) { - $a = $this->getApp(); + $a = self::getApp(); if (!$this->isToplevel() && !(Config::get('system', 'thread_allow') && $a->theme_thread_allow)) { return ''; } @@ -828,7 +828,7 @@ class Item extends BaseObject */ protected function checkWallToWall() { - $a = $this->getApp(); + $a = self::getApp(); $conv = $this->getConversation(); $this->wall_to_wall = false; From b92fc24ff06681f445edff0d45f8f81a7e25ebe6 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 19 Nov 2017 16:55:28 -0500 Subject: [PATCH 064/175] Add Contact Object - Add Profile Object - Add User Model - Add use statements --- boot.php | 1 + include/acl_selectors.php | 1 + include/api.php | 1 + include/bb2diaspora.php | 1 + include/bbcode.php | 1 + include/conversation.php | 1 + include/identity.php | 1 + include/items.php | 1 + include/like.php | 1 + include/post_update.php | 1 + include/threads.php | 1 + mod/admin.php | 1 + mod/allfriends.php | 1 + mod/cal.php | 1 + mod/common.php | 1 + mod/contacts.php | 1 + mod/crepair.php | 1 + mod/dfrn_notify.php | 1 + mod/directory.php | 1 + mod/dirfind.php | 1 + mod/display.php | 1 + mod/follow.php | 1 + mod/hovercard.php | 1 + mod/item.php | 1 + mod/match.php | 1 + mod/message.php | 1 + mod/network.php | 1 + mod/nogroup.php | 1 + mod/photos.php | 1 + mod/ping.php | 1 + mod/profiles.php | 1 + mod/randprof.php | 1 + mod/removeme.php | 1 + mod/suggest.php | 1 + mod/unfollow.php | 1 + mod/videos.php | 1 + mod/viewcontacts.php | 1 + src/Core/NotificationsManager.php | 1 + src/Model/GlobalContact.php | 1 + src/Model/User.php | 50 ++ src/Network/Probe.php | 1 + src/Object/Contact.php | 830 ++++++++++++++++++++++++++++++ src/Object/Profile.php | 46 ++ src/Protocol/DFRN.php | 4 +- src/Protocol/Diaspora.php | 2 + src/Protocol/OStatus.php | 1 + src/Protocol/PortableContact.php | 1 + src/Worker/Delivery.php | 1 + src/Worker/Notifier.php | 1 + src/Worker/OnePoll.php | 1 + 50 files changed, 976 insertions(+), 1 deletion(-) create mode 100644 src/Model/User.php create mode 100644 src/Object/Contact.php create mode 100644 src/Object/Profile.php diff --git a/boot.php b/boot.php index 402273bdd..698587eb5 100644 --- a/boot.php +++ b/boot.php @@ -27,6 +27,7 @@ use Friendica\Core\Config; use Friendica\Core\PConfig; use Friendica\Core\Worker; use Friendica\Database\DBM; +use Friendica\Object\Contact; use Friendica\Util\Lock; require_once 'include/network.php'; diff --git a/include/acl_selectors.php b/include/acl_selectors.php index a18a1b33a..f20668578 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -8,6 +8,7 @@ use Friendica\App; use Friendica\Core\Config; use Friendica\Database\DBM; use Friendica\Model\GlobalContact; +use Friendica\Object\Contact; require_once "include/contact_selectors.php"; require_once "include/contact_widgets.php"; diff --git a/include/api.php b/include/api.php index d25aeb8c5..730352423 100644 --- a/include/api.php +++ b/include/api.php @@ -12,6 +12,7 @@ use Friendica\Core\Config; use Friendica\Core\NotificationsManager; use Friendica\Core\Worker; use Friendica\Database\DBM; +use Friendica\Object\Contact; use Friendica\Protocol\Diaspora; use Friendica\Util\XML; diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index 20309b9d2..2188cf8c7 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -3,6 +3,7 @@ use Friendica\App; use Friendica\Core\System; use Friendica\Network\Probe; +use Friendica\Object\Contact; use League\HTMLToMarkdown\HtmlConverter; diff --git a/include/bbcode.php b/include/bbcode.php index 89311e775..609ca922b 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -5,6 +5,7 @@ use Friendica\Content\Smilies; use Friendica\Core\Cache; use Friendica\Core\System; use Friendica\Core\Config; +use Friendica\Object\Contact; require_once 'include/oembed.php'; require_once 'include/event.php'; diff --git a/include/conversation.php b/include/conversation.php index 3eae184a8..aea085569 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -7,6 +7,7 @@ use Friendica\Core\Config; use Friendica\Core\PConfig; use Friendica\Core\System; use Friendica\Database\DBM; +use Friendica\Object\Contact; use Friendica\Object\Conversation; use Friendica\Object\Item; diff --git a/include/identity.php b/include/identity.php index 6991a8dcc..31c17ef21 100644 --- a/include/identity.php +++ b/include/identity.php @@ -10,6 +10,7 @@ use Friendica\Core\PConfig; use Friendica\Core\System; use Friendica\Core\Worker; use Friendica\Database\DBM; +use Friendica\Object\Contact; require_once 'include/ForumManager.php'; require_once 'include/bbcode.php'; diff --git a/include/items.php b/include/items.php index ed2204f60..63ecc791b 100644 --- a/include/items.php +++ b/include/items.php @@ -12,6 +12,7 @@ use Friendica\Core\Worker; use Friendica\Core\System; use Friendica\Database\DBM; use Friendica\Model\GlobalContact; +use Friendica\Object\Contact; use Friendica\Protocol\DFRN; use Friendica\Protocol\OStatus; use Friendica\Util\Lock; diff --git a/include/like.php b/include/like.php index 5e05121f6..e8d69689b 100644 --- a/include/like.php +++ b/include/like.php @@ -4,6 +4,7 @@ use Friendica\App; use Friendica\Core\System; use Friendica\Core\Worker; use Friendica\Database\DBM; +use Friendica\Object\Contact; use Friendica\Protocol\Diaspora; /** diff --git a/include/post_update.php b/include/post_update.php index 8a346b7a2..f77cb0184 100644 --- a/include/post_update.php +++ b/include/post_update.php @@ -6,6 +6,7 @@ use Friendica\Core\Config; use Friendica\Database\DBM; use Friendica\Model\GlobalContact; +use Friendica\Object\Contact; /** * @brief Calls the post update functions diff --git a/include/threads.php b/include/threads.php index 16d4915fd..a1a6c7825 100644 --- a/include/threads.php +++ b/include/threads.php @@ -3,6 +3,7 @@ use Friendica\App; use Friendica\Core\System; use Friendica\Database\DBM; +use Friendica\Object\Contact; function add_thread($itemid, $onlyshadow = false) { $items = q("SELECT `uid`, `created`, `edited`, `commented`, `received`, `changed`, `wall`, `private`, `pubmail`, diff --git a/mod/admin.php b/mod/admin.php index ee456a23f..67313e060 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -11,6 +11,7 @@ use Friendica\Core\System; use Friendica\Core\Config; use Friendica\Core\Worker; use Friendica\Database\DBM; +use Friendica\Model\User; require_once("include/enotify.php"); require_once("include/text.php"); diff --git a/mod/allfriends.php b/mod/allfriends.php index 0a6989e4d..13a85e6aa 100644 --- a/mod/allfriends.php +++ b/mod/allfriends.php @@ -6,6 +6,7 @@ use Friendica\App; use Friendica\Core\System; use Friendica\Database\DBM; use Friendica\Model\GlobalContact; +use Friendica\Object\Contact; require_once 'include/Contact.php'; require_once 'include/contact_selectors.php'; diff --git a/mod/cal.php b/mod/cal.php index 1bfc8d95d..f3cb9f633 100644 --- a/mod/cal.php +++ b/mod/cal.php @@ -11,6 +11,7 @@ use Friendica\Core\Config; use Friendica\Core\PConfig; use Friendica\Core\System; use Friendica\Database\DBM; +use Friendica\Object\Contact; require_once('include/event.php'); require_once('include/redir.php'); diff --git a/mod/common.php b/mod/common.php index ab5343093..94c884771 100644 --- a/mod/common.php +++ b/mod/common.php @@ -5,6 +5,7 @@ use Friendica\App; use Friendica\Database\DBM; use Friendica\Model\GlobalContact; +use Friendica\Object\Contact; require_once 'include/Contact.php'; require_once 'include/contact_selectors.php'; diff --git a/mod/contacts.php b/mod/contacts.php index 10a4f6b1b..dba7680ba 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -6,6 +6,7 @@ use Friendica\Core\Worker; use Friendica\Database\DBM; use Friendica\Model\GlobalContact; use Friendica\Network\Probe; +use Friendica\Object\Contact; require_once 'include/Contact.php'; require_once 'include/contact_selectors.php'; diff --git a/mod/crepair.php b/mod/crepair.php index a73429e15..f9c25845d 100644 --- a/mod/crepair.php +++ b/mod/crepair.php @@ -3,6 +3,7 @@ use Friendica\App; use Friendica\Core\Config; use Friendica\Database\DBM; +use Friendica\Object\Contact; require_once("include/contact_selectors.php"); require_once("mod/contacts.php"); diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 15cda13ad..74f6d4e9f 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -9,6 +9,7 @@ use Friendica\App; use Friendica\Core\Config; use Friendica\Database\DBM; +use Friendica\Object\Contact; use Friendica\Protocol\DFRN; require_once 'include/items.php'; diff --git a/mod/directory.php b/mod/directory.php index b32a58b35..269dc03d3 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -3,6 +3,7 @@ use Friendica\App; use Friendica\Core\Config; use Friendica\Database\DBM; +use Friendica\Object\Contact; function directory_init(App $a) { $a->set_pager_itemspage(60); diff --git a/mod/dirfind.php b/mod/dirfind.php index 89df7c885..c8a9709ab 100644 --- a/mod/dirfind.php +++ b/mod/dirfind.php @@ -8,6 +8,7 @@ use Friendica\Core\System; use Friendica\Core\Worker; use Friendica\Model\GlobalContact; use Friendica\Network\Probe; +use Friendica\Object\Contact; use Friendica\Protocol\PortableContact; require_once 'include/contact_widgets.php'; diff --git a/mod/display.php b/mod/display.php index 570582343..f36266e68 100644 --- a/mod/display.php +++ b/mod/display.php @@ -4,6 +4,7 @@ use Friendica\App; use Friendica\Core\Config; use Friendica\Core\System; use Friendica\Database\DBM; +use Friendica\Object\Contact; use Friendica\Protocol\DFRN; function display_init(App $a) { diff --git a/mod/follow.php b/mod/follow.php index 38ec83dc0..b3a503ec0 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -4,6 +4,7 @@ use Friendica\App; use Friendica\Core\Config; use Friendica\Core\System; use Friendica\Network\Probe; +use Friendica\Object\Contact; require_once 'include/follow.php'; require_once 'include/Contact.php'; diff --git a/mod/hovercard.php b/mod/hovercard.php index a5a41e263..a1d861067 100644 --- a/mod/hovercard.php +++ b/mod/hovercard.php @@ -13,6 +13,7 @@ use Friendica\Core\Config; use Friendica\Model\GlobalContact; require_once "include/Contact.php"; +use Friendica\Object\Contact; function hovercard_init(App $a) { // Just for testing purposes diff --git a/mod/item.php b/mod/item.php index 2fcaa6c3f..040ea7687 100644 --- a/mod/item.php +++ b/mod/item.php @@ -22,6 +22,7 @@ use Friendica\Core\Worker; use Friendica\Database\DBM; use Friendica\Model\GlobalContact; use Friendica\Network\Probe; +use Friendica\Object\Contact; use Friendica\Protocol\Diaspora; require_once 'include/crypto.php'; diff --git a/mod/match.php b/mod/match.php index 7258fd9c7..b5e1ea31f 100644 --- a/mod/match.php +++ b/mod/match.php @@ -6,6 +6,7 @@ use Friendica\App; use Friendica\Core\Config; use Friendica\Core\System; use Friendica\Database\DBM; +use Friendica\Object\Contact; require_once 'include/text.php'; require_once 'include/contact_widgets.php'; diff --git a/mod/message.php b/mod/message.php index 07145a6be..ecd377b7d 100644 --- a/mod/message.php +++ b/mod/message.php @@ -4,6 +4,7 @@ use Friendica\App; use Friendica\Content\Smilies; use Friendica\Core\System; use Friendica\Database\DBM; +use Friendica\Object\Contact; require_once 'include/acl_selectors.php'; require_once 'include/message.php'; diff --git a/mod/network.php b/mod/network.php index 662c306f5..8008fcc06 100644 --- a/mod/network.php +++ b/mod/network.php @@ -5,6 +5,7 @@ use Friendica\Core\System; use Friendica\Core\Config; use Friendica\Core\PConfig; use Friendica\Database\DBM; +use Friendica\Object\Contact; require_once 'include/conversation.php'; require_once 'include/group.php'; diff --git a/mod/nogroup.php b/mod/nogroup.php index e212b30dc..d88722e3f 100644 --- a/mod/nogroup.php +++ b/mod/nogroup.php @@ -4,6 +4,7 @@ */ use Friendica\App; use Friendica\Database\DBM; +use Friendica\Object\Contact; require_once 'include/Contact.php'; require_once 'include/contact_selectors.php'; diff --git a/mod/photos.php b/mod/photos.php index 1546bd9a8..3efa4a12e 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -6,6 +6,7 @@ use Friendica\Core\Config; use Friendica\Core\Worker; use Friendica\Database\DBM; use Friendica\Network\Probe; +use Friendica\Object\Contact; require_once 'include/Photo.php'; require_once 'include/photos.php'; diff --git a/mod/ping.php b/mod/ping.php index 00ee848dc..e722295b2 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -7,6 +7,7 @@ use Friendica\Core\Cache; use Friendica\Core\System; use Friendica\Core\PConfig; use Friendica\Database\DBM; +use Friendica\Object\Contact; use Friendica\Util\XML; require_once 'include/datetime.php'; diff --git a/mod/profiles.php b/mod/profiles.php index bbce17c33..835dd59f1 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -12,6 +12,7 @@ use Friendica\Model\GlobalContact; use Friendica\Network\Probe; require_once 'include/Contact.php'; +use Friendica\Object\Profile; function profiles_init(App $a) { diff --git a/mod/randprof.php b/mod/randprof.php index f835780e0..79057b495 100644 --- a/mod/randprof.php +++ b/mod/randprof.php @@ -2,6 +2,7 @@ use Friendica\App; use Friendica\Core\System; +use Friendica\Model\GlobalContact; function randprof_init(App $a) { require_once('include/Contact.php'); diff --git a/mod/removeme.php b/mod/removeme.php index 5dcd33e8f..dcb07a5be 100644 --- a/mod/removeme.php +++ b/mod/removeme.php @@ -2,6 +2,7 @@ use Friendica\App; use Friendica\Core\System; +use Friendica\Model\User; function removeme_post(App $a) { diff --git a/mod/suggest.php b/mod/suggest.php index bb23fc8cb..cb2b3f9c4 100644 --- a/mod/suggest.php +++ b/mod/suggest.php @@ -6,6 +6,7 @@ use Friendica\App; use Friendica\Core\System; use Friendica\Database\DBM; use Friendica\Model\GlobalContact; +use Friendica\Object\Contact; require_once 'include/contact_widgets.php'; diff --git a/mod/unfollow.php b/mod/unfollow.php index 58b4397ca..28af7f86e 100644 --- a/mod/unfollow.php +++ b/mod/unfollow.php @@ -3,6 +3,7 @@ use Friendica\App; use Friendica\Core\System; use Friendica\Database\DBM; +use Friendica\Object\Contact; require_once 'include/follow.php'; require_once 'include/Contact.php'; diff --git a/mod/videos.php b/mod/videos.php index a46f5de1a..662da4ca4 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -5,6 +5,7 @@ use Friendica\Core\Config; use Friendica\Core\System; use Friendica\Core\Worker; use Friendica\Database\DBM; +use Friendica\Object\Contact; require_once('include/items.php'); require_once('include/acl_selectors.php'); diff --git a/mod/viewcontacts.php b/mod/viewcontacts.php index 8c35be77d..4747330d6 100644 --- a/mod/viewcontacts.php +++ b/mod/viewcontacts.php @@ -3,6 +3,7 @@ use Friendica\App; use Friendica\Core\Config; use Friendica\Database\DBM; +use Friendica\Object\Contact; require_once('include/Contact.php'); require_once('include/contact_selectors.php'); diff --git a/src/Core/NotificationsManager.php b/src/Core/NotificationsManager.php index 318d5a8e8..5e2f1ad1f 100644 --- a/src/Core/NotificationsManager.php +++ b/src/Core/NotificationsManager.php @@ -9,6 +9,7 @@ namespace Friendica\Core; use Friendica\Core\Pconfig; use Friendica\Core\System; use Friendica\Database\DBM; +use Friendica\Object\Contact; require_once 'include/html2plain.php'; require_once 'include/datetime.php'; diff --git a/src/Model/GlobalContact.php b/src/Model/GlobalContact.php index 1ca814789..dc30c8b69 100644 --- a/src/Model/GlobalContact.php +++ b/src/Model/GlobalContact.php @@ -10,6 +10,7 @@ use Friendica\Core\System; use Friendica\Core\Worker; use Friendica\Database\DBM; use Friendica\Network\Probe; +use Friendica\Object\Profile; use Friendica\Protocol\PortableContact; use dba; use Exception; diff --git a/src/Model/User.php b/src/Model/User.php new file mode 100644 index 000000000..ec4d1013b --- /dev/null +++ b/src/Model/User.php @@ -0,0 +1,50 @@ + $uid), array("limit" => 1)); + + call_hooks('remove_user', $r); + + // save username (actually the nickname as it is guaranteed + // unique), so it cannot be re-registered in the future. + + dba::insert('userd', array('username' => $r['nickname'])); + + // The user and related data will be deleted in "cron_expire_and_remove_users" (cronjobs.php) + q("UPDATE `user` SET `account_removed` = 1, `account_expires_on` = UTC_TIMESTAMP() WHERE `uid` = %d", intval($uid)); + Worker::add(PRIORITY_HIGH, "Notifier", "removeme", $uid); + + // Send an update to the directory + Worker::add(PRIORITY_LOW, "Directory", $r['url']); + + if ($uid == local_user()) { + unset($_SESSION['authenticated']); + unset($_SESSION['uid']); + goaway(System::baseUrl()); + } + } +} diff --git a/src/Network/Probe.php b/src/Network/Probe.php index 37ca51d8a..b75895612 100644 --- a/src/Network/Probe.php +++ b/src/Network/Probe.php @@ -13,6 +13,7 @@ use Friendica\Core\System; use Friendica\Core\Cache; use Friendica\Core\Config; use Friendica\Database\DBM; +use Friendica\Object\Profile; use Friendica\Util\XML; use dba; diff --git a/src/Object/Contact.php b/src/Object/Contact.php new file mode 100644 index 000000000..2b8a11640 --- /dev/null +++ b/src/Object/Contact.php @@ -0,0 +1,830 @@ + $id)); + + // Delete the rest in the background + Worker::add(PRIORITY_LOW, 'RemoveContact', $id); + } + + /** + * @brief Sends an unfriend message. Does not remove the contact + * + * @param array $user User unfriending + * @param array $contact Contact unfriended + */ + public static function terminateFriendship(array $user, array $contact) + { + if ($contact['network'] === NETWORK_OSTATUS) { + // create an unfollow slap + $item = array(); + $item['verb'] = NAMESPACE_OSTATUS . "/unfollow"; + $item['follow'] = $contact["url"]; + $slap = OStatus::salmon($item, $user); + + if ((x($contact, 'notify')) && (strlen($contact['notify']))) { + require_once 'include/salmon.php'; + slapper($user, $contact['notify'], $slap); + } + } elseif ($contact['network'] === NETWORK_DIASPORA) { + Diaspora::sendUnshare($user, $contact); + } elseif ($contact['network'] === NETWORK_DFRN) { + DFRN::deliver($user, $contact, 'placeholder', 1); + } + } + + /** + * @brief Marks a contact for archival after a communication issue delay + * + * Contact has refused to recognise us as a friend. We will start a countdown. + * If they still don't recognise us in 32 days, the relationship is over, + * and we won't waste any more time trying to communicate with them. + * This provides for the possibility that their database is temporarily messed + * up or some other transient event and that there's a possibility we could recover from it. + * + * @param array $contact + * @return type + */ + public static function markForArchival(array $contact) + { + // Contact already archived, nothing to do + if ($contact['archive']) { + return; + } + + if ($contact['term-date'] <= NULL_DATE) { + q( + "UPDATE `contact` SET `term-date` = '%s' WHERE `id` = %d", dbesc(datetime_convert()), intval($contact['id']) + ); + + if ($contact['url'] != '') { + q( + "UPDATE `contact` SET `term-date` = '%s' + WHERE `nurl` = '%s' AND `term-date` <= '1000-00-00'", dbesc(datetime_convert()), dbesc(normalise_link($contact['url'])) + ); + } + } else { + + /* @todo + * We really should send a notification to the owner after 2-3 weeks + * so they won't be surprised when the contact vanishes and can take + * remedial action if this was a serious mistake or glitch + */ + + /// @todo Check for contact vitality via probing + $expiry = $contact['term-date'] . ' + 32 days '; + if (datetime_convert() > datetime_convert('UTC', 'UTC', $expiry)) { + + /* Relationship is really truly dead. archive them rather than + * delete, though if the owner tries to unarchive them we'll start + * the whole process over again. + */ + q( + "UPDATE `contact` SET `archive` = 1 WHERE `id` = %d", intval($contact['id']) + ); + + if ($contact['url'] != '') { + q( + "UPDATE `contact` SET `archive` = 1 WHERE `nurl` = '%s'", dbesc(normalise_link($contact['url'])) + ); + } + } + } + } + + /** + * @brief Cancels the archival countdown + * + * @see Contact::markForArchival() + * + * @param array $contact + * @return null + */ + public static function unmarkForArchival(array $contact) + { + $r = q( + "SELECT `term-date` FROM `contact` WHERE `id` = %d AND (`term-date` > '%s' OR `archive`)", intval($contact['id']), dbesc('1000-00-00 00:00:00') + ); + + // We don't need to update, we never marked this contact for archival + if (!DBM::is_result($r)) { + return; + } + + // It's a miracle. Our dead contact has inexplicably come back to life. + $fields = array('term-date' => NULL_DATE, 'archive' => false); + dba::update('contact', $fields, array('id' => $contact['id'])); + + if ($contact['url'] != '') { + dba::update('contact', $fields, array('nurl' => normalise_link($contact['url']))); + } + } + + /** + * @brief Get contact data for a given profile link + * + * The function looks at several places (contact table and gcontact table) for the contact + * It caches its result for the same script execution to prevent duplicate calls + * + * @param string $url The profile link + * @param int $uid User id + * @param array $default If not data was found take this data as default value + * + * @return array Contact data + */ + public static function getDetailsByURL($url, $uid = -1, array $default = []) + { + static $cache = array(); + + if ($url == '') { + return $default; + } + + if ($uid == -1) { + $uid = local_user(); + } + + if (isset($cache[$url][$uid])) { + return $cache[$url][$uid]; + } + + $ssl_url = str_replace('http://', 'https://', $url); + + // Fetch contact data from the contact table for the given user + $s = dba::p("SELECT `id`, `id` AS `cid`, 0 AS `gid`, 0 AS `zid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`, + `keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, `self` + FROM `contact` WHERE `nurl` = ? AND `uid` = ?", normalise_link($url), $uid); + $r = dba::inArray($s); + + // Fetch contact data from the contact table for the given user, checking with the alias + if (!DBM::is_result($r)) { + $s = dba::p("SELECT `id`, `id` AS `cid`, 0 AS `gid`, 0 AS `zid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`, + `keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, `self` + FROM `contact` WHERE `alias` IN (?, ?, ?) AND `uid` = ?", normalise_link($url), $url, $ssl_url, $uid); + $r = dba::inArray($s); + } + + // Fetch the data from the contact table with "uid=0" (which is filled automatically) + if (!DBM::is_result($r)) { + $s = dba::p("SELECT `id`, 0 AS `cid`, `id` AS `zid`, 0 AS `gid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`, + `keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, 0 AS `self` + FROM `contact` WHERE `nurl` = ? AND `uid` = 0", normalise_link($url)); + $r = dba::inArray($s); + } + + // Fetch the data from the contact table with "uid=0" (which is filled automatically) - checked with the alias + if (!DBM::is_result($r)) { + $s = dba::p("SELECT `id`, 0 AS `cid`, `id` AS `zid`, 0 AS `gid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`, + `keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, 0 AS `self` + FROM `contact` WHERE `alias` IN (?, ?, ?) AND `uid` = 0", normalise_link($url), $url, $ssl_url); + $r = dba::inArray($s); + } + + // Fetch the data from the gcontact table + if (!DBM::is_result($r)) { + $s = dba::p("SELECT 0 AS `id`, 0 AS `cid`, `id` AS `gid`, 0 AS `zid`, 0 AS `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, '' AS `xmpp`, + `keywords`, `gender`, `photo`, `photo` AS `thumb`, `photo` AS `micro`, `community` AS `forum`, 0 AS `prv`, `community`, `contact-type`, `birthday`, 0 AS `self` + FROM `gcontact` WHERE `nurl` = ?", normalise_link($url)); + $r = dba::inArray($s); + } + + if (DBM::is_result($r)) { + // If there is more than one entry we filter out the connector networks + if (count($r) > 1) { + foreach ($r AS $id => $result) { + if ($result["network"] == NETWORK_STATUSNET) { + unset($r[$id]); + } + } + } + + $profile = array_shift($r); + + // "bd" always contains the upcoming birthday of a contact. + // "birthday" might contain the birthday including the year of birth. + if ($profile["birthday"] > '0001-01-01') { + $bd_timestamp = strtotime($profile["birthday"]); + $month = date("m", $bd_timestamp); + $day = date("d", $bd_timestamp); + + $current_timestamp = time(); + $current_year = date("Y", $current_timestamp); + $current_month = date("m", $current_timestamp); + $current_day = date("d", $current_timestamp); + + $profile["bd"] = $current_year . "-" . $month . "-" . $day; + $current = $current_year . "-" . $current_month . "-" . $current_day; + + if ($profile["bd"] < $current) { + $profile["bd"] = ( ++$current_year) . "-" . $month . "-" . $day; + } + } else { + $profile["bd"] = '0001-01-01'; + } + } else { + $profile = $default; + } + + if (($profile["photo"] == "") && isset($default["photo"])) { + $profile["photo"] = $default["photo"]; + } + + if (($profile["name"] == "") && isset($default["name"])) { + $profile["name"] = $default["name"]; + } + + if (($profile["network"] == "") && isset($default["network"])) { + $profile["network"] = $default["network"]; + } + + if (($profile["thumb"] == "") && isset($profile["photo"])) { + $profile["thumb"] = $profile["photo"]; + } + + if (($profile["micro"] == "") && isset($profile["thumb"])) { + $profile["micro"] = $profile["thumb"]; + } + + if ((($profile["addr"] == "") || ($profile["name"] == "")) && ($profile["gid"] != 0) && + in_array($profile["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) { + Worker::add(PRIORITY_LOW, "UpdateGContact", $profile["gid"]); + } + + // Show contact details of Diaspora contacts only if connected + if (($profile["cid"] == 0) && ($profile["network"] == NETWORK_DIASPORA)) { + $profile["location"] = ""; + $profile["about"] = ""; + $profile["gender"] = ""; + $profile["birthday"] = '0001-01-01'; + } + + $cache[$url][$uid] = $profile; + + return $profile; + } + + /** + * @brief Get contact data for a given address + * + * The function looks at several places (contact table and gcontact table) for the contact + * + * @param string $addr The profile link + * @param int $uid User id + * + * @return array Contact data + */ + public static function getDetailsByAddr($addr, $uid = -1) + { + static $cache = array(); + + if ($addr == '') { + return array(); + } + + if ($uid == -1) { + $uid = local_user(); + } + + // Fetch contact data from the contact table for the given user + $r = q("SELECT `id`, `id` AS `cid`, 0 AS `gid`, 0 AS `zid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`, + `keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, `self` + FROM `contact` WHERE `addr` = '%s' AND `uid` = %d", dbesc($addr), intval($uid)); + + // Fetch the data from the contact table with "uid=0" (which is filled automatically) + if (!DBM::is_result($r)) + $r = q("SELECT `id`, 0 AS `cid`, `id` AS `zid`, 0 AS `gid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`, + `keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, 0 AS `self` + FROM `contact` WHERE `addr` = '%s' AND `uid` = 0", dbesc($addr)); + + // Fetch the data from the gcontact table + if (!DBM::is_result($r)) + $r = q("SELECT 0 AS `id`, 0 AS `cid`, `id` AS `gid`, 0 AS `zid`, 0 AS `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, '' AS `xmpp`, + `keywords`, `gender`, `photo`, `photo` AS `thumb`, `photo` AS `micro`, `community` AS `forum`, 0 AS `prv`, `community`, `contact-type`, `birthday`, 0 AS `self` + FROM `gcontact` WHERE `addr` = '%s'", dbesc($addr)); + + if (!DBM::is_result($r)) { + $data = Probe::uri($addr); + + $profile = self::getDetailsByURL($data['url'], $uid); + } else { + $profile = $r[0]; + } + + return $profile; + } + + /** + * @brief Returns the data array for the photo menu of a given contact + * + * @param array $contact + * @param int $uid + * @return array + */ + public static function photoMenu(array $contact, $uid = 0) + { + // @todo Unused, to be removed + $a = get_app(); + + $contact_url = ''; + $pm_url = ''; + $status_link = ''; + $photos_link = ''; + $posts_link = ''; + $contact_drop_link = ''; + $poke_link = ''; + + if ($uid == 0) { + $uid = local_user(); + } + + if ($contact['uid'] != $uid) { + if ($uid == 0) { + $profile_link = zrl($contact['url']); + $menu = Array('profile' => array(t('View Profile'), $profile_link, true)); + + return $menu; + } + + $r = q("SELECT * FROM `contact` WHERE `nurl` = '%s' AND `network` = '%s' AND `uid` = %d", dbesc($contact['nurl']), dbesc($contact['network']), intval($uid)); + if ($r) { + return self::photoMenu($r[0], $uid); + } else { + $profile_link = zrl($contact['url']); + $connlnk = 'follow/?url=' . $contact['url']; + $menu = array( + 'profile' => array(t('View Profile'), $profile_link, true), + 'follow' => array(t('Connect/Follow'), $connlnk, true) + ); + + return $menu; + } + } + + $sparkle = false; + if ($contact['network'] === NETWORK_DFRN) { + $sparkle = true; + $profile_link = System::baseUrl() . '/redir/' . $contact['id']; + } else { + $profile_link = $contact['url']; + } + + if ($profile_link === 'mailbox') { + $profile_link = ''; + } + + if ($sparkle) { + $status_link = $profile_link . '?url=status'; + $photos_link = $profile_link . '?url=photos'; + $profile_link = $profile_link . '?url=profile'; + } + + if (in_array($contact['network'], array(NETWORK_DFRN, NETWORK_DIASPORA))) { + $pm_url = System::baseUrl() . '/message/new/' . $contact['id']; + } + + if ($contact['network'] == NETWORK_DFRN) { + $poke_link = System::baseUrl() . '/poke/?f=&c=' . $contact['id']; + } + + $contact_url = System::baseUrl() . '/contacts/' . $contact['id']; + + $posts_link = System::baseUrl() . '/contacts/' . $contact['id'] . '/posts'; + $contact_drop_link = System::baseUrl() . '/contacts/' . $contact['id'] . '/drop?confirm=1'; + + /** + * menu array: + * "name" => [ "Label", "link", (bool)Should the link opened in a new tab? ] + */ + $menu = array( + 'status' => array(t("View Status"), $status_link, true), + 'profile' => array(t("View Profile"), $profile_link, true), + 'photos' => array(t("View Photos"), $photos_link, true), + 'network' => array(t("Network Posts"), $posts_link, false), + 'edit' => array(t("View Contact"), $contact_url, false), + 'drop' => array(t("Drop Contact"), $contact_drop_link, false), + 'pm' => array(t("Send PM"), $pm_url, false), + 'poke' => array(t("Poke"), $poke_link, false), + ); + + + $args = array('contact' => $contact, 'menu' => &$menu); + + call_hooks('contact_photo_menu', $args); + + $menucondensed = array(); + + foreach ($menu AS $menuname => $menuitem) { + if ($menuitem[1] != '') { + $menucondensed[$menuname] = $menuitem; + } + } + + return $menucondensed; + } + + /** + * Returns either the total number of ungrouped contacts for the given user + * id or a paginated list of ungrouped contacts. + * + * @brief Returns ungrouped contact count or list for user + * + * @param int $uid + * @param int $start + * @param int $count + * @return array + */ + public static function getUngroupedList($uid, $start = 0, $count = 0) + { + if (!$count) { + $r = q( + "SELECT COUNT(*) AS `total` + FROM `contact` + WHERE `uid` = %d + AND `self` = 0 + AND `id` NOT IN ( + SELECT DISTINCT(`contact-id`) + FROM `group_member` + WHERE `uid` = %d + ) ", intval($uid), intval($uid) + ); + + return $r; + } + + $r = q( + "SELECT * + FROM `contact` + WHERE `uid` = %d + AND `self` = 0 + AND `id` NOT IN ( + SELECT DISTINCT(`contact-id`) + FROM `group_member` WHERE `uid` = %d + ) + AND `blocked` = 0 + AND `pending` = 0 + LIMIT %d, %d", intval($uid), intval($uid), intval($start), intval($count) + ); + + return $r; + } + + /** + * @brief Fetch the contact id for a given url and user + * + * First lookup in the contact table to find a record matching either `url`, `nurl`, + * `addr` or `alias`. + * + * If there's no record and we aren't looking for a public contact, we quit. + * If there's one, we check that it isn't time to update the picture else we + * directly return the found contact id. + * + * Second, we probe the provided $url wether it's http://server.tld/profile or + * nick@server.tld. We quit if we can't get any info back. + * + * Third, we create the contact record if it doesn't exist + * + * Fourth, we update the existing record with the new data (avatar, alias, nick) + * if there's any updates + * + * @param string $url Contact URL + * @param integer $uid The user id for the contact (0 = public contact) + * @param boolean $no_update Don't update the contact + * + * @return integer Contact ID + */ + public static function getIdForUrl($url, $uid = 0, $no_update = false) + { + logger("Get contact data for url " . $url . " and user " . $uid . " - " . System::callstack(), LOGGER_DEBUG); + + $contact_id = 0; + + if ($url == '') { + return 0; + } + + /// @todo Verify if we can't use Contact::getDetailsByUrl instead of the following + // We first try the nurl (http://server.tld/nick), most common case + $contact = dba::select('contact', array('id', 'avatar-date'), array('nurl' => normalise_link($url), 'uid' => $uid), array('limit' => 1)); + + // Then the addr (nick@server.tld) + if (!DBM::is_result($contact)) { + $contact = dba::select('contact', array('id', 'avatar-date'), array('addr' => $url, 'uid' => $uid), array('limit' => 1)); + } + + // Then the alias (which could be anything) + if (!DBM::is_result($contact)) { + // The link could be provided as http although we stored it as https + $ssl_url = str_replace('http://', 'https://', $url); + $r = dba::p("SELECT `id`, `avatar-date` FROM `contact` WHERE `alias` IN (?, ?, ?) AND `uid` = ? LIMIT 1", $url, normalise_link($url), $ssl_url, $uid); + $contact = dba::fetch($r); + dba::close($r); + } + + if (DBM::is_result($contact)) { + $contact_id = $contact["id"]; + + // Update the contact every 7 days + $update_contact = ($contact['avatar-date'] < datetime_convert('', '', 'now -7 days')); + + // We force the update if the avatar is empty + if ($contact['avatar'] == '') { + $update_contact = true; + } + + if (!$update_contact || $no_update) { + return $contact_id; + } + } elseif ($uid != 0) { + // Non-existing user-specific contact, exiting + return 0; + } + + $data = Probe::uri($url, "", $uid); + + // Last try in gcontact for unsupported networks + if (!in_array($data["network"], array(NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_DIASPORA, NETWORK_PUMPIO, NETWORK_MAIL))) { + if ($uid != 0) { + return 0; + } + + // Get data from the gcontact table + $gcontacts = dba::select('gcontact', array('name', 'nick', 'url', 'photo', 'addr', 'alias', 'network'), array('nurl' => normalise_link($url)), array('limit' => 1)); + if (!DBM::is_result($gcontacts)) { + return 0; + } + + $data = array_merge($data, $gcontacts); + } + + if (!$contact_id && ($data["alias"] != '') && ($data["alias"] != $url)) { + $contact_id = self::getIdForUrl($data["alias"], $uid, true); + } + + $url = $data["url"]; + if (!$contact_id) { + dba::insert('contact', array('uid' => $uid, 'created' => datetime_convert(), 'url' => $data["url"], + 'nurl' => normalise_link($data["url"]), 'addr' => $data["addr"], + 'alias' => $data["alias"], 'notify' => $data["notify"], 'poll' => $data["poll"], + 'name' => $data["name"], 'nick' => $data["nick"], 'photo' => $data["photo"], + 'keywords' => $data["keywords"], 'location' => $data["location"], 'about' => $data["about"], + 'network' => $data["network"], 'pubkey' => $data["pubkey"], + 'rel' => CONTACT_IS_SHARING, 'priority' => $data["priority"], + 'batch' => $data["batch"], 'request' => $data["request"], + 'confirm' => $data["confirm"], 'poco' => $data["poco"], + 'name-date' => datetime_convert(), 'uri-date' => datetime_convert(), + 'avatar-date' => datetime_convert(), 'writable' => 1, 'blocked' => 0, + 'readonly' => 0, 'pending' => 0)); + + $contacts = q("SELECT `id` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d ORDER BY `id` LIMIT 2", dbesc(normalise_link($data["url"])), intval($uid)); + if (!DBM::is_result($contacts)) { + return 0; + } + + $contact_id = $contacts[0]["id"]; + + // Update the newly created contact from data in the gcontact table + $gcontact = dba::select('gcontact', array('location', 'about', 'keywords', 'gender'), array('nurl' => normalise_link($data["url"])), array('limit' => 1)); + if (DBM::is_result($gcontact)) { + // Only use the information when the probing hadn't fetched these values + if ($data['keywords'] != '') { + unset($gcontact['keywords']); + } + if ($data['location'] != '') { + unset($gcontact['location']); + } + if ($data['about'] != '') { + unset($gcontact['about']); + } + dba::update('contact', $gcontact, array('id' => $contact_id)); + } + + if (count($contacts) > 1 && $uid == 0 && $contact_id != 0 && $data["url"] != "") { + dba::delete('contact', array("`nurl` = ? AND `uid` = 0 AND `id` != ? AND NOT `self`", + normalise_link($data["url"]), $contact_id)); + } + } + + require_once 'include/Photo.php'; + + update_contact_avatar($data["photo"], $uid, $contact_id); + + $contact = dba::select('contact', array('url', 'nurl', 'addr', 'alias', 'name', 'nick', 'keywords', 'location', 'about', 'avatar-date'), array('id' => $contact_id), array('limit' => 1)); + + // This condition should always be true + if (!DBM::is_result($contact)) { + return $contact_id; + } + + $updated = array('addr' => $data['addr'], + 'alias' => $data['alias'], + 'url' => $data['url'], + 'nurl' => normalise_link($data['url']), + 'name' => $data['name'], + 'nick' => $data['nick']); + + if ($data['keywords'] != '') { + $updated['keywords'] = $data['keywords']; + } + if ($data['location'] != '') { + $updated['location'] = $data['location']; + } + if ($data['about'] != '') { + $updated['about'] = $data['about']; + } + + if (($data["addr"] != $contact["addr"]) || ($data["alias"] != $contact["alias"])) { + $updated['uri-date'] = datetime_convert(); + } + if (($data["name"] != $contact["name"]) || ($data["nick"] != $contact["nick"])) { + $updated['name-date'] = datetime_convert(); + } + + $updated['avatar-date'] = datetime_convert(); + + dba::update('contact', $updated, array('id' => $contact_id), $contact); + + return $contact_id; + } + + /** + * @brief Checks if the contact is blocked + * + * @param int $cid contact id + * + * @return boolean Is the contact blocked? + */ + public static function isBlocked($cid) + { + if ($cid == 0) { + return false; + } + + $blocked = dba::select('contact', array('blocked'), array('id' => $cid), array('limit' => 1)); + if (!DBM::is_result($blocked)) { + return false; + } + return (bool) $blocked['blocked']; + } + + /** + * @brief Checks if the contact is hidden + * + * @param int $cid contact id + * + * @return boolean Is the contact hidden? + */ + public static function isHidden($cid) + { + if ($cid == 0) { + return false; + } + + $hidden = dba::select('contact', array('hidden'), array('id' => $cid), array('limit' => 1)); + if (!DBM::is_result($hidden)) { + return false; + } + return (bool) $hidden['hidden']; + } + + /** + * @brief Returns posts from a given contact url + * + * @param App $a argv application class + * @param string $contact_url Contact URL + * + * @return string posts in HTML + */ + public static function getPostsFromUrl($contact_url) + { + 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`, `id` AS `author-id`, `contact-type` FROM `contact` + WHERE `contact`.`nurl` = '%s' AND `contact`.`uid` = 0", dbesc(normalise_link($contact_url))); + + if (!DBM::is_result($r)) { + return ''; + } + + if (in_array($r[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""))) { + $sql = "(`item`.`uid` = 0 OR (`item`.`uid` = %d AND NOT `item`.`global`))"; + } else { + $sql = "`item`.`uid` = %d"; + } + + $author_id = intval($r[0]["author-id"]); + + $contact = ($r[0]["contact-type"] == ACCOUNT_TYPE_COMMUNITY ? 'owner-id' : 'author-id'); + + $r = q(item_query() . " AND `item`.`" . $contact . "` = %d AND " . $sql . + " ORDER BY `item`.`created` DESC LIMIT %d, %d", intval($author_id), intval(local_user()), intval($a->pager['start']), intval($a->pager['itemspage']) + ); + + $a = self::getApp(); + + $o = conversation($a, $r, 'community', false); + + $o .= alt_pager($a, count($r)); + + return $o; + } + + /** + * @brief Returns the account type name + * + * The function can be called with either the user or the contact array + * + * @param array $contact contact or user array + * @return string + */ + public static function getAccountType(array $contact) + { + // There are several fields that indicate that the contact or user is a forum + // "page-flags" is a field in the user table, + // "forum" and "prv" are used in the contact table. They stand for PAGE_COMMUNITY and PAGE_PRVGROUP. + // "community" is used in the gcontact table and is true if the contact is PAGE_COMMUNITY or PAGE_PRVGROUP. + if ( + (isset($contact['page-flags']) && (intval($contact['page-flags']) == PAGE_COMMUNITY)) + || (isset($contact['page-flags']) && (intval($contact['page-flags']) == PAGE_PRVGROUP)) + || (isset($contact['forum']) && intval($contact['forum'])) + || (isset($contact['prv']) && intval($contact['prv'])) + || (isset($contact['community']) && intval($contact['community'])) + ) { + $type = ACCOUNT_TYPE_COMMUNITY; + } else { + $type = ACCOUNT_TYPE_PERSON; + } + + // The "contact-type" (contact table) and "account-type" (user table) are more general then the chaos from above. + if (isset($contact["contact-type"])) { + $type = $contact["contact-type"]; + } + if (isset($contact["account-type"])) { + $type = $contact["account-type"]; + } + + switch ($type) { + case ACCOUNT_TYPE_ORGANISATION: + $account_type = t("Organisation"); + break; + case ACCOUNT_TYPE_NEWS: + $account_type = t('News'); + break; + case ACCOUNT_TYPE_COMMUNITY: + $account_type = t("Forum"); + break; + default: + $account_type = ""; + break; + } + + return $account_type; + } +} diff --git a/src/Object/Profile.php b/src/Object/Profile.php new file mode 100644 index 000000000..29925a949 --- /dev/null +++ b/src/Object/Profile.php @@ -0,0 +1,46 @@ + Date: Sun, 19 Nov 2017 22:00:43 +0000 Subject: [PATCH 065/175] Some more poller are noe a worker --- scripts/daemon.php | 6 +++--- scripts/worker.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/daemon.php b/scripts/daemon.php index 4accef396..76668adb1 100644 --- a/scripts/daemon.php +++ b/scripts/daemon.php @@ -1,7 +1,7 @@ Date: Sun, 19 Nov 2017 22:02:54 +0000 Subject: [PATCH 066/175] Some more place --- INSTALL.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.txt b/INSTALL.txt index 7ec862dc6..bc0f4824a 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -102,7 +102,7 @@ tables, so that you can start fresh. **************************************************************************** **************************************************************************** -8. Set up a cron job or scheduled task to run the poller once every 5-10 +8. Set up a cron job or scheduled task to run the worker once every 5-10 minutes to pick up the recent "public" postings of your friends. Example: cd /base/directory; /path/to/php scripts/worker.php From ec02af593db87e78b0b388047ac4265aa5f987b1 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 19 Nov 2017 17:03:39 -0500 Subject: [PATCH 067/175] Change called method names - Add GlobalContact::getRandomUrl - Rename Contact::getIdForURL - Rename Diaspora::sendUnshare - Remove unused parameter $self in Contact::terminateFriendship --- boot.php | 4 ++-- include/acl_selectors.php | 2 +- include/api.php | 4 ++-- include/bb2diaspora.php | 4 ++-- include/bbcode.php | 4 ++-- include/conversation.php | 4 ++-- include/identity.php | 2 +- include/items.php | 16 ++++++++-------- include/like.php | 2 +- include/post_update.php | 4 ++-- include/threads.php | 6 +++--- mod/admin.php | 4 ++-- mod/allfriends.php | 8 ++++---- mod/cal.php | 2 +- mod/common.php | 8 ++++---- mod/contacts.php | 25 +++++++++++++------------ mod/crepair.php | 2 +- mod/dfrn_notify.php | 8 ++------ mod/directory.php | 2 +- mod/dirfind.php | 10 +++++----- mod/display.php | 2 +- mod/follow.php | 4 ++-- mod/hovercard.php | 6 +++--- mod/item.php | 6 +++--- mod/match.php | 4 ++-- mod/message.php | 4 ++-- mod/network.php | 2 +- mod/nogroup.php | 8 ++++---- mod/photos.php | 2 +- mod/ping.php | 2 +- mod/profiles.php | 2 +- mod/randprof.php | 2 +- mod/removeme.php | 2 +- mod/suggest.php | 4 ++-- mod/unfollow.php | 7 +++---- mod/videos.php | 2 +- mod/viewcontacts.php | 6 +++--- src/Core/NotificationsManager.php | 4 ++-- src/Model/GlobalContact.php | 14 +++++++++++++- src/Network/Probe.php | 2 +- src/Object/Contact.php | 4 ++-- src/Protocol/DFRN.php | 8 +++----- src/Protocol/Diaspora.php | 16 ++++++++-------- src/Protocol/OStatus.php | 6 +++--- src/Protocol/PortableContact.php | 2 +- src/Worker/Delivery.php | 4 ++-- src/Worker/Notifier.php | 8 +------- src/Worker/OnePoll.php | 12 ++++++------ 48 files changed, 133 insertions(+), 133 deletions(-) diff --git a/boot.php b/boot.php index 698587eb5..f0ad74ed5 100644 --- a/boot.php +++ b/boot.php @@ -984,10 +984,10 @@ function public_contact() if (!$public_contact_id && x($_SESSION, 'authenticated')) { if (x($_SESSION, 'my_address')) { // Local user - $public_contact_id = intval(get_contact($_SESSION['my_address'], 0)); + $public_contact_id = intval(Contact::getIdForURL($_SESSION['my_address'], 0)); } elseif (x($_SESSION, 'visitor_home')) { // Remote user - $public_contact_id = intval(get_contact($_SESSION['visitor_home'], 0)); + $public_contact_id = intval(Contact::getIdForURL($_SESSION['visitor_home'], 0)); } } elseif (!x($_SESSION, 'authenticated')) { $public_contact_id = false; diff --git a/include/acl_selectors.php b/include/acl_selectors.php index f20668578..ef75d416f 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -692,7 +692,7 @@ function acl_lookup(App $a, $out_type = 'json') { ); if (DBM::is_result($r)) { foreach ($r as $row) { - $contact = get_contact_details_by_url($row['author-link']); + $contact = Contact::getDetailsByURL($row['author-link']); if (count($contact) > 0) { $unknown_contacts[] = array( diff --git a/include/api.php b/include/api.php index 730352423..2cfdcf024 100644 --- a/include/api.php +++ b/include/api.php @@ -650,7 +650,7 @@ function api_get_user(App $a, $contact_id = null, $type = "json") 'notifications' => false, 'statusnet_profile_url' => $r[0]["url"], 'uid' => 0, - 'cid' => get_contact($r[0]["url"], api_user(), true), + 'cid' => Contact::getIdForURL($r[0]["url"], api_user(), true), 'self' => 0, 'network' => $r[0]["network"], ); @@ -738,7 +738,7 @@ function api_get_user(App $a, $contact_id = null, $type = "json") $network_name = network_to_name($uinfo[0]['network'], $uinfo[0]['url']); - $pcontact_id = get_contact($uinfo[0]['url'], 0, true); + $pcontact_id = Contact::getIdForURL($uinfo[0]['url'], 0, true); $ret = array( 'id' => intval($pcontact_id), diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index 2188cf8c7..3b1540473 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -24,7 +24,7 @@ function diaspora_mention2bb($match) { return; } - $data = get_contact_details_by_addr($match[2]); + $data = Contact::getDetailsByAddr($match[2]); $name = $match[1]; @@ -97,7 +97,7 @@ function diaspora2bb($s) { */ function diaspora_mentions($match) { - $contact = get_contact_details_by_url($match[3]); + $contact = Contact::getDetailsByURL($match[3]); if (!x($contact, 'addr')) { $contact = Probe::uri($match[3]); diff --git a/include/bbcode.php b/include/bbcode.php index 609ca922b..105e9595e 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -493,9 +493,9 @@ function bb_ShareAttributes($share, $simplehtml) { // We only call this so that a previously unknown contact can be added. // This is important for the function "get_contact_details_by_url". // This function then can fetch an entry from the contact table. - get_contact($profile, 0); + Contact::getIdForURL($profile, 0); - $data = get_contact_details_by_url($profile); + $data = Contact::getDetailsByURL($profile); if (isset($data["name"]) && ($data["name"] != "") && isset($data["addr"]) && ($data["addr"] != "")) $userid_compact = $data["name"]." (".$data["addr"].")"; diff --git a/include/conversation.php b/include/conversation.php index aea085569..62c4d678e 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -734,7 +734,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false) { } if (!x($item, 'author-thumb') || ($item['author-thumb'] == "")) { - $author_contact = get_contact_details_by_url($item['author-link'], $profile_owner); + $author_contact = Contact::getDetailsByURL($item['author-link'], $profile_owner); if ($author_contact["thumb"]) { $item['author-thumb'] = $author_contact["thumb"]; } else { @@ -743,7 +743,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false) { } if (!isset($item['owner-thumb']) || ($item['owner-thumb'] == "")) { - $owner_contact = get_contact_details_by_url($item['owner-link'], $profile_owner); + $owner_contact = Contact::getDetailsByURL($item['owner-link'], $profile_owner); if ($owner_contact["thumb"]) { $item['owner-thumb'] = $owner_contact["thumb"]; } else { diff --git a/include/identity.php b/include/identity.php index 31c17ef21..96a978133 100644 --- a/include/identity.php +++ b/include/identity.php @@ -346,7 +346,7 @@ function profile_sidebar($profile, $block = 0) } // Fetch the account type - $account_type = account_type($profile); + $account_type = Contact::getAccountType($profile); if ((x($profile, 'address') == 1) || (x($profile, 'location') == 1) diff --git a/include/items.php b/include/items.php index 63ecc791b..8862eb1ab 100644 --- a/include/items.php +++ b/include/items.php @@ -719,12 +719,12 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f * 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); + $arr["contact-id"] = Contact::getIdForURL($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); + $arr["contact-id"] = Contact::getIdForURL($arr['owner-link'], $uid); } // Still missing? Then use the "self" contact of the current user @@ -755,19 +755,19 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f } if ($arr["author-id"] == 0) { - $arr["author-id"] = get_contact($arr["author-link"], 0); + $arr["author-id"] = Contact::getIdForURL($arr["author-link"], 0); } - if (blockedContact($arr["author-id"])) { + if (Contact::isBlocked($arr["author-id"])) { logger('Contact '.$arr["author-id"].' is blocked, item '.$arr["uri"].' will not be stored'); return 0; } if ($arr["owner-id"] == 0) { - $arr["owner-id"] = get_contact($arr["owner-link"], 0); + $arr["owner-id"] = Contact::getIdForURL($arr["owner-link"], 0); } - if (blockedContact($arr["owner-id"])) { + if (Contact::isBlocked($arr["owner-id"])) { logger('Contact '.$arr["owner-id"].' is blocked, item '.$arr["uri"].' will not be stored'); return 0; } @@ -1751,7 +1751,7 @@ function lose_follower($importer, $contact, array $datarray = array(), $item = " if (($contact['rel'] == CONTACT_IS_FRIEND) || ($contact['rel'] == CONTACT_IS_SHARING)) { dba::update('contact', array('rel' => CONTACT_IS_SHARING), array('id' => $contact['id'])); } else { - contact_remove($contact['id']); + Contact::remove($contact['id']); } } @@ -1760,7 +1760,7 @@ function lose_sharer($importer, $contact, array $datarray = array(), $item = "") if (($contact['rel'] == CONTACT_IS_FRIEND) || ($contact['rel'] == CONTACT_IS_FOLLOWER)) { dba::update('contact', array('rel' => CONTACT_IS_FOLLOWER), array('id' => $contact['id'])); } else { - contact_remove($contact['id']); + Contact::remove($contact['id']); } } diff --git a/include/like.php b/include/like.php index e8d69689b..e6f1aab6d 100644 --- a/include/like.php +++ b/include/like.php @@ -116,7 +116,7 @@ function do_like($item_id, $verb) { $item_contact_id = $owner_self_contact['id']; $item_contact = $owner_self_contact; } else { - $item_contact_id = get_contact($author_contact['url'], $item['uid']); + $item_contact_id = Contact::getIdForURL($author_contact['url'], $item['uid']); $contacts = q("SELECT * FROM `contact` WHERE `id` = %d", intval($item_contact_id) diff --git a/include/post_update.php b/include/post_update.php index f77cb0184..f67c064da 100644 --- a/include/post_update.php +++ b/include/post_update.php @@ -210,8 +210,8 @@ function post_update_1198() { // Set the "gcontact-id" in the item table and add a new gcontact entry if needed foreach ($item_arr AS $item) { - $author_id = get_contact($item["author-link"], 0); - $owner_id = get_contact($item["owner-link"], 0); + $author_id = Contact::getIdForURL($item["author-link"], 0); + $owner_id = Contact::getIdForURL($item["owner-link"], 0); if ($author_id == 0) $author_id = -1; diff --git a/include/threads.php b/include/threads.php index a1a6c7825..e776a37e7 100644 --- a/include/threads.php +++ b/include/threads.php @@ -59,7 +59,7 @@ function add_shadow_thread($itemid) { } // Is the public contact configured as hidden? - if (hiddenContact($item["owner-id"]) || hiddenContact($item["author-id"])) { + if (Contact::isHidden($item["owner-id"]) || Contact::isHidden($item["author-id"])) { return; } @@ -105,7 +105,7 @@ function add_shadow_thread($itemid) { $item[0]['uid'] = 0; $item[0]['origin'] = 0; $item[0]['wall'] = 0; - $item[0]['contact-id'] = get_contact($item[0]['author-link'], 0); + $item[0]['contact-id'] = Contact::getIdForURL($item[0]['author-link'], 0); if (in_array($item[0]['type'], array("net-comment", "wall-comment"))) { $item[0]['type'] = 'remote-comment'; @@ -165,7 +165,7 @@ function add_shadow_entry($itemid) { $item['uid'] = 0; $item['origin'] = 0; $item['wall'] = 0; - $item['contact-id'] = get_contact($item['author-link'], 0); + $item['contact-id'] = Contact::getIdForURL($item['author-link'], 0); if (in_array($item['type'], array("net-comment", "wall-comment"))) { $item['type'] = 'remote-comment'; diff --git a/mod/admin.php b/mod/admin.php index 67313e060..34055ba5d 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -1446,7 +1446,7 @@ function admin_page_users_post(App $a) { if (x($_POST,'page_users_delete')) { require_once("include/Contact.php"); foreach ($users as $uid) { - user_remove($uid); + User::remove($uid); } notice(sprintf(tt("%s user deleted", "%s users deleted", count($users)), count($users))); } @@ -1493,7 +1493,7 @@ function admin_page_users(App $a) { check_form_security_token_redirectOnErr('/admin/users', 'admin_users', 't'); // delete user require_once("include/Contact.php"); - user_remove($uid); + User::remove($uid); notice(sprintf(t("User '%s' deleted"), $user[0]['username']).EOL); break; diff --git a/mod/allfriends.php b/mod/allfriends.php index 13a85e6aa..c88ce9631 100644 --- a/mod/allfriends.php +++ b/mod/allfriends.php @@ -40,7 +40,7 @@ function allfriends_content(App $a) { } $a->page['aside'] = ""; - profile_load($a, "", 0, get_contact_details_by_url($c[0]["url"])); + profile_load($a, "", 0, Contact::getDetailsByURL($c[0]["url"])); $total = GlobalContact::countAllFriends(local_user(), $cid); @@ -59,7 +59,7 @@ function allfriends_content(App $a) { foreach ($r as $rr) { //get further details of the contact - $contact_details = get_contact_details_by_url($rr['url'], $uid, $rr); + $contact_details = Contact::getDetailsByURL($rr['url'], $uid, $rr); $photo_menu = ''; @@ -67,7 +67,7 @@ function allfriends_content(App $a) { // If the contact is not common to the user, Connect/Follow' will be added to the photo menu if ($rr[cid]) { $rr[id] = $rr[cid]; - $photo_menu = contact_photo_menu ($rr); + $photo_menu = Contact::photoMenu ($rr); } else { $connlnk = System::baseUrl() . '/follow/?url=' . $rr['url']; @@ -86,7 +86,7 @@ function allfriends_content(App $a) { 'details' => $contact_details['location'], 'tags' => $contact_details['keywords'], 'about' => $contact_details['about'], - 'account_type' => account_type($contact_details), + 'account_type' => Contact::getAccountType($contact_details), 'network' => network_to_name($contact_details['network'], $contact_details['url']), 'photo_menu' => $photo_menu, 'conntxt' => t('Connect'), diff --git a/mod/cal.php b/mod/cal.php index f3cb9f633..96a1c8f29 100644 --- a/mod/cal.php +++ b/mod/cal.php @@ -47,7 +47,7 @@ function cal_init(App $a) { $profile = get_profiledata_by_nick($nick, $a->profile_uid); - $account_type = account_type($profile); + $account_type = Contact::getAccountType($profile); $tpl = get_markup_template("vcard-widget.tpl"); diff --git a/mod/common.php b/mod/common.php index 94c884771..c0bab4171 100644 --- a/mod/common.php +++ b/mod/common.php @@ -40,7 +40,7 @@ function common_content(App $a) { ); /// @TODO Handle $c with DBM::is_result() $a->page['aside'] = ""; - profile_load($a, "", 0, get_contact_details_by_url($c[0]["url"])); + profile_load($a, "", 0, Contact::getDetailsByURL($c[0]["url"])); } else { $c = q("SELECT `name`, `url`, `photo` FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1", intval($uid) @@ -115,14 +115,14 @@ function common_content(App $a) { foreach ($r as $rr) { //get further details of the contact - $contact_details = get_contact_details_by_url($rr['url'], $uid); + $contact_details = Contact::getDetailsByURL($rr['url'], $uid); // $rr['id'] is needed to use contact_photo_menu() /// @TODO Adding '/" here avoids E_NOTICE on missing constants $rr['id'] = $rr['cid']; $photo_menu = ''; - $photo_menu = contact_photo_menu($rr); + $photo_menu = Contact::photoMenu($rr); $entry = array( 'url' => $rr['url'], @@ -133,7 +133,7 @@ function common_content(App $a) { 'details' => $contact_details['location'], 'tags' => $contact_details['keywords'], 'about' => $contact_details['about'], - 'account_type' => account_type($contact_details), + 'account_type' => Contact::getAccountType($contact_details), 'network' => network_to_name($contact_details['network'], $contact_details['url']), 'photo_menu' => $photo_menu, 'id' => ++$id, diff --git a/mod/contacts.php b/mod/contacts.php index dba7680ba..c8c73b51f 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -59,7 +59,7 @@ function contacts_init(App $a) { '$addr' => (($a->data['contact']['addr'] != "") ? ($a->data['contact']['addr']) : ""), '$network_name' => $networkname, '$network' => t('Network:'), - '$account_type' => account_type($a->data['contact']) + '$account_type' => Contact::getAccountType($a->data['contact']) )); $finpeople_widget = ''; @@ -132,7 +132,7 @@ function contacts_batch_actions(App $a) { if ($r) $count_actions++; } if (x($_POST, 'contacts_batch_drop')) { - _contact_drop($contact_id, $orig_record); + _contact_drop($orig_record); $count_actions++; } } @@ -347,7 +347,9 @@ function _contact_archive($contact_id, $orig_record) { } return $r; } -function _contact_drop($contact_id, $orig_record) { + +function _contact_drop($orig_record) +{ $a = get_app(); $r = q("SELECT `contact`.*, `user`.* FROM `contact` INNER JOIN `user` ON `contact`.`uid` = `user`.`uid` @@ -358,9 +360,8 @@ function _contact_drop($contact_id, $orig_record) { return; } - $self = ""; // Unused parameter - terminate_friendship($r[0], $self, $orig_record); - contact_remove($orig_record['id']); + Contact::terminateFriendship($r[0], $orig_record); + Contact::remove($orig_record['id']); } @@ -480,7 +481,7 @@ function contacts_content(App $a) { } } - _contact_drop($contact_id, $orig_record[0]); + _contact_drop($orig_record[0]); info( t('Contact has been removed.') . EOL ); if (x($_SESSION,'return_url')) { goaway('' . $_SESSION['return_url']); @@ -654,7 +655,7 @@ function contacts_content(App $a) { '$url' => $url, '$profileurllabel' => t('Profile URL'), '$profileurl' => $contact['url'], - '$account_type' => account_type($contact), + '$account_type' => Contact::getAccountType($contact), '$location' => bbcode($contact["location"]), '$location_label' => t("Location:"), '$xmpp' => bbcode($contact["xmpp"]), @@ -917,7 +918,7 @@ function contact_posts($a, $contact_id) { if ($r) { $contact = $r[0]; $a->page['aside'] = ""; - profile_load($a, "", 0, get_contact_details_by_url($contact["url"])); + profile_load($a, "", 0, Contact::getDetailsByURL($contact["url"])); } else $profile = ""; @@ -925,7 +926,7 @@ function contact_posts($a, $contact_id) { $o .= $tab_str; - $o .= posts_from_contact_url($a, $contact["url"]); + $o .= Contact::getPostsFromUrl($contact["url"]); return $o; } @@ -960,14 +961,14 @@ function _contact_detail_for_template($rr){ return array( 'img_hover' => sprintf( t('Visit %s\'s profile [%s]'),$rr['name'],$rr['url']), 'edit_hover' => t('Edit contact'), - 'photo_menu' => contact_photo_menu($rr), + 'photo_menu' => Contact::photoMenu($rr), 'id' => $rr['id'], 'alt_text' => $alt_text, 'dir_icon' => $dir_icon, 'thumb' => proxy_url($rr['thumb'], false, PROXY_SIZE_THUMB), 'name' => htmlentities($rr['name']), 'username' => htmlentities($rr['name']), - 'account_type' => account_type($rr), + 'account_type' => Contact::getAccountType($rr), 'sparkle' => $sparkle, 'itemurl' => (($rr['addr'] != "") ? $rr['addr'] : $rr['url']), 'url' => $url, diff --git a/mod/crepair.php b/mod/crepair.php index f9c25845d..69efad24b 100644 --- a/mod/crepair.php +++ b/mod/crepair.php @@ -32,7 +32,7 @@ function crepair_init(App $a) { if($contact_id) { $a->data['contact'] = $r[0]; $contact = $r[0]; - profile_load($a, "", 0, get_contact_details_by_url($contact["url"])); + profile_load($a, "", 0, Contact::getDetailsByURL($contact["url"])); } } diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 74f6d4e9f..8ad599c9d 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -128,13 +128,9 @@ function dfrn_notify_post(App $a) { logger('dfrn_notify: data: ' . $data, LOGGER_DATA); if ($dissolve == 1) { - - /* - * Relationship is dissolved permanently - */ - require_once('include/Contact.php'); - contact_remove($importer['id']); + // Relationship is dissolved permanently + Contact::remove($importer['id']); logger('relationship dissolved : ' . $importer['name'] . ' dissolved ' . $importer['username']); xml_status(0, 'relationship dissolved'); } diff --git a/mod/directory.php b/mod/directory.php index 269dc03d3..4ce919b08 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -162,7 +162,7 @@ function directory_content(App $a) { 'img_hover' => $rr['name'], 'name' => $rr['name'], 'details' => $details, - 'account_type' => account_type($rr), + 'account_type' => Contact::getAccountType($rr), 'profile' => $profile, 'location' => $location_e, 'tags' => $rr['pub_keywords'], diff --git a/mod/dirfind.php b/mod/dirfind.php index c8a9709ab..5a31ef996 100644 --- a/mod/dirfind.php +++ b/mod/dirfind.php @@ -76,7 +76,7 @@ function dirfind_content(App $a, $prefix = "") { $objresult->tags = ""; $objresult->network = $user_data["network"]; - $contact = get_contact_details_by_url($user_data["url"], local_user()); + $contact = Contact::getDetailsByURL($user_data["url"], local_user()); $objresult->cid = $contact["cid"]; $j->results[] = $objresult; @@ -150,7 +150,7 @@ function dirfind_content(App $a, $prefix = "") { continue; } - $result = get_contact_details_by_url($result["url"], local_user(), $result); + $result = Contact::getDetailsByURL($result["url"], local_user(), $result); if ($result["name"] == "") { $urlparts = parse_url($result["url"]); @@ -194,7 +194,7 @@ function dirfind_content(App $a, $prefix = "") { $alt_text = ""; - $contact_details = get_contact_details_by_url($jj->url, local_user()); + $contact_details = Contact::getDetailsByURL($jj->url, local_user()); $itemurl = (($contact_details["addr"] != "") ? $contact_details["addr"] : $jj->url); @@ -205,7 +205,7 @@ function dirfind_content(App $a, $prefix = "") { $contact = q("SELECT * FROM `contact` WHERE `id` = %d", intval($jj->cid)); if ($contact) { - $photo_menu = contact_photo_menu($contact[0]); + $photo_menu = Contact::photoMenu($contact[0]); $details = _contact_detail_for_template($contact[0]); $alt_text = $details['alt_text']; } else { @@ -235,7 +235,7 @@ function dirfind_content(App $a, $prefix = "") { 'details' => $contact_details['location'], 'tags' => $contact_details['keywords'], 'about' => $contact_details['about'], - 'account_type' => account_type($contact_details), + 'account_type' => Contact::getAccountType($contact_details), 'network' => network_to_name($jj->network, $jj->url), 'id' => ++$id, ); diff --git a/mod/display.php b/mod/display.php index f36266e68..aa885f5bd 100644 --- a/mod/display.php +++ b/mod/display.php @@ -182,7 +182,7 @@ function display_fetchauthor($a, $item) { $profiledata["about"] = ""; } - $profiledata = get_contact_details_by_url($profiledata["url"], local_user(), $profiledata); + $profiledata = Contact::getDetailsByURL($profiledata["url"], local_user(), $profiledata); $profiledata["photo"] = System::removedBaseUrl($profiledata["photo"]); diff --git a/mod/follow.php b/mod/follow.php index b3a503ec0..567a955cc 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -177,7 +177,7 @@ function follow_content(App $a) { )); $a->page['aside'] = ""; - profile_load($a, "", 0, get_contact_details_by_url($ret["url"])); + profile_load($a, "", 0, Contact::getDetailsByURL($ret["url"])); if ($gcontact_id <> 0) { $o .= replace_macros(get_markup_template('section_title.tpl'), @@ -185,7 +185,7 @@ function follow_content(App $a) { )); // Show last public posts - $o .= posts_from_contact_url($a, $ret["url"]); + $o .= Contact::getPostsFromUrl($ret["url"]); } return $o; diff --git a/mod/hovercard.php b/mod/hovercard.php index a1d861067..41de07c61 100644 --- a/mod/hovercard.php +++ b/mod/hovercard.php @@ -52,14 +52,14 @@ function hovercard_content() { $nurl = normalise_link(GlobalContact::cleanContactUrl($profileurl)); if($nurl) { // Search for contact data - $contact = get_contact_details_by_url($nurl); + $contact = Contact::getDetailsByURL($nurl); } if(!is_array($contact)) return; // Get the photo_menu - the menu if possible contact actions if(local_user()) - $actions = contact_photo_menu($contact); + $actions = Contact::photoMenu($contact); // Move the contact data to the profile array so we can deliver it to @@ -81,7 +81,7 @@ function hovercard_content() { // 'server_url' => $contact["server_url"], 'bd' => (($contact["birthday"] <= '0001-01-01') ? "" : $contact["birthday"]), // 'generation' => $contact["generation"], - 'account_type' => account_type($contact), + 'account_type' => Contact::getAccountType($contact), 'actions' => $actions, ); if($datatype == "html") { diff --git a/mod/item.php b/mod/item.php index 040ea7687..7b0f21a81 100644 --- a/mod/item.php +++ b/mod/item.php @@ -147,7 +147,7 @@ function item_post(App $a) { $thrparent = q("SELECT `author-link`, `network` FROM `item` WHERE `uri` = '%s' LIMIT 1", dbesc($thr_parent)); if (DBM::is_result($thrparent) && ($thrparent[0]["network"] === NETWORK_OSTATUS) && (normalise_link($parent_contact["url"]) != normalise_link($thrparent[0]["author-link"]))) { - $parent_contact = get_contact_details_by_url($thrparent[0]["author-link"]); + $parent_contact = Contact::getDetailsByURL($thrparent[0]["author-link"]); if (!isset($parent_contact["nick"])) { $probed_contact = Probe::uri($thrparent[0]["author-link"]); @@ -704,11 +704,11 @@ function item_post(App $a) { $datarray['owner-name'] = $contact_record['name']; $datarray['owner-link'] = $contact_record['url']; $datarray['owner-avatar'] = $contact_record['thumb']; - $datarray['owner-id'] = get_contact($datarray['owner-link'], 0); + $datarray['owner-id'] = Contact::getIdForURL($datarray['owner-link'], 0); $datarray['author-name'] = $author['name']; $datarray['author-link'] = $author['url']; $datarray['author-avatar'] = $author['thumb']; - $datarray['author-id'] = get_contact($datarray['author-link'], 0); + $datarray['author-id'] = Contact::getIdForURL($datarray['author-link'], 0); $datarray['created'] = datetime_convert(); $datarray['edited'] = datetime_convert(); $datarray['commented'] = datetime_convert(); diff --git a/mod/match.php b/mod/match.php index b5e1ea31f..3a0d10c31 100644 --- a/mod/match.php +++ b/mod/match.php @@ -87,7 +87,7 @@ function match_content(App $a) 'follow' => array(t("Connect/Follow"), $connlnk) ); - $contact_details = get_contact_details_by_url($jj->url, local_user()); + $contact_details = Contact::getDetailsByURL($jj->url, local_user()); $entry = array( 'url' => zrl($jj->url), @@ -96,7 +96,7 @@ function match_content(App $a) 'details' => $contact_details['location'], 'tags' => $contact_details['keywords'], 'about' => $contact_details['about'], - 'account_type' => account_type($contact_details), + 'account_type' => Contact::getAccountType($contact_details), 'thumb' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB), 'inttxt' => ' ' . t('is interested in:'), 'conntxt' => t('Connect'), diff --git a/mod/message.php b/mod/message.php index ecd377b7d..80940c816 100644 --- a/mod/message.php +++ b/mod/message.php @@ -462,7 +462,7 @@ function message_content(App $a) { $to_name_e = $message['name']; } - $contact = get_contact_details_by_url($message['from-url']); + $contact = Contact::getDetailsByURL($message['from-url']); if (isset($contact["thumb"])) $from_photo = $contact["thumb"]; else @@ -576,7 +576,7 @@ function render_messages(array $msg, $t) { $to_name_e = $rr['name']; } - $contact = get_contact_details_by_url($rr['url']); + $contact = Contact::getDetailsByURL($rr['url']); if (isset($contact["thumb"])) $from_photo = $contact["thumb"]; else diff --git a/mod/network.php b/mod/network.php index 8008fcc06..ff86e0b9e 100644 --- a/mod/network.php +++ b/mod/network.php @@ -677,7 +677,7 @@ function networkThreadedView(App $a, $update = 0) { 'details' => $r['location'], ); - $entries[0]["account_type"] = account_type($r); + $entries[0]["account_type"] = Contact::getAccountType($r); $o = replace_macros(get_markup_template("viewcontact_template.tpl"),array( 'contacts' => $entries, diff --git a/mod/nogroup.php b/mod/nogroup.php index d88722e3f..c50ec486c 100644 --- a/mod/nogroup.php +++ b/mod/nogroup.php @@ -33,19 +33,19 @@ function nogroup_content(App $a) } require_once 'include/Contact.php'; - $r = contacts_not_grouped(local_user()); + $r = Contact::getUngroupedList(local_user()); if (DBM::is_result($r)) { $a->set_pager_total($r[0]['total']); } - $r = contacts_not_grouped(local_user(), $a->pager['start'], $a->pager['itemspage']); + $r = Contact::getUngroupedList(local_user(), $a->pager['start'], $a->pager['itemspage']); if (DBM::is_result($r)) { foreach ($r as $rr) { - $contact_details = get_contact_details_by_url($rr['url'], local_user(), $rr); + $contact_details = Contact::getDetailsByURL($rr['url'], local_user(), $rr); $contacts[] = array( 'img_hover' => sprintf(t('Visit %s\'s profile [%s]'), $contact_details['name'], $rr['url']), 'edit_hover' => t('Edit contact'), - 'photo_menu' => contact_photo_menu($rr), + 'photo_menu' => Contact::photoMenu($rr), 'id' => $rr['id'], 'alt_text' => $alt_text, 'dir_icon' => $dir_icon, diff --git a/mod/photos.php b/mod/photos.php index 3efa4a12e..6ef256f27 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -46,7 +46,7 @@ function photos_init(App $a) { $profile = get_profiledata_by_nick($nick, $a->profile_uid); - $account_type = account_type($profile); + $account_type = Contact::getAccountType($profile); $tpl = get_markup_template("vcard-widget.tpl"); diff --git a/mod/ping.php b/mod/ping.php index e722295b2..39882d5e3 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -350,7 +350,7 @@ function ping_init(App $a) $notif['message'] = str_replace("{0}", $notif['name'], $notif['message']); } - $contact = get_contact_details_by_url($notif['url']); + $contact = Contact::getDetailsByURL($notif['url']); if (isset($contact['micro'])) { $notif['photo'] = proxy_url($contact['micro'], false, PROXY_SIZE_MICRO); } else { diff --git a/mod/profiles.php b/mod/profiles.php index 835dd59f1..03265ccf4 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -491,7 +491,7 @@ function profiles_post(App $a) { } if ($is_default) { - $location = formatted_location(array("locality" => $locality, "region" => $region, "country-name" => $country_name)); + $location = Profile::formatLocation(array("locality" => $locality, "region" => $region, "country-name" => $country_name)); q("UPDATE `contact` SET `about` = '%s', `location` = '%s', `keywords` = '%s', `gender` = '%s' WHERE `self` AND `uid` = %d", dbesc($about), diff --git a/mod/randprof.php b/mod/randprof.php index 79057b495..55b77aec8 100644 --- a/mod/randprof.php +++ b/mod/randprof.php @@ -7,7 +7,7 @@ use Friendica\Model\GlobalContact; function randprof_init(App $a) { require_once('include/Contact.php'); - $x = random_profile(); + $x = GlobalContact::getRandomUrl(); if ($x) { goaway(zrl($x)); diff --git a/mod/removeme.php b/mod/removeme.php index dcb07a5be..4b5591c0b 100644 --- a/mod/removeme.php +++ b/mod/removeme.php @@ -30,7 +30,7 @@ function removeme_post(App $a) { if ((strlen($a->user['password'])) && ($encrypted === $a->user['password'])) { require_once('include/Contact.php'); - user_remove($a->user['uid']); + User::remove($a->user['uid']); // NOTREACHED } diff --git a/mod/suggest.php b/mod/suggest.php index cb2b3f9c4..f05c76ced 100644 --- a/mod/suggest.php +++ b/mod/suggest.php @@ -88,7 +88,7 @@ function suggest_content(App $a) { 'hide' => array(t('Ignore/Hide'), $ignlnk) ); - $contact_details = get_contact_details_by_url($rr["url"], local_user(), $rr); + $contact_details = Contact::getDetailsByURL($rr["url"], local_user(), $rr); $entry = array( 'url' => zrl($rr['url']), @@ -99,7 +99,7 @@ function suggest_content(App $a) { 'details' => $contact_details['location'], 'tags' => $contact_details['keywords'], 'about' => $contact_details['about'], - 'account_type' => account_type($contact_details), + 'account_type' => Contact::getAccountType($contact_details), 'ignlnk' => $ignlnk, 'ignid' => $rr['id'], 'conntxt' => t('Connect'), diff --git a/mod/unfollow.php b/mod/unfollow.php index 28af7f86e..652394ac5 100644 --- a/mod/unfollow.php +++ b/mod/unfollow.php @@ -39,8 +39,7 @@ function unfollow_post(App $a) { intval($uid) ); if (DBM::is_result($r)) { - $self = ""; // Unused parameter - terminate_friendship($r[0], $self, $contact); + Contact::terminateFriendship($r[0], $contact); } } dba::update('contact', array('rel' => CONTACT_IS_FOLLOWER), array('id' => $contact['id'])); @@ -128,14 +127,14 @@ function unfollow_content(App $a) { )); $a->page['aside'] = ""; - profile_load($a, "", 0, get_contact_details_by_url($contact["url"])); + profile_load($a, "", 0, Contact::getDetailsByURL($contact["url"])); $o .= replace_macros(get_markup_template('section_title.tpl'), array('$title' => t('Status Messages and Posts') )); // Show last public posts - $o .= posts_from_contact_url($a, $contact["url"]); + $o .= Contact::getPostsFromUrl($contact["url"]); return $o; } diff --git a/mod/videos.php b/mod/videos.php index 662da4ca4..9f0244102 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -40,7 +40,7 @@ function videos_init(App $a) { $profile = get_profiledata_by_nick($nick, $a->profile_uid); - $account_type = account_type($profile); + $account_type = Contact::getAccountType($profile); $tpl = get_markup_template("vcard-widget.tpl"); diff --git a/mod/viewcontacts.php b/mod/viewcontacts.php index 4747330d6..0a1021a79 100644 --- a/mod/viewcontacts.php +++ b/mod/viewcontacts.php @@ -101,19 +101,19 @@ function viewcontacts_content(App $a) { else $url = zrl($url); - $contact_details = get_contact_details_by_url($rr['url'], $a->profile['uid'], $rr); + $contact_details = Contact::getDetailsByURL($rr['url'], $a->profile['uid'], $rr); $contacts[] = array( 'id' => $rr['id'], 'img_hover' => sprintf( t('Visit %s\'s profile [%s]'), $contact_details['name'], $rr['url']), - 'photo_menu' => contact_photo_menu($rr), + 'photo_menu' => Contact::photoMenu($rr), 'thumb' => proxy_url($contact_details['thumb'], false, PROXY_SIZE_THUMB), 'name' => htmlentities(substr($contact_details['name'],0,20)), 'username' => htmlentities($contact_details['name']), 'details' => $contact_details['location'], 'tags' => $contact_details['keywords'], 'about' => $contact_details['about'], - 'account_type' => account_type($contact_details), + 'account_type' => Contact::getAccountType($contact_details), 'url' => $url, 'sparkle' => '', 'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']), diff --git a/src/Core/NotificationsManager.php b/src/Core/NotificationsManager.php index 5e2f1ad1f..b3146a1d3 100644 --- a/src/Core/NotificationsManager.php +++ b/src/Core/NotificationsManager.php @@ -775,7 +775,7 @@ class NotificationsManager $sql_extra = " AND `ignore` = 0 "; } - /// @todo Fetch contact details by "get_contact_details_by_url" instead of queries to contact, fcontact and gcontact + /// @todo Fetch contact details by "Contact::getDetailsByUrl" instead of queries to contact, fcontact and gcontact $r = q( "SELECT `intro`.`id` AS `intro_id`, `intro`.*, `contact`.*, `fcontact`.`name` AS `fname`, `fcontact`.`url` AS `furl`, @@ -904,7 +904,7 @@ class NotificationsManager // If the network and addr is still not available // get the missing data data from other sources if ($arr['gnetwork'] == "" || $arr['gaddr'] == "") { - $ret = get_contact_details_by_url($arr['url']); + $ret = Contact::getDetailsByURL($arr['url']); if ($arr['gnetwork'] == "" && $ret['network'] != "") { $arr['gnetwork'] = $ret['network']; diff --git a/src/Model/GlobalContact.php b/src/Model/GlobalContact.php index dc30c8b69..fe45d5bb7 100644 --- a/src/Model/GlobalContact.php +++ b/src/Model/GlobalContact.php @@ -895,7 +895,7 @@ class GlobalContact intval($uid) ); - $location = formatted_location( + $location = Profile::formatLocation( array("locality" => $r[0]["locality"], "region" => $r[0]["region"], "country-name" => $r[0]["country-name"]) ); @@ -1002,4 +1002,16 @@ class GlobalContact q("UPDATE `gserver` SET `last_poco_query` = '%s' WHERE `nurl` = '%s'", dbesc(datetime_convert()), dbesc($server["nurl"])); } } + + public static function getRandomUrl() { + $r = q("SELECT `url` FROM `gcontact` WHERE `network` = '%s' + AND `last_contact` >= `last_failure` + AND `updated` > UTC_TIMESTAMP - INTERVAL 1 MONTH + ORDER BY rand() LIMIT 1", + dbesc(NETWORK_DFRN)); + + if (DBM::is_result($r)) + return dirname($r[0]['url']); + return ''; + } } diff --git a/src/Network/Probe.php b/src/Network/Probe.php index b75895612..c6bf46f79 100644 --- a/src/Network/Probe.php +++ b/src/Network/Probe.php @@ -793,7 +793,7 @@ class Probe { } } - $location = formatted_location($json); + $location = Profile::formatLocation($json); if ($location) { $data["location"] = $location; } diff --git a/src/Object/Contact.php b/src/Object/Contact.php index 2b8a11640..876083971 100644 --- a/src/Object/Contact.php +++ b/src/Object/Contact.php @@ -538,7 +538,7 @@ class Contact extends BaseObject * * @return integer Contact ID */ - public static function getIdForUrl($url, $uid = 0, $no_update = false) + public static function getIdForURL($url, $uid = 0, $no_update = false) { logger("Get contact data for url " . $url . " and user " . $uid . " - " . System::callstack(), LOGGER_DEBUG); @@ -603,7 +603,7 @@ class Contact extends BaseObject } if (!$contact_id && ($data["alias"] != '') && ($data["alias"] != $url)) { - $contact_id = self::getIdForUrl($data["alias"], $uid, true); + $contact_id = self::getIdForURL($data["alias"], $uid, true); } $url = $data["url"]; diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index e0daaf360..8547d2302 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -708,7 +708,7 @@ class DFRN if (trim($profile["locality"].$profile["region"].$profile["country-name"]) != "") { $element = $doc->createElement("poco:address"); - XML::add_element($doc, $element, "poco:formatted", formatted_location($profile)); + XML::add_element($doc, $element, "poco:formatted", Profile::formatLocation($profile)); if (trim($profile["locality"]) != "") { XML::add_element($doc, $element, "poco:locality", $profile["locality"]); @@ -742,8 +742,7 @@ class DFRN */ private static function add_entry_author($doc, $element, $contact_url, $item) { - - $contact = get_contact_details_by_url($contact_url, $item["uid"]); + $contact = Contact::getDetailsByURL($contact_url, $item["uid"]); $author = $doc->createElement($element); XML::add_element($doc, $author, "name", $contact["name"]); @@ -1373,8 +1372,7 @@ class DFRN if ($contact['term-date'] > NULL_DATE) { logger("dfrn_deliver: $url back from the dead - removing mark for death"); - include_once 'include/Contact.php'; - unmark_for_death($contact); + Contact::unmarkForArchival($contact); } $res = parse_xml_string($xml); diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index d7f55b6f4..bf1988d2c 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -950,7 +950,7 @@ class Diaspora * We haven't found it? * We use another function for it that will possibly create a contact entry. */ - $cid = get_contact($handle, $uid); + $cid = Contact::getIdForURL($handle, $uid); if ($cid > 0) { /// @TODO Contact retrieval should be encapsulated into an "entity" class like `Contact` @@ -1342,7 +1342,7 @@ class Diaspora // We are receiving content from a user that possibly is about to be terminated // This means the user is vital, so we remove a possible termination date. - unmark_for_death($r[0]); + Contact::unmarkForArchival($r[0]); } else { $cid = $contact["id"]; $network = NETWORK_DIASPORA; @@ -1521,7 +1521,7 @@ class Diaspora } // We now remove the contact - contact_remove($contact["id"]); + Contact::remove($contact["id"]); return true; } @@ -2810,7 +2810,7 @@ class Diaspora case "Person": /// @todo What should we do with an "unshare"? // Removing the contact isn't correct since we still can read the public items - contact_remove($contact["id"]); + Contact::remove($contact["id"]); return true; default: @@ -3151,11 +3151,11 @@ class Diaspora add_to_queue($contact["id"], NETWORK_DIASPORA, $envelope, $public_batch); // The message could not be delivered. We mark the contact as "dead" - mark_for_death($contact); + Contact::markForArchival($contact); } } elseif (($return_code >= 200) && ($return_code <= 299)) { // We successfully delivered a message, the contact is alive - unmark_for_death($contact); + Contact::unmarkForArchival($contact); } return(($return_code) ? $return_code : (-1)); @@ -3291,7 +3291,7 @@ class Diaspora * * @return int The result of the transmission */ - public static function send_unshare($owner, $contact) + public static function sendUnshare($owner, $contact) { $message = array("author" => self::my_handle($owner), "recipient" => $contact["addr"], @@ -4007,7 +4007,7 @@ class Diaspora $about = $profile['about']; $about = strip_tags(bbcode($about)); - $location = formatted_location($profile); + $location = Profile::formatLocation($profile); $tags = ''; if ($profile['pub_keywords']) { $kw = str_replace(',', ' ', $profile['pub_keywords']); diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index 4c0503ce6..4b8b6d470 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -153,7 +153,7 @@ class OStatus // Only update the contacts if it is an OStatus contact if ($r && ($r['id'] > 0) && !$onlyfetch && ($contact["network"] == NETWORK_OSTATUS)) { // This contact is vital, so we awake it from the dead - unmark_for_death($contact); + Contact::unmarkForArchival($contact); // Update contact data @@ -208,7 +208,7 @@ class OStatus } // Ensure that we are having this contact (with uid=0) - $cid = get_contact($aliaslink, 0); + $cid = Contact::getIdForURL($aliaslink, 0); if ($cid) { $fields = array('url', 'nurl', 'name', 'nick', 'alias', 'about', 'location'); @@ -2098,7 +2098,7 @@ class OStatus } $check_date = datetime_convert('UTC', 'UTC', $last_update, 'Y-m-d H:i:s'); - $authorid = get_contact($owner["url"], 0); + $authorid = Contact::getIdForURL($owner["url"], 0); $items = q( "SELECT `item`.*, `item`.`id` AS `item_id` FROM `item` USE INDEX (`uid_contactid_created`) diff --git a/src/Protocol/PortableContact.php b/src/Protocol/PortableContact.php index e3d9c96d8..06d47f2f9 100644 --- a/src/Protocol/PortableContact.php +++ b/src/Protocol/PortableContact.php @@ -401,7 +401,7 @@ class PortableContact } } - $location = formatted_location($noscrape); + $location = Profile::formatLocation($noscrape); if ($location) { $contact["location"] = $location; } diff --git a/src/Worker/Delivery.php b/src/Worker/Delivery.php index 8cd774d45..14fe3027f 100644 --- a/src/Worker/Delivery.php +++ b/src/Worker/Delivery.php @@ -354,10 +354,10 @@ class Delivery { add_to_queue($contact['id'],NETWORK_DFRN,$atom); // The message could not be delivered. We mark the contact as "dead" - mark_for_death($contact); + Contact::markForArchival($contact); } else { // We successfully delivered a message, the contact is alive - unmark_for_death($contact); + Contact::unmarkForArchival($contact); } break; diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php index 2ad12e791..f092282c3 100644 --- a/src/Worker/Notifier.php +++ b/src/Worker/Notifier.php @@ -120,19 +120,13 @@ class Notifier { $user = $r[0]; - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` LIMIT 1", intval($item_id)); - if (!$r) - return; - - $self = $r[0]; - $r = q("SELECT * FROM `contact` WHERE NOT `self` AND `uid` = %d", intval($item_id)); if (!$r) { return; } require_once 'include/Contact.php'; foreach ($r as $contact) { - terminate_friendship($user, $self, $contact); + Contact::terminateFriendship($user, $contact); } return; } elseif ($cmd === 'relocate') { diff --git a/src/Worker/OnePoll.php b/src/Worker/OnePoll.php index 98d130311..f8f9fcd1d 100644 --- a/src/Worker/OnePoll.php +++ b/src/Worker/OnePoll.php @@ -127,11 +127,11 @@ Class OnePoll } if (!update_contact($contact["id"])) { - mark_for_death($contact); + Contact::markForArchival($contact); logger('Contact is marked dead'); return; } else { - unmark_for_death($contact); + Contact::unmarkForArchival($contact); } } @@ -197,7 +197,7 @@ Class OnePoll // mean the software was uninstalled or the domain expired. // Will keep trying for one month. - mark_for_death($contact); + Contact::markForArchival($contact); // set the last-update so we don't keep polling $fields = array('last-update' => datetime_convert(), 'failure_update' => datetime_convert()); @@ -209,7 +209,7 @@ Class OnePoll if (!strstr($handshake_xml, '<')) { logger('poller: response from ' . $url . ' did not contain XML.'); - mark_for_death($contact); + Contact::markForArchival($contact); $fields = array('last-update' => datetime_convert(), 'failure_update' => datetime_convert()); dba::update('contact', $fields, array('id' => $contact['id'])); @@ -228,10 +228,10 @@ Class OnePoll $fields = array('last-update' => datetime_convert(), 'failure_update' => datetime_convert()); dba::update('contact', $fields, array('id' => $contact['id'])); - mark_for_death($contact); + Contact::markForArchival($contact); } elseif ($contact['term-date'] > NULL_DATE) { logger("poller: $url back from the dead - removing mark for death"); - unmark_for_death($contact); + Contact::unmarkForArchival($contact); } if ((intval($res->status) != 0) || !strlen($res->challenge) || !strlen($res->dfrn_id)) { From 5ee728972e5e8d16c482fe82a0dd5ecde6ba26b2 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 19 Nov 2017 17:05:21 -0500 Subject: [PATCH 068/175] Remove include/Contact.php - Remove all mentions to include/Contact.php --- include/Contact.php | 900 ------------------------------ include/bbcode.php | 1 - include/contact_widgets.php | 2 - include/conversation.php | 1 - include/items.php | 1 - include/threads.php | 2 - mod/admin.php | 2 - mod/allfriends.php | 1 - mod/common.php | 1 - mod/contacts.php | 1 - mod/dfrn_notify.php | 1 - mod/dirfind.php | 1 - mod/display.php | 2 - mod/follow.php | 1 - mod/hovercard.php | 2 - mod/item.php | 1 - mod/nogroup.php | 2 - mod/profiles.php | 2 - mod/randprof.php | 2 - mod/removeme.php | 1 - mod/unfollow.php | 1 - mod/viewcontacts.php | 1 - src/Core/NotificationsManager.php | 1 - src/Model/GlobalContact.php | 1 - src/Protocol/DFRN.php | 1 - src/Protocol/Diaspora.php | 1 - src/Protocol/OStatus.php | 1 - src/Protocol/PortableContact.php | 1 - src/Worker/Expire.php | 1 - src/Worker/Notifier.php | 1 - src/Worker/OnePoll.php | 1 - 31 files changed, 938 deletions(-) delete mode 100644 include/Contact.php diff --git a/include/Contact.php b/include/Contact.php deleted file mode 100644 index cd1696af5..000000000 --- a/include/Contact.php +++ /dev/null @@ -1,900 +0,0 @@ - $uid), array("limit" => 1)); - - call_hooks('remove_user',$r); - - // save username (actually the nickname as it is guaranteed - // unique), so it cannot be re-registered in the future. - - dba::insert('userd', array('username' => $r['nickname'])); - - // The user and related data will be deleted in "cron_expire_and_remove_users" (cronjobs.php) - q("UPDATE `user` SET `account_removed` = 1, `account_expires_on` = UTC_TIMESTAMP() WHERE `uid` = %d", intval($uid)); - Worker::add(PRIORITY_HIGH, "Notifier", "removeme", $uid); - - // Send an update to the directory - Worker::add(PRIORITY_LOW, "Directory", $r['url']); - - if($uid == local_user()) { - unset($_SESSION['authenticated']); - unset($_SESSION['uid']); - goaway(System::baseUrl()); - } -} - - -function contact_remove($id) { - - // We want just to make sure that we don't delete our "self" contact - $r = q("SELECT `uid` FROM `contact` WHERE `id` = %d AND NOT `self` LIMIT 1", - intval($id) - ); - if (!DBM::is_result($r) || !intval($r[0]['uid'])) { - return; - } - - $archive = PConfig::get($r[0]['uid'], 'system','archive_removed_contacts'); - if ($archive) { - q("update contact set `archive` = 1, `network` = 'none', `writable` = 0 where id = %d", - intval($id) - ); - return; - } - - dba::delete('contact', array('id' => $id)); - - // Delete the rest in the background - Worker::add(PRIORITY_LOW, 'RemoveContact', $id); -} - - -// sends an unfriend message. Does not remove the contact - -function terminate_friendship($user,$self,$contact) { - - /// @TODO Get rid of this, include/datetime.php should care about it by itself - $a = get_app(); - - require_once 'include/datetime.php'; - - if ($contact['network'] === NETWORK_OSTATUS) { - // create an unfollow slap - $item = array(); - $item['verb'] = NAMESPACE_OSTATUS."/unfollow"; - $item['follow'] = $contact["url"]; - $slap = OStatus::salmon($item, $user); - - if ((x($contact,'notify')) && (strlen($contact['notify']))) { - require_once 'include/salmon.php'; - slapper($user,$contact['notify'],$slap); - } - } elseif ($contact['network'] === NETWORK_DIASPORA) { - Diaspora::send_unshare($user,$contact); - } elseif ($contact['network'] === NETWORK_DFRN) { - DFRN::deliver($user,$contact,'placeholder', 1); - } - -} - - -// Contact has refused to recognise us as a friend. We will start a countdown. -// If they still don't recognise us in 32 days, the relationship is over, -// and we won't waste any more time trying to communicate with them. -// This provides for the possibility that their database is temporarily messed -// up or some other transient event and that there's a possibility we could recover from it. - -function mark_for_death($contact) { - - if($contact['archive']) - return; - - if ($contact['term-date'] <= NULL_DATE) { - q("UPDATE `contact` SET `term-date` = '%s' WHERE `id` = %d", - dbesc(datetime_convert()), - intval($contact['id']) - ); - - if ($contact['url'] != '') { - q("UPDATE `contact` SET `term-date` = '%s' - WHERE `nurl` = '%s' AND `term-date` <= '1000-00-00'", - dbesc(datetime_convert()), - dbesc(normalise_link($contact['url'])) - ); - } - } else { - - /// @todo - /// We really should send a notification to the owner after 2-3 weeks - /// so they won't be surprised when the contact vanishes and can take - /// remedial action if this was a serious mistake or glitch - - /// @todo - /// Check for contact vitality via probing - - $expiry = $contact['term-date'] . ' + 32 days '; - if(datetime_convert() > datetime_convert('UTC','UTC',$expiry)) { - - // relationship is really truly dead. - // archive them rather than delete - // though if the owner tries to unarchive them we'll start the whole process over again - - q("UPDATE `contact` SET `archive` = 1 WHERE `id` = %d", - intval($contact['id']) - ); - - if ($contact['url'] != '') { - q("UPDATE `contact` SET `archive` = 1 WHERE `nurl` = '%s'", - dbesc(normalise_link($contact['url'])) - ); - } - } - } - -} - -function unmark_for_death($contact) { - - $r = q("SELECT `term-date` FROM `contact` WHERE `id` = %d AND (`term-date` > '%s' OR `archive`)", - intval($contact['id']), - dbesc('1000-00-00 00:00:00') - ); - - // We don't need to update, we never marked this contact as dead - if (!DBM::is_result($r)) { - return; - } - - // It's a miracle. Our dead contact has inexplicably come back to life. - $fields = array('term-date' => NULL_DATE, 'archive' => false); - dba::update('contact', $fields, array('id' => $contact['id'])); - - if ($contact['url'] != '') { - dba::update('contact', $fields, array('nurl' => normalise_link($contact['url']))); - } -} - -/** - * @brief Get contact data for a given profile link - * - * The function looks at several places (contact table and gcontact table) for the contact - * It caches its result for the same script execution to prevent duplicate calls - * - * @param string $url The profile link - * @param int $uid User id - * @param array $default If not data was found take this data as default value - * - * @return array Contact data - */ -function get_contact_details_by_url($url, $uid = -1, $default = array()) { - static $cache = array(); - - if ($url == '') { - return $default; - } - - if ($uid == -1) { - $uid = local_user(); - } - - if (isset($cache[$url][$uid])) { - return $cache[$url][$uid]; - } - - $ssl_url = str_replace('http://', 'https://', $url); - - // Fetch contact data from the contact table for the given user - $s = dba::p("SELECT `id`, `id` AS `cid`, 0 AS `gid`, 0 AS `zid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`, - `keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, `self` - FROM `contact` WHERE `nurl` = ? AND `uid` = ?", - normalise_link($url), $uid); - $r = dba::inArray($s); - - // Fetch contact data from the contact table for the given user, checking with the alias - if (!DBM::is_result($r)) { - $s = dba::p("SELECT `id`, `id` AS `cid`, 0 AS `gid`, 0 AS `zid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`, - `keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, `self` - FROM `contact` WHERE `alias` IN (?, ?, ?) AND `uid` = ?", - normalise_link($url), $url, $ssl_url, $uid); - $r = dba::inArray($s); - } - - // Fetch the data from the contact table with "uid=0" (which is filled automatically) - if (!DBM::is_result($r)) { - $s = dba::p("SELECT `id`, 0 AS `cid`, `id` AS `zid`, 0 AS `gid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`, - `keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, 0 AS `self` - FROM `contact` WHERE `nurl` = ? AND `uid` = 0", - normalise_link($url)); - $r = dba::inArray($s); - } - - // Fetch the data from the contact table with "uid=0" (which is filled automatically) - checked with the alias - if (!DBM::is_result($r)) { - $s = dba::p("SELECT `id`, 0 AS `cid`, `id` AS `zid`, 0 AS `gid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`, - `keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, 0 AS `self` - FROM `contact` WHERE `alias` IN (?, ?, ?) AND `uid` = 0", - normalise_link($url), $url, $ssl_url); - $r = dba::inArray($s); - } - - // Fetch the data from the gcontact table - if (!DBM::is_result($r)) { - $s = dba::p("SELECT 0 AS `id`, 0 AS `cid`, `id` AS `gid`, 0 AS `zid`, 0 AS `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, '' AS `xmpp`, - `keywords`, `gender`, `photo`, `photo` AS `thumb`, `photo` AS `micro`, `community` AS `forum`, 0 AS `prv`, `community`, `contact-type`, `birthday`, 0 AS `self` - FROM `gcontact` WHERE `nurl` = ?", - normalise_link($url)); - $r = dba::inArray($s); - } - - if (DBM::is_result($r)) { - // If there is more than one entry we filter out the connector networks - if (count($r) > 1) { - foreach ($r AS $id => $result) { - if ($result["network"] == NETWORK_STATUSNET) { - unset($r[$id]); - } - } - } - - $profile = array_shift($r); - - // "bd" always contains the upcoming birthday of a contact. - // "birthday" might contain the birthday including the year of birth. - if ($profile["birthday"] > '0001-01-01') { - $bd_timestamp = strtotime($profile["birthday"]); - $month = date("m", $bd_timestamp); - $day = date("d", $bd_timestamp); - - $current_timestamp = time(); - $current_year = date("Y", $current_timestamp); - $current_month = date("m", $current_timestamp); - $current_day = date("d", $current_timestamp); - - $profile["bd"] = $current_year."-".$month."-".$day; - $current = $current_year."-".$current_month."-".$current_day; - - if ($profile["bd"] < $current) { - $profile["bd"] = (++$current_year)."-".$month."-".$day; - } - } else { - $profile["bd"] = '0001-01-01'; - } - } else { - $profile = $default; - } - - if (($profile["photo"] == "") && isset($default["photo"])) { - $profile["photo"] = $default["photo"]; - } - - if (($profile["name"] == "") && isset($default["name"])) { - $profile["name"] = $default["name"]; - } - - if (($profile["network"] == "") && isset($default["network"])) { - $profile["network"] = $default["network"]; - } - - if (($profile["thumb"] == "") && isset($profile["photo"])) { - $profile["thumb"] = $profile["photo"]; - } - - if (($profile["micro"] == "") && isset($profile["thumb"])) { - $profile["micro"] = $profile["thumb"]; - } - - if ((($profile["addr"] == "") || ($profile["name"] == "")) && ($profile["gid"] != 0) && - in_array($profile["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) { - Worker::add(PRIORITY_LOW, "UpdateGContact", $profile["gid"]); - } - - // Show contact details of Diaspora contacts only if connected - if (($profile["cid"] == 0) && ($profile["network"] == NETWORK_DIASPORA)) { - $profile["location"] = ""; - $profile["about"] = ""; - $profile["gender"] = ""; - $profile["birthday"] = '0001-01-01'; - } - - $cache[$url][$uid] = $profile; - - return $profile; -} - -/** - * @brief Get contact data for a given address - * - * The function looks at several places (contact table and gcontact table) for the contact - * - * @param string $addr The profile link - * @param int $uid User id - * - * @return array Contact data - */ -function get_contact_details_by_addr($addr, $uid = -1) { - static $cache = array(); - - if ($addr == '') { - return array(); - } - - if ($uid == -1) { - $uid = local_user(); - } - - // Fetch contact data from the contact table for the given user - $r = q("SELECT `id`, `id` AS `cid`, 0 AS `gid`, 0 AS `zid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`, - `keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, `self` - FROM `contact` WHERE `addr` = '%s' AND `uid` = %d", - dbesc($addr), intval($uid)); - - // Fetch the data from the contact table with "uid=0" (which is filled automatically) - if (!DBM::is_result($r)) - $r = q("SELECT `id`, 0 AS `cid`, `id` AS `zid`, 0 AS `gid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`, - `keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, 0 AS `self` - FROM `contact` WHERE `addr` = '%s' AND `uid` = 0", - dbesc($addr)); - - // Fetch the data from the gcontact table - if (!DBM::is_result($r)) - $r = q("SELECT 0 AS `id`, 0 AS `cid`, `id` AS `gid`, 0 AS `zid`, 0 AS `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, '' AS `xmpp`, - `keywords`, `gender`, `photo`, `photo` AS `thumb`, `photo` AS `micro`, `community` AS `forum`, 0 AS `prv`, `community`, `contact-type`, `birthday`, 0 AS `self` - FROM `gcontact` WHERE `addr` = '%s'", - dbesc($addr)); - - if (!DBM::is_result($r)) { - $data = Probe::uri($addr); - - $profile = get_contact_details_by_url($data['url'], $uid); - } else { - $profile = $r[0]; - } - - return $profile; -} - -if (! function_exists('contact_photo_menu')) { -function contact_photo_menu($contact, $uid = 0) -{ - $a = get_app(); - - $contact_url = ''; - $pm_url = ''; - $status_link = ''; - $photos_link = ''; - $posts_link = ''; - $contact_drop_link = ''; - $poke_link = ''; - - if ($uid == 0) { - $uid = local_user(); - } - - if ($contact['uid'] != $uid) { - if ($uid == 0) { - $profile_link = zrl($contact['url']); - $menu = Array('profile' => array(t('View Profile'), $profile_link, true)); - - return $menu; - } - - $r = q("SELECT * FROM `contact` WHERE `nurl` = '%s' AND `network` = '%s' AND `uid` = %d", - dbesc($contact['nurl']), dbesc($contact['network']), intval($uid)); - if ($r) { - return contact_photo_menu($r[0], $uid); - } else { - $profile_link = zrl($contact['url']); - $connlnk = 'follow/?url='.$contact['url']; - $menu = array( - 'profile' => array(t('View Profile'), $profile_link, true), - 'follow' => array(t('Connect/Follow'), $connlnk, true) - ); - - return $menu; - } - } - - $sparkle = false; - if ($contact['network'] === NETWORK_DFRN) { - $sparkle = true; - $profile_link = System::baseUrl() . '/redir/' . $contact['id']; - } else { - $profile_link = $contact['url']; - } - - if ($profile_link === 'mailbox') { - $profile_link = ''; - } - - if ($sparkle) { - $status_link = $profile_link . '?url=status'; - $photos_link = $profile_link . '?url=photos'; - $profile_link = $profile_link . '?url=profile'; - } - - if (in_array($contact['network'], array(NETWORK_DFRN, NETWORK_DIASPORA))) { - $pm_url = System::baseUrl() . '/message/new/' . $contact['id']; - } - - if ($contact['network'] == NETWORK_DFRN) { - $poke_link = System::baseUrl() . '/poke/?f=&c=' . $contact['id']; - } - - $contact_url = System::baseUrl() . '/contacts/' . $contact['id']; - - $posts_link = System::baseUrl() . '/contacts/' . $contact['id'] . '/posts'; - $contact_drop_link = System::baseUrl() . '/contacts/' . $contact['id'] . '/drop?confirm=1'; - - /** - * menu array: - * "name" => [ "Label", "link", (bool)Should the link opened in a new tab? ] - */ - $menu = array( - 'status' => array(t("View Status"), $status_link, true), - 'profile' => array(t("View Profile"), $profile_link, true), - 'photos' => array(t("View Photos"), $photos_link, true), - 'network' => array(t("Network Posts"), $posts_link, false), - 'edit' => array(t("View Contact"), $contact_url, false), - 'drop' => array(t("Drop Contact"), $contact_drop_link, false), - 'pm' => array(t("Send PM"), $pm_url, false), - 'poke' => array(t("Poke"), $poke_link, false), - ); - - - $args = array('contact' => $contact, 'menu' => &$menu); - - call_hooks('contact_photo_menu', $args); - - $menucondensed = array(); - - foreach ($menu AS $menuname => $menuitem) { - if ($menuitem[1] != '') { - $menucondensed[$menuname] = $menuitem; - } - } - - return $menucondensed; -}} - - -function random_profile() { - $r = q("SELECT `url` FROM `gcontact` WHERE `network` = '%s' - AND `last_contact` >= `last_failure` - AND `updated` > UTC_TIMESTAMP - INTERVAL 1 MONTH - ORDER BY rand() LIMIT 1", - dbesc(NETWORK_DFRN)); - - if (DBM::is_result($r)) - return dirname($r[0]['url']); - return ''; -} - - -function contacts_not_grouped($uid,$start = 0,$count = 0) { - - if(! $count) { - $r = q("select count(*) as total from contact where uid = %d and self = 0 and id not in (select distinct(`contact-id`) from group_member where uid = %d) ", - intval($uid), - intval($uid) - ); - - return $r; - - - } - - $r = q("select * from contact where uid = %d and self = 0 and id not in (select distinct(`contact-id`) from group_member where uid = %d) and blocked = 0 and pending = 0 limit %d, %d", - intval($uid), - intval($uid), - intval($start), - intval($count) - ); - - return $r; -} - -/** - * @brief Fetch the contact id for a given url and user - * - * First lookup in the contact table to find a record matching either `url`, `nurl`, - * `addr` or `alias`. - * - * If there's no record and we aren't looking for a public contact, we quit. - * If there's one, we check that it isn't time to update the picture else we - * directly return the found contact id. - * - * Second, we probe the provided $url wether it's http://server.tld/profile or - * nick@server.tld. We quit if we can't get any info back. - * - * Third, we create the contact record if it doesn't exist - * - * Fourth, we update the existing record with the new data (avatar, alias, nick) - * if there's any updates - * - * @param string $url Contact URL - * @param integer $uid The user id for the contact (0 = public contact) - * @param boolean $no_update Don't update the contact - * - * @return integer Contact ID - */ -function get_contact($url, $uid = 0, $no_update = false) { - logger("Get contact data for url ".$url." and user ".$uid." - ".System::callstack(), LOGGER_DEBUG); - - $data = array(); - $contact_id = 0; - - if ($url == '') { - return 0; - } - - // We first try the nurl (http://server.tld/nick), most common case - $contact = dba::select('contact', array('id', 'avatar-date'), array('nurl' => normalise_link($url), 'uid' => $uid), array('limit' => 1)); - - // Then the addr (nick@server.tld) - if (!DBM::is_result($contact)) { - $contact = dba::select('contact', array('id', 'avatar-date'), array('addr' => $url, 'uid' => $uid), array('limit' => 1)); - } - - // Then the alias (which could be anything) - if (!DBM::is_result($contact)) { - // The link could be provided as http although we stored it as https - $ssl_url = str_replace('http://', 'https://', $url); - $r = dba::p("SELECT `id`, `avatar-date` FROM `contact` WHERE `alias` IN (?, ?, ?) AND `uid` = ? LIMIT 1", - $url, normalise_link($url), $ssl_url, $uid); - $contact = dba::fetch($r); - dba::close($r); - } - - if (DBM::is_result($contact)) { - $contact_id = $contact["id"]; - - // Update the contact every 7 days - $update_contact = ($contact['avatar-date'] < datetime_convert('','','now -7 days')); - - // We force the update if the avatar is empty - if ($contact['avatar'] == '') { - $update_contact = true; - } - - if (!$update_contact || $no_update) { - return $contact_id; - } - } elseif ($uid != 0) { - // Non-existing user-specific contact, exiting - return 0; - } - - $data = Probe::uri($url, "", $uid); - - // Last try in gcontact for unsupported networks - if (!in_array($data["network"], array(NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_DIASPORA, NETWORK_PUMPIO, NETWORK_MAIL))) { - if ($uid != 0) { - return 0; - } - - // Get data from the gcontact table - $gcontacts = dba::select('gcontact', array('name', 'nick', 'url', 'photo', 'addr', 'alias', 'network'), - array('nurl' => normalise_link($url)), array('limit' => 1)); - if (!DBM::is_result($gcontacts)) { - return 0; - } - - $data = array_merge($data, $gcontacts); - } - - if (!$contact_id && ($data["alias"] != '') && ($data["alias"] != $url)) { - $contact_id = get_contact($data["alias"], $uid, true); - } - - $url = $data["url"]; - if (!$contact_id) { - dba::insert('contact', array('uid' => $uid, 'created' => datetime_convert(), 'url' => $data["url"], - 'nurl' => normalise_link($data["url"]), 'addr' => $data["addr"], - 'alias' => $data["alias"], 'notify' => $data["notify"], 'poll' => $data["poll"], - 'name' => $data["name"], 'nick' => $data["nick"], 'photo' => $data["photo"], - 'keywords' => $data["keywords"], 'location' => $data["location"], 'about' => $data["about"], - 'network' => $data["network"], 'pubkey' => $data["pubkey"], - 'rel' => CONTACT_IS_SHARING, 'priority' => $data["priority"], - 'batch' => $data["batch"], 'request' => $data["request"], - 'confirm' => $data["confirm"], 'poco' => $data["poco"], - 'name-date' => datetime_convert(), 'uri-date' => datetime_convert(), - 'avatar-date' => datetime_convert(), 'writable' => 1, 'blocked' => 0, - 'readonly' => 0, 'pending' => 0)); - - $contacts = q("SELECT `id` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d ORDER BY `id` LIMIT 2", - dbesc(normalise_link($data["url"])), - intval($uid)); - if (!DBM::is_result($contacts)) { - return 0; - } - - $contact_id = $contacts[0]["id"]; - - // Update the newly created contact from data in the gcontact table - $gcontact = dba::select('gcontact', array('location', 'about', 'keywords', 'gender'), - array('nurl' => normalise_link($data["url"])), array('limit' => 1)); - if (DBM::is_result($gcontact)) { - // Only use the information when the probing hadn't fetched these values - if ($data['keywords'] != '') { - unset($gcontact['keywords']); - } - if ($data['location'] != '') { - unset($gcontact['location']); - } - if ($data['about'] != '') { - unset($gcontact['about']); - } - dba::update('contact', $gcontact, array('id' => $contact_id)); - } - - if (count($contacts) > 1 && $uid == 0 && $contact_id != 0 && $data["url"] != "") { - dba::delete('contact', array("`nurl` = ? AND `uid` = 0 AND `id` != ? AND NOT `self`", - normalise_link($data["url"]), $contact_id)); - } - } - - require_once "Photo.php"; - - update_contact_avatar($data["photo"], $uid, $contact_id); - - $contact = dba::select('contact', array('url', 'nurl', 'addr', 'alias', 'name', 'nick', 'keywords', 'location', 'about', 'avatar-date'), - array('id' => $contact_id), array('limit' => 1)); - - // This condition should always be true - if (!DBM::is_result($contact)) { - return $contact_id; - } - - $updated = array('addr' => $data['addr'], - 'alias' => $data['alias'], - 'url' => $data['url'], - 'nurl' => normalise_link($data['url']), - 'name' => $data['name'], - 'nick' => $data['nick']); - - if ($data['keywords'] != '') { - $updated['keywords'] = $data['keywords']; - } - if ($data['location'] != '') { - $updated['location'] = $data['location']; - } - if ($data['about'] != '') { - $updated['about'] = $data['about']; - } - - if (($data["addr"] != $contact["addr"]) || ($data["alias"] != $contact["alias"])) { - $updated['uri-date'] = datetime_convert(); - } - if (($data["name"] != $contact["name"]) || ($data["nick"] != $contact["nick"])) { - $updated['name-date'] = datetime_convert(); - } - - $updated['avatar-date'] = datetime_convert(); - - dba::update('contact', $updated, array('id' => $contact_id), $contact); - - return $contact_id; -} - -/** - * @brief Checks if the contact is blocked - * - * @param int $cid contact id - * - * @return boolean Is the contact blocked? - */ -function blockedContact($cid) { - if ($cid == 0) { - return false; - } - - $blocked = dba::select('contact', array('blocked'), array('id' => $cid), array('limit' => 1)); - if (!DBM::is_result($blocked)) { - return false; - } - return (bool)$blocked['blocked']; -} - -/** - * @brief Checks if the contact is hidden - * - * @param int $cid contact id - * - * @return boolean Is the contact hidden? - */ -function hiddenContact($cid) { - if ($cid == 0) { - return false; - } - - $hidden = dba::select('contact', array('hidden'), array('id' => $cid), array('limit' => 1)); - if (!DBM::is_result($hidden)) { - return false; - } - return (bool)$hidden['hidden']; -} - -/** - * @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(App $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"; - - $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); - - $o .= alt_pager($a, count($r)); - - return $o; -} -/** - * @brief Returns posts from a given contact url - * - * @param App $a argv application class - * @param string $contact_url Contact URL - * - * @return string posts in HTML - */ -function posts_from_contact_url(App $a, $contact_url) { - - 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`, `id` AS `author-id`, `contact-type` FROM `contact` - WHERE `contact`.`nurl` = '%s' AND `contact`.`uid` = 0", - dbesc(normalise_link($contact_url))); - - if (!DBM::is_result($r)) { - return ''; - } - - if (in_array($r[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""))) { - $sql = "(`item`.`uid` = 0 OR (`item`.`uid` = %d AND NOT `item`.`global`))"; - } else { - $sql = "`item`.`uid` = %d"; - } - - $author_id = intval($r[0]["author-id"]); - - $contact = ($r[0]["contact-type"] == ACCOUNT_TYPE_COMMUNITY ? 'owner-id' : 'author-id'); - - $r = q(item_query()." AND `item`.`".$contact."` = %d AND ".$sql. - " ORDER BY `item`.`created` DESC LIMIT %d, %d", - intval($author_id), - intval(local_user()), - intval($a->pager['start']), - intval($a->pager['itemspage']) - ); - - $o = conversation($a, $r, 'community', false); - - $o .= alt_pager($a, count($r)); - - 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'] && ($profile['locality'] != $profile['region'])) { - if($location) - $location .= ', '; - - $location .= $profile['region']; - } - - if($profile['country-name']) { - if($location) - $location .= ', '; - - $location .= $profile['country-name']; - } - - return $location; -} - -/** - * @brief Returns the account type name - * - * The function can be called with either the user or the contact array - * - * @param array $contact contact or user array - */ -function account_type($contact) { - - // There are several fields that indicate that the contact or user is a forum - // "page-flags" is a field in the user table, - // "forum" and "prv" are used in the contact table. They stand for PAGE_COMMUNITY and PAGE_PRVGROUP. - // "community" is used in the gcontact table and is true if the contact is PAGE_COMMUNITY or PAGE_PRVGROUP. - if((isset($contact['page-flags']) && (intval($contact['page-flags']) == PAGE_COMMUNITY)) - || (isset($contact['page-flags']) && (intval($contact['page-flags']) == PAGE_PRVGROUP)) - || (isset($contact['forum']) && intval($contact['forum'])) - || (isset($contact['prv']) && intval($contact['prv'])) - || (isset($contact['community']) && intval($contact['community']))) - $type = ACCOUNT_TYPE_COMMUNITY; - else - $type = ACCOUNT_TYPE_PERSON; - - // The "contact-type" (contact table) and "account-type" (user table) are more general then the chaos from above. - if (isset($contact["contact-type"])) - $type = $contact["contact-type"]; - if (isset($contact["account-type"])) - $type = $contact["account-type"]; - - switch($type) { - case ACCOUNT_TYPE_ORGANISATION: - $account_type = t("Organisation"); - break; - case ACCOUNT_TYPE_NEWS: - $account_type = t('News'); - break; - case ACCOUNT_TYPE_COMMUNITY: - $account_type = t("Forum"); - break; - default: - $account_type = ""; - break; - } - - return $account_type; -} diff --git a/include/bbcode.php b/include/bbcode.php index 105e9595e..83ea3fcfa 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -11,7 +11,6 @@ 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'; require_once 'include/plaintext.php'; function bb_PictureCacheExt($matches) { diff --git a/include/contact_widgets.php b/include/contact_widgets.php index efb258eca..036504a4f 100644 --- a/include/contact_widgets.php +++ b/include/contact_widgets.php @@ -22,8 +22,6 @@ function follow_widget($value = "") { } function findpeople_widget() { - require_once 'include/Contact.php'; - $a = get_app(); $global_dir = Config::get('system', 'directory'); diff --git a/include/conversation.php b/include/conversation.php index 62c4d678e..5e764e670 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -513,7 +513,6 @@ if (!function_exists('conversation')) { function conversation(App $a, $items, $mode, $update, $preview = false) { require_once 'include/bbcode.php'; - require_once 'include/Contact.php'; require_once 'mod/proxy.php'; $ssl_state = ((local_user()) ? true : false); diff --git a/include/items.php b/include/items.php index 8862eb1ab..1f5511217 100644 --- a/include/items.php +++ b/include/items.php @@ -29,7 +29,6 @@ require_once 'include/email.php'; require_once 'include/threads.php'; require_once 'include/plaintext.php'; require_once 'include/feed.php'; -require_once 'include/Contact.php'; require_once 'mod/share.php'; require_once 'include/enotify.php'; require_once 'include/group.php'; diff --git a/include/threads.php b/include/threads.php index e776a37e7..107f2f76b 100644 --- a/include/threads.php +++ b/include/threads.php @@ -99,7 +99,6 @@ function add_shadow_thread($itemid) { if (!DBM::is_result($r)) { // Preparing public shadow (removing user specific data) require_once("include/items.php"); - require_once("include/Contact.php"); unset($item[0]['id']); $item[0]['uid'] = 0; @@ -159,7 +158,6 @@ function add_shadow_entry($itemid) { // Preparing public shadow (removing user specific data) require_once("include/items.php"); - require_once("include/Contact.php"); unset($item['id']); $item['uid'] = 0; diff --git a/mod/admin.php b/mod/admin.php index 34055ba5d..7a7ca1410 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -1444,7 +1444,6 @@ function admin_page_users_post(App $a) { notice(sprintf(tt("%s user blocked/unblocked", "%s users blocked/unblocked", count($users)), count($users))); } if (x($_POST,'page_users_delete')) { - require_once("include/Contact.php"); foreach ($users as $uid) { User::remove($uid); } @@ -1492,7 +1491,6 @@ function admin_page_users(App $a) { case "delete": check_form_security_token_redirectOnErr('/admin/users', 'admin_users', 't'); // delete user - require_once("include/Contact.php"); User::remove($uid); notice(sprintf(t("User '%s' deleted"), $user[0]['username']).EOL); diff --git a/mod/allfriends.php b/mod/allfriends.php index c88ce9631..3cfe6c0f9 100644 --- a/mod/allfriends.php +++ b/mod/allfriends.php @@ -8,7 +8,6 @@ use Friendica\Database\DBM; use Friendica\Model\GlobalContact; use Friendica\Object\Contact; -require_once 'include/Contact.php'; require_once 'include/contact_selectors.php'; require_once 'mod/contacts.php'; diff --git a/mod/common.php b/mod/common.php index c0bab4171..9933c3f51 100644 --- a/mod/common.php +++ b/mod/common.php @@ -7,7 +7,6 @@ use Friendica\Database\DBM; use Friendica\Model\GlobalContact; use Friendica\Object\Contact; -require_once 'include/Contact.php'; require_once 'include/contact_selectors.php'; require_once 'mod/contacts.php'; diff --git a/mod/contacts.php b/mod/contacts.php index c8c73b51f..1859c2aa6 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -8,7 +8,6 @@ use Friendica\Model\GlobalContact; use Friendica\Network\Probe; use Friendica\Object\Contact; -require_once 'include/Contact.php'; require_once 'include/contact_selectors.php'; require_once 'mod/proxy.php'; require_once 'include/Photo.php'; diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 8ad599c9d..8e2b18e49 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -128,7 +128,6 @@ function dfrn_notify_post(App $a) { logger('dfrn_notify: data: ' . $data, LOGGER_DATA); if ($dissolve == 1) { - require_once('include/Contact.php'); // Relationship is dissolved permanently Contact::remove($importer['id']); logger('relationship dissolved : ' . $importer['name'] . ' dissolved ' . $importer['username']); diff --git a/mod/dirfind.php b/mod/dirfind.php index 5a31ef996..4ba122b56 100644 --- a/mod/dirfind.php +++ b/mod/dirfind.php @@ -12,7 +12,6 @@ use Friendica\Object\Contact; use Friendica\Protocol\PortableContact; require_once 'include/contact_widgets.php'; -require_once 'include/Contact.php'; require_once 'include/contact_selectors.php'; require_once 'mod/contacts.php'; diff --git a/mod/display.php b/mod/display.php index aa885f5bd..e81e654ac 100644 --- a/mod/display.php +++ b/mod/display.php @@ -115,8 +115,6 @@ function display_init(App $a) { function display_fetchauthor($a, $item) { - require_once("include/Contact.php"); - $profiledata = array(); $profiledata["uid"] = -1; $profiledata["nickname"] = $item["author-name"]; diff --git a/mod/follow.php b/mod/follow.php index 567a955cc..b5e73ca9a 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -7,7 +7,6 @@ use Friendica\Network\Probe; use Friendica\Object\Contact; require_once 'include/follow.php'; -require_once 'include/Contact.php'; require_once 'include/contact_selectors.php'; function follow_post(App $a) { diff --git a/mod/hovercard.php b/mod/hovercard.php index 41de07c61..5542fe5b9 100644 --- a/mod/hovercard.php +++ b/mod/hovercard.php @@ -11,8 +11,6 @@ use Friendica\App; use Friendica\Core\Config; use Friendica\Model\GlobalContact; - -require_once "include/Contact.php"; use Friendica\Object\Contact; function hovercard_init(App $a) { diff --git a/mod/item.php b/mod/item.php index 7b0f21a81..8055d63ae 100644 --- a/mod/item.php +++ b/mod/item.php @@ -33,7 +33,6 @@ require_once 'include/files.php'; require_once 'include/threads.php'; require_once 'include/text.php'; require_once 'include/items.php'; -require_once 'include/Contact.php'; function item_post(App $a) { diff --git a/mod/nogroup.php b/mod/nogroup.php index c50ec486c..a66a70a1e 100644 --- a/mod/nogroup.php +++ b/mod/nogroup.php @@ -6,7 +6,6 @@ use Friendica\App; use Friendica\Database\DBM; use Friendica\Object\Contact; -require_once 'include/Contact.php'; require_once 'include/contact_selectors.php'; function nogroup_init(App $a) @@ -32,7 +31,6 @@ function nogroup_content(App $a) return ''; } - require_once 'include/Contact.php'; $r = Contact::getUngroupedList(local_user()); if (DBM::is_result($r)) { $a->set_pager_total($r[0]['total']); diff --git a/mod/profiles.php b/mod/profiles.php index 03265ccf4..75023beb6 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -10,8 +10,6 @@ use Friendica\Core\Worker; use Friendica\Database\DBM; use Friendica\Model\GlobalContact; use Friendica\Network\Probe; - -require_once 'include/Contact.php'; use Friendica\Object\Profile; function profiles_init(App $a) { diff --git a/mod/randprof.php b/mod/randprof.php index 55b77aec8..38d05c53e 100644 --- a/mod/randprof.php +++ b/mod/randprof.php @@ -5,8 +5,6 @@ use Friendica\Core\System; use Friendica\Model\GlobalContact; function randprof_init(App $a) { - require_once('include/Contact.php'); - $x = GlobalContact::getRandomUrl(); if ($x) { diff --git a/mod/removeme.php b/mod/removeme.php index 4b5591c0b..b1ad2e5ca 100644 --- a/mod/removeme.php +++ b/mod/removeme.php @@ -29,7 +29,6 @@ function removeme_post(App $a) { $encrypted = hash('whirlpool',trim($_POST['qxz_password'])); if ((strlen($a->user['password'])) && ($encrypted === $a->user['password'])) { - require_once('include/Contact.php'); User::remove($a->user['uid']); // NOTREACHED } diff --git a/mod/unfollow.php b/mod/unfollow.php index 652394ac5..3f94fb576 100644 --- a/mod/unfollow.php +++ b/mod/unfollow.php @@ -6,7 +6,6 @@ use Friendica\Database\DBM; use Friendica\Object\Contact; require_once 'include/follow.php'; -require_once 'include/Contact.php'; require_once 'include/contact_selectors.php'; function unfollow_post(App $a) { diff --git a/mod/viewcontacts.php b/mod/viewcontacts.php index 0a1021a79..30ae92f8e 100644 --- a/mod/viewcontacts.php +++ b/mod/viewcontacts.php @@ -5,7 +5,6 @@ use Friendica\Core\Config; use Friendica\Database\DBM; use Friendica\Object\Contact; -require_once('include/Contact.php'); require_once('include/contact_selectors.php'); function viewcontacts_init(App $a) { diff --git a/src/Core/NotificationsManager.php b/src/Core/NotificationsManager.php index b3146a1d3..42d514e61 100644 --- a/src/Core/NotificationsManager.php +++ b/src/Core/NotificationsManager.php @@ -14,7 +14,6 @@ use Friendica\Object\Contact; require_once 'include/html2plain.php'; require_once 'include/datetime.php'; require_once 'include/bbcode.php'; -require_once 'include/Contact.php'; /** * @brief Methods for read and write notifications from/to database diff --git a/src/Model/GlobalContact.php b/src/Model/GlobalContact.php index fe45d5bb7..e73bfb907 100644 --- a/src/Model/GlobalContact.php +++ b/src/Model/GlobalContact.php @@ -18,7 +18,6 @@ use Exception; require_once 'include/datetime.php'; require_once 'include/network.php'; require_once 'include/html2bbcode.php'; -require_once 'include/Contact.php'; require_once 'include/Photo.php'; /** diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 8547d2302..592bca83c 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -23,7 +23,6 @@ use dba; use DOMDocument; use DomXPath; -require_once "include/Contact.php"; require_once "include/enotify.php"; require_once "include/threads.php"; require_once "include/items.php"; diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index bf1988d2c..ccd1ec594 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -27,7 +27,6 @@ use SimpleXMLElement; require_once 'include/items.php'; require_once 'include/bb2diaspora.php'; -require_once 'include/Contact.php'; require_once 'include/Photo.php'; require_once 'include/group.php'; require_once 'include/datetime.php'; diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index 4b8b6d470..dfdc75498 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -18,7 +18,6 @@ use dba; use DOMDocument; use DomXPath; -require_once 'include/Contact.php'; require_once 'include/threads.php'; require_once 'include/html2bbcode.php'; require_once 'include/bbcode.php'; diff --git a/src/Protocol/PortableContact.php b/src/Protocol/PortableContact.php index 06d47f2f9..6bd175010 100644 --- a/src/Protocol/PortableContact.php +++ b/src/Protocol/PortableContact.php @@ -26,7 +26,6 @@ use Exception; require_once 'include/datetime.php'; require_once 'include/network.php'; require_once 'include/html2bbcode.php'; -require_once 'include/Contact.php'; require_once 'include/Photo.php'; class PortableContact diff --git a/src/Worker/Expire.php b/src/Worker/Expire.php index 11f12df03..1485f3570 100644 --- a/src/Worker/Expire.php +++ b/src/Worker/Expire.php @@ -17,7 +17,6 @@ class Expire { require_once('include/datetime.php'); require_once('include/items.php'); - require_once('include/Contact.php'); load_hooks(); diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php index f092282c3..142bf866d 100644 --- a/src/Worker/Notifier.php +++ b/src/Worker/Notifier.php @@ -124,7 +124,6 @@ class Notifier { if (!$r) { return; } - require_once 'include/Contact.php'; foreach ($r as $contact) { Contact::terminateFriendship($user, $contact); } diff --git a/src/Worker/OnePoll.php b/src/Worker/OnePoll.php index f8f9fcd1d..122b400bb 100644 --- a/src/Worker/OnePoll.php +++ b/src/Worker/OnePoll.php @@ -20,7 +20,6 @@ Class OnePoll require_once 'include/datetime.php'; require_once 'include/items.php'; - require_once 'include/Contact.php'; require_once 'include/email.php'; require_once 'include/queue_fn.php'; From 898fe2db1e41ab2401f43e38146e3409d11852b3 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 19 Nov 2017 17:06:18 -0500 Subject: [PATCH 069/175] Code cleanup - Remove extraneous use statements - Format require_once --- include/contact_widgets.php | 1 - mod/admin.php | 6 +++--- mod/cal.php | 4 ++-- mod/crepair.php | 4 ++-- src/Model/GlobalContact.php | 2 +- src/Protocol/PortableContact.php | 3 --- src/Worker/Expire.php | 4 ++-- src/Worker/Notifier.php | 1 - 8 files changed, 10 insertions(+), 15 deletions(-) diff --git a/include/contact_widgets.php b/include/contact_widgets.php index 036504a4f..5108eaf72 100644 --- a/include/contact_widgets.php +++ b/include/contact_widgets.php @@ -1,6 +1,5 @@ argc > 1) diff --git a/mod/crepair.php b/mod/crepair.php index 69efad24b..754078316 100644 --- a/mod/crepair.php +++ b/mod/crepair.php @@ -5,8 +5,8 @@ use Friendica\Core\Config; use Friendica\Database\DBM; use Friendica\Object\Contact; -require_once("include/contact_selectors.php"); -require_once("mod/contacts.php"); +require_once 'include/contact_selectors.php'; +require_once 'mod/contacts.php'; function crepair_init(App $a) { if (! local_user()) { diff --git a/src/Model/GlobalContact.php b/src/Model/GlobalContact.php index e73bfb907..67fe27e8e 100644 --- a/src/Model/GlobalContact.php +++ b/src/Model/GlobalContact.php @@ -381,7 +381,7 @@ class GlobalContact if (DBM::is_result($r)) { return $r[0]['total']; } - + return 0; } diff --git a/src/Protocol/PortableContact.php b/src/Protocol/PortableContact.php index 6bd175010..59b3ad432 100644 --- a/src/Protocol/PortableContact.php +++ b/src/Protocol/PortableContact.php @@ -9,9 +9,6 @@ namespace Friendica\Protocol; -use Friendica\App; -use Friendica\Core\System; -use Friendica\Core\Cache; use Friendica\Core\Config; use Friendica\Core\Worker; use Friendica\Database\DBM; diff --git a/src/Worker/Expire.php b/src/Worker/Expire.php index 1485f3570..61326fa88 100644 --- a/src/Worker/Expire.php +++ b/src/Worker/Expire.php @@ -15,8 +15,8 @@ class Expire { public static function execute($param = '', $hook_name = '') { global $a; - require_once('include/datetime.php'); - require_once('include/items.php'); + require_once 'include/datetime.php'; + require_once 'include/items.php'; load_hooks(); diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php index 142bf866d..f3096e41a 100644 --- a/src/Worker/Notifier.php +++ b/src/Worker/Notifier.php @@ -4,7 +4,6 @@ */ namespace Friendica\Worker; -use Friendica\App; use Friendica\Core\Config; use Friendica\Core\Worker; use Friendica\Database\DBM; From 0c35dff73d1cd3be6400d59b445bf5996cc9474c Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 19 Nov 2017 22:47:12 +0000 Subject: [PATCH 070/175] One script needed to be moved, one script was obsolete --- {include => scripts}/auth_ejabberd.php | 0 util/db_update.php | 37 -------------------------- 2 files changed, 37 deletions(-) rename {include => scripts}/auth_ejabberd.php (100%) delete mode 100644 util/db_update.php diff --git a/include/auth_ejabberd.php b/scripts/auth_ejabberd.php similarity index 100% rename from include/auth_ejabberd.php rename to scripts/auth_ejabberd.php diff --git a/util/db_update.php b/util/db_update.php deleted file mode 100644 index a611a65c2..000000000 --- a/util/db_update.php +++ /dev/null @@ -1,37 +0,0 @@ - Date: Sun, 19 Nov 2017 22:52:35 +0000 Subject: [PATCH 071/175] Some small changes --- scripts/auth_ejabberd.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/scripts/auth_ejabberd.php b/scripts/auth_ejabberd.php index fff2bab32..9ad79004d 100755 --- a/scripts/auth_ejabberd.php +++ b/scripts/auth_ejabberd.php @@ -13,14 +13,14 @@ * Installation: * * - Change it's owner to whichever user is running the server, ie. ejabberd - * $ chown ejabberd:ejabberd /path/to/friendica/include/auth_ejabberd.php + * $ chown ejabberd:ejabberd /path/to/friendica/scripts/auth_ejabberd.php * * - Change the access mode so it is readable only to the user ejabberd and has exec - * $ chmod 700 /path/to/friendica/include/auth_ejabberd.php + * $ chmod 700 /path/to/friendica/scripts/auth_ejabberd.php * * - Edit your ejabberd.cfg file, comment out your auth_method and add: * {auth_method, external}. - * {extauth_program, "/path/to/friendica/include/auth_ejabberd.php"}. + * {extauth_program, "/path/to/friendica/script/auth_ejabberd.php"}. * * - Restart your ejabberd service, you should be able to login with your friendica auth info * @@ -47,16 +47,13 @@ if (substr($directory, 0, 1) != "/") $directory = realpath($directory."/.."); chdir($directory); -require_once("boot.php"); -global $a; +require_once "boot.php"; +require_once "include/dba.php"; -if (empty($a)) { - $a = new App(dirname(__DIR__)); -} +$a = new App(dirname(__DIR__)); @include(".htconfig.php"); -require_once("include/dba.php"); dba::connect($db_host, $db_user, $db_pass, $db_data); unset($db_host, $db_user, $db_pass, $db_data); From 1115d19f792abcfd907b2a51fa2dd8418e71714f Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Sun, 19 Nov 2017 17:04:40 -0500 Subject: [PATCH 072/175] More Standards More coding standards updates. --- src/Core/Worker.php | 185 ++++++++++++++++++++++++------------ src/Database/DBM.php | 6 +- src/Model/GlobalContact.php | 58 ++++++++++- src/Network/Probe.php | 146 +++++++++++++++------------- src/ParseUrl.php | 1 + src/Util/Lock.php | 27 ++++-- 6 files changed, 281 insertions(+), 142 deletions(-) diff --git a/src/Core/Worker.php b/src/Core/Worker.php index 2cfb4de74..2417af554 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -1,4 +1,7 @@ 1, 'order' => array('priority'))); if (DBM::is_result($s)) { @@ -171,7 +178,8 @@ class Worker { * * @return integer Is there a process running with that priority? */ - private static function processWithPriorityActive($priority) { + private static function processWithPriorityActive($priority) + { $condition = array("`priority` <= ? AND `executed` > ? AND NOT `done`", $priority, NULL_DATE); return dba::exists('workerqueue', $condition); } @@ -183,7 +191,8 @@ class Worker { * * @return boolean "true" if further processing should be stopped */ - public static function execute($queue) { + public static function execute($queue) + { $a = get_app(); $mypid = getmypid(); @@ -250,12 +259,11 @@ class Worker { return true; } - require_once($include); + require_once $include; $funcname = str_replace(".php", "", basename($argv[0]))."_run"; if (function_exists($funcname)) { - // We constantly update the "executed" date every minute to avoid being killed too soon if (!isset(self::$last_update)) { self::$last_update = strtotime($queue["executed"]); @@ -288,11 +296,14 @@ class Worker { /** * @brief Execute a function from the queue * - * @param array $queue Workerqueue entry - * @param string $funcname name of the function - * @param array $argv Array of values to be passed to the function + * @param array $queue Workerqueue entry + * @param string $funcname name of the function + * @param array $argv Array of values to be passed to the function + * @param boolean $method_call boolean + * @return void */ - private static function execFunction($queue, $funcname, $argv, $method_call) { + private static function execFunction($queue, $funcname, $argv, $method_call) + { $a = get_app(); $mypid = getmypid(); @@ -349,10 +360,14 @@ class Worker { * The execution time is the productive time. * By changing parameters like the maximum number of workers we can check the effectivness. */ - logger('DB: '.number_format(self::$db_duration, 2). + logger( + 'DB: '.number_format(self::$db_duration, 2). ' - Lock: '.number_format(self::$lock_duration, 2). ' - Rest: '.number_format($up_duration - self::$db_duration - self::$lock_duration, 2). - ' - Execution: '.number_format($duration, 2), LOGGER_DEBUG); + ' - Execution: '.number_format($duration, 2), + LOGGER_DEBUG + ); + self::$lock_duration = 0; if ($duration > 3600) { @@ -374,7 +389,7 @@ class Worker { if (Config::get("rendertime", "callstack")) { if (isset($a->callstack["database"])) { $o = "\nDatabase Read:\n"; - foreach ($a->callstack["database"] AS $func => $time) { + foreach ($a->callstack["database"] as $func => $time) { $time = round($time, 3); if ($time > 0) { $o .= $func.": ".$time."\n"; @@ -383,7 +398,7 @@ class Worker { } if (isset($a->callstack["database_write"])) { $o .= "\nDatabase Write:\n"; - foreach ($a->callstack["database_write"] AS $func => $time) { + foreach ($a->callstack["database_write"] as $func => $time) { $time = round($time, 3); if ($time > 0) { $o .= $func.": ".$time."\n"; @@ -392,7 +407,7 @@ class Worker { } if (isset($a->callstack["network"])) { $o .= "\nNetwork:\n"; - foreach ($a->callstack["network"] AS $func => $time) { + foreach ($a->callstack["network"] as $func => $time) { $time = round($time, 3); if ($time > 0) { $o .= $func.": ".$time."\n"; @@ -403,14 +418,18 @@ class Worker { $o = ''; } - logger("ID ".$queue["id"].": ".$funcname.": ".sprintf("DB: %s/%s, Net: %s, I/O: %s, Other: %s, Total: %s".$o, - number_format($a->performance["database"] - $a->performance["database_write"], 2), - number_format($a->performance["database_write"], 2), - number_format($a->performance["network"], 2), - number_format($a->performance["file"], 2), - number_format($duration - ($a->performance["database"] + $a->performance["network"] + $a->performance["file"]), 2), - number_format($duration, 2)), - LOGGER_DEBUG); + logger( + "ID ".$queue["id"].": ".$funcname.": ".sprintf( + "DB: %s/%s, Net: %s, I/O: %s, Other: %s, Total: %s".$o, + number_format($a->performance["database"] - $a->performance["database_write"], 2), + number_format($a->performance["database_write"], 2), + number_format($a->performance["network"], 2), + number_format($a->performance["file"], 2), + number_format($duration - ($a->performance["database"] + $a->performance["network"] + $a->performance["file"]), 2), + number_format($duration, 2) + ), + LOGGER_DEBUG + ); } $cooldown = Config::get("system", "worker_cooldown", 0); @@ -426,8 +445,8 @@ class Worker { * * @return bool Are more than 3/4 of the maximum connections used? */ - private static function maxConnectionsReached() { - + private static function maxConnectionsReached() + { // Fetch the max value from the config. This is needed when the system cannot detect the correct value by itself. $max = Config::get("system", "max_connections"); @@ -501,16 +520,20 @@ class Worker { /** * @brief fix the queue entry if the worker process died - * + * @return void */ - private static function killStaleWorkers() { - $entries = dba::select('workerqueue', array('id', 'pid', 'executed', 'priority', 'parameter'), - array('`executed` > ? AND NOT `done` AND `pid` != 0', NULL_DATE), - array('order' => array('priority', 'created'))); + private static function killStaleWorkers() + { + $entries = dba::select( + 'workerqueue', + array('id', 'pid', 'executed', 'priority', 'parameter'), + array('`executed` > ? AND NOT `done` AND `pid` != 0', NULL_DATE), + array('order' => array('priority', 'created')) + ); + while ($entry = dba::fetch($entries)) { if (!posix_kill($entry["pid"], 0)) { - dba::update('workerqueue', array('executed' => NULL_DATE, 'pid' => 0), - array('id' => $entry["id"])); + dba::update('workerqueue', array('executed' => NULL_DATE, 'pid' => 0), array('id' => $entry["id"])); } else { // Kill long running processes // Check if the priority is in a valid range @@ -541,9 +564,11 @@ class Worker { } elseif ($entry["priority"] != PRIORITY_CRITICAL) { $new_priority = PRIORITY_NEGLIGIBLE; } - dba::update('workerqueue', - array('executed' => NULL_DATE, 'created' => datetime_convert(), 'priority' => $new_priority, 'pid' => 0), - array('id' => $entry["id"])); + dba::update( + 'workerqueue', + array('executed' => NULL_DATE, 'created' => datetime_convert(), 'priority' => $new_priority, 'pid' => 0), + array('id' => $entry["id"]) + ); } else { logger("Worker process ".$entry["pid"]." (".implode(" ", $argv).") now runs for ".round($duration)." of ".$max_duration." allowed minutes. That's okay.", LOGGER_DEBUG); } @@ -556,7 +581,8 @@ class Worker { * * @return bool Are there too much workers running? */ - public static function tooMuchWorkers() { + public static function tooMuchWorkers() + { $queues = Config::get("system", "worker_queues", 4); $maxqueues = $queues; @@ -580,9 +606,13 @@ class Worker { $listitem = array(); // Adding all processes with no workerqueue entry - $processes = dba::p("SELECT COUNT(*) AS `running` FROM `process` WHERE NOT EXISTS + $processes = dba::p( + "SELECT COUNT(*) AS `running` FROM `process` WHERE NOT EXISTS (SELECT id FROM `workerqueue` - WHERE `workerqueue`.`pid` = `process`.`pid` AND NOT `done` AND `pid` != ?)", getmypid()); + WHERE `workerqueue`.`pid` = `process`.`pid` AND NOT `done` AND `pid` != ?)", + getmypid() + ); + if ($process = dba::fetch($processes)) { $listitem[0] = "0:".$process["running"]; } @@ -601,7 +631,7 @@ class Worker { $intervals = array(1, 10, 60); $jobs_per_minute = array(); - foreach ($intervals AS $interval) { + foreach ($intervals as $interval) { $jobs = dba::p("SELECT COUNT(*) AS `jobs` FROM `workerqueue` WHERE `done` AND `executed` > UTC_TIMESTAMP() - INTERVAL ".intval($interval)." MINUTE"); if ($job = dba::fetch($jobs)) { $jobs_per_minute[$interval] = number_format($job['jobs'] / $interval, 0); @@ -640,7 +670,8 @@ class Worker { * * @return integer Number of active worker processes */ - private static function activeWorkers() { + private static function activeWorkers() + { $workers = dba::fetch_first("SELECT COUNT(*) AS `processes` FROM `process` WHERE `command` = 'Worker.php'"); return $workers["processes"]; @@ -655,12 +686,15 @@ class Worker { * @param string $highest_priority Returns the currently highest priority * @return bool We let pass a slower process than $highest_priority */ - private static function passingSlow(&$highest_priority) { + private static function passingSlow(&$highest_priority) + { $highest_priority = 0; - $r = dba::p("SELECT `priority` + $r = dba::p( + "SELECT `priority` FROM `process` - INNER JOIN `workerqueue` ON `workerqueue`.`pid` = `process`.`pid` AND NOT `done`"); + INNER JOIN `workerqueue` ON `workerqueue`.`pid` = `process`.`pid` AND NOT `done`" + ); // No active processes at all? Fine if (!DBM::is_result($r)) { @@ -684,7 +718,7 @@ class Worker { return false; } $high = 0; - foreach ($priorities AS $priority) { + foreach ($priorities as $priority) { if ($priority == $highest_priority) { ++$high; } @@ -704,7 +738,8 @@ class Worker { * @param boolean $passing_slow Returns if we had passed low priority processes * @return boolean Have we found something? */ - private static function findWorkerProcesses(&$passing_slow) { + private static function findWorkerProcesses(&$passing_slow) + { $mypid = getmypid(); // Check if we should pass some low priority process @@ -728,8 +763,12 @@ class Worker { if (self::passingSlow($highest_priority)) { // Are there waiting processes with a higher priority than the currently highest? - $result = dba::select('workerqueue', array('id'), array("`executed` <= ? AND `priority` < ? AND NOT `done`", NULL_DATE, $highest_priority), - array('limit' => $limit, 'order' => array('priority', 'created'), 'only_query' => true)); + $result = dba::select( + 'workerqueue', + array('id'), + array("`executed` <= ? AND `priority` < ? AND NOT `done`", NULL_DATE, $highest_priority), + array('limit' => $limit, 'order' => array('priority', 'created'), 'only_query' => true) + ); while ($id = dba::fetch($result)) { $ids[] = $id["id"]; @@ -740,8 +779,12 @@ class Worker { if (!$found) { // Give slower processes some processing time - $result = dba::select('workerqueue', array('id'), array("`executed` <= ? AND `priority` > ? AND NOT `done`", NULL_DATE, $highest_priority), - array('limit' => $limit, 'order' => array('priority', 'created'), 'only_query' => true)); + $result = dba::select( + 'workerqueue', + array('id'), + array("`executed` <= ? AND `priority` > ? AND NOT `done`", NULL_DATE, $highest_priority), + array('limit' => $limit, 'order' => array('priority', 'created'), 'only_query' => true) + ); while ($id = dba::fetch($result)) { $ids[] = $id["id"]; @@ -755,8 +798,12 @@ class Worker { // If there is no result (or we shouldn't pass lower processes) we check without priority limit if (!$found) { - $result = dba::select('workerqueue', array('id'), array("`executed` <= ? AND NOT `done`", NULL_DATE), - array('limit' => $limit, 'order' => array('priority', 'created'), 'only_query' => true)); + $result = dba::select( + 'workerqueue', + array('id'), + array("`executed` <= ? AND NOT `done`", NULL_DATE), + array('limit' => $limit, 'order' => array('priority', 'created'), 'only_query' => true) + ); while ($id = dba::fetch($result)) { $ids[] = $id["id"]; @@ -781,7 +828,8 @@ class Worker { * @param boolean $passing_slow Returns if we had passed low priority processes * @return string SQL statement */ - public static function workerProcess(&$passing_slow) { + public static function workerProcess(&$passing_slow) + { $stamp = (float)microtime(true); // There can already be jobs for us in the queue. @@ -813,8 +861,10 @@ class Worker { /** * @brief Removes a workerqueue entry from the current process + * @return void */ - public static function unclaimProcess() { + public static function unclaimProcess() + { $mypid = getmypid(); dba::update('workerqueue', array('executed' => NULL_DATE, 'pid' => 0), array('pid' => $mypid, 'done' => false)); @@ -822,8 +872,10 @@ class Worker { /** * @brief Call the front end worker + * @return void */ - public static function callWorker() { + public static function callWorker() + { if (!Config::get("system", "frontend_worker")) { return; } @@ -834,8 +886,10 @@ class Worker { /** * @brief Call the front end worker if there aren't any active + * @return void */ - public static function executeIfIdle() { + public static function executeIfIdle() + { if (!Config::get("system", "frontend_worker")) { return; } @@ -882,20 +936,24 @@ class Worker { /** * @brief Removes long running worker processes + * @return void */ - public static function clearProcesses() { + public static function clearProcesses() + { $timeout = Config::get("system", "frontend_worker_timeout", 10); /// @todo We should clean up the corresponding workerqueue entries as well $condition = array("`created` < ? AND `command` = 'worker.php'", - datetime_convert('UTC','UTC',"now - ".$timeout." minutes")); + datetime_convert('UTC', 'UTC', "now - ".$timeout." minutes")); dba::delete('process', $condition); } /** * @brief Runs the cron processes + * @return void */ - private static function runCron() { + private static function runCron() + { logger('Add cron entries', LOGGER_DEBUG); // Check for spooled items @@ -932,7 +990,8 @@ class Worker { * * @return boolean "false" if proc_run couldn't be executed */ - public static function add($cmd) { + public static function add($cmd) + { $proc_args = func_get_args(); $args = array(); diff --git a/src/Database/DBM.php b/src/Database/DBM.php index 9495a264c..7b52c0a55 100644 --- a/src/Database/DBM.php +++ b/src/Database/DBM.php @@ -27,7 +27,7 @@ class DBM $processes = 0; $states = array(); - foreach ($r AS $process) { + foreach ($r as $process) { $state = trim($process["State"]); // Filter out all non blocking processes @@ -38,7 +38,7 @@ class DBM } $statelist = ""; - foreach ($states AS $state => $usage) { + foreach ($states as $state => $usage) { if ($statelist != "") { $statelist .= ", "; } @@ -74,6 +74,7 @@ class DBM * @param mixed $value Array value * @param string $key Array key * @param boolean $add_quotation add quotation marks for string values + * @return void */ private static function esc_array_callback(&$value, $key, $add_quotation) { @@ -100,6 +101,7 @@ class DBM * * @param mixed $arr Array with values to be escaped * @param boolean $add_quotation add quotation marks for string values + * @return void */ public static function esc_array(&$arr, $add_quotation = false) { diff --git a/src/Model/GlobalContact.php b/src/Model/GlobalContact.php index 67fe27e8e..44fbd64b6 100644 --- a/src/Model/GlobalContact.php +++ b/src/Model/GlobalContact.php @@ -94,6 +94,7 @@ class GlobalContact * @param integer $uid User ID * @param integer $cid Contact ID * @param integer $zcid Global Contact ID + * @return void */ public static function link($gcid, $uid = 0, $cid = 0, $zcid = 0) { @@ -142,6 +143,7 @@ class GlobalContact * 2: Contacts of profiles on this server * 3: Contacts of contacts of profiles on this server * 4: ... + * @return array $gcontact */ public static function sanitize($gcontact) { @@ -273,6 +275,11 @@ class GlobalContact return $gcontact; } + /** + * @param integer $uid id + * @param integer $cid id + * @return integer + */ public static function countCommonFriends($uid, $cid) { $r = q( @@ -295,6 +302,11 @@ class GlobalContact return 0; } + /** + * @param integer $uid id + * @param integer $zcid zcid + * @return integer + */ public static function countCommonFriendsZcid($uid, $zcid) { $r = q( @@ -313,6 +325,14 @@ class GlobalContact return 0; } + /** + * @param object $uid user + * @param object $cid cid + * @param integer $start optional, default 0 + * @param integer $limit optional, default 9999 + * @param boolean $shuffle optional, default false + * @return object + */ public static function commonFriends($uid, $cid, $start = 0, $limit = 9999, $shuffle = false) { if ($shuffle) { @@ -343,7 +363,15 @@ class GlobalContact return $r; } - function commonFriendsZcid($uid, $zcid, $start = 0, $limit = 9999, $shuffle = false) + /** + * @param object $uid user + * @param object $zcid zcid + * @param integer $start optional, default 0 + * @param integer $limit optional, default 9999 + * @param boolean $shuffle optional, default false + * @return object + */ + public static function commonFriendsZcid($uid, $zcid, $start = 0, $limit = 9999, $shuffle = false) { if ($shuffle) { $sql_extra = " order by rand() "; @@ -367,6 +395,11 @@ class GlobalContact return $r; } + /** + * @param object $uid user + * @param object $cid cid + * @return integer + */ public static function countAllFriends($uid, $cid) { $r = q( @@ -385,7 +418,13 @@ class GlobalContact return 0; } - + /** + * @param object $uid user + * @param object $cid cid + * @param integer $start optional, default 0 + * @param integer $limit optional, default 80 + * @return object + */ public static function allFriends($uid, $cid, $start = 0, $limit = 80) { $r = q( @@ -407,6 +446,12 @@ class GlobalContact return $r; } + /** + * @param object $uid user + * @param integer $start optional, default 0 + * @param integer $limit optional, default 80 + * @return array + */ public static function suggestionQuery($uid, $start = 0, $limit = 80) { if (!$uid) { @@ -507,6 +552,9 @@ class GlobalContact return $list; } + /** + * @return void + */ public static function updateSuggestions() { $a = get_app(); @@ -588,6 +636,7 @@ class GlobalContact * @brief Replace alternate OStatus user format with the primary one * * @param arr $contact contact array (called by reference) + * @return void */ public static function fixAlternateContactAddress(&$contact) { @@ -859,6 +908,7 @@ class GlobalContact * @brief Updates the gcontact entry from probe * * @param str $url profile link + * @return void */ public static function updateFromProbe($url) { @@ -878,6 +928,7 @@ class GlobalContact * @brief Update the gcontact entry for a given user id * * @param int $uid User ID + * @return void */ public static function updateForUser($uid) { @@ -923,6 +974,7 @@ class GlobalContact * If the "Statistics" plugin is enabled (See http://gstools.org/ for details) we query user data with this. * * @param str $server Server address + * @return void */ public static function fetchGsUsers($server) { @@ -978,7 +1030,7 @@ class GlobalContact /** * @brief Asking GNU Social server on a regular base for their user data - * + * @return void */ public static function discoverGsUsers() { diff --git a/src/Network/Probe.php b/src/Network/Probe.php index c6bf46f79..cb5fcd8b2 100644 --- a/src/Network/Probe.php +++ b/src/Network/Probe.php @@ -1,11 +1,12 @@ get_hostname(); $parts = parse_url($host); @@ -89,8 +92,8 @@ class Probe { * * @return array with template and type of the webfinger template for JSON or XML */ - private static function hostMeta($host) { - + private static function hostMeta($host) + { // Reset the static variable self::$baseurl = ''; @@ -174,13 +177,13 @@ class Probe { * amended 7/9/2011 to return an hcard which could save potentially loading * a lengthy content page to scrape dfrn attributes * - * @param string $webbie Address that should be probed + * @param string $webbie Address that should be probed * @param string $hcard_url Link to the hcard - is returned by reference * * @return string profile link */ - public static function webfingerDfrn($webbie, &$hcard_url) { - + public static function webfingerDfrn($webbie, &$hcard_url) + { $profile_link = ''; $links = self::lrdd($webbie); @@ -212,8 +215,8 @@ class Probe { * * @return array uri data */ - public static function lrdd($uri) { - + public static function lrdd($uri) + { $lrdd = self::hostMeta($uri); $webfinger = null; @@ -247,7 +250,7 @@ class Probe { return array(); } - foreach ($lrdd AS $type => $template) { + foreach ($lrdd as $type => $template) { if ($webfinger) { continue; } @@ -299,15 +302,15 @@ class Probe { /** * @brief Fetch information (protocol endpoints and user information) about a given uri * - * @param string $uri Address that should be probed - * @param string $network Test for this specific network - * @param integer $uid User ID for the probe (only used for mails) - * @param boolean $cache Use cached values? + * @param string $uri Address that should be probed + * @param string $network Test for this specific network + * @param integer $uid User ID for the probe (only used for mails) + * @param boolean $cache Use cached values? * * @return array uri data */ - public static function uri($uri, $network = "", $uid = -1, $cache = true) { - + public static function uri($uri, $network = "", $uid = -1, $cache = true) + { if ($cache) { $result = Cache::get("Probe::uri:".$network.":".$uri); if (!is_null($result)) { @@ -389,7 +392,7 @@ class Probe { $fieldnames = array(); - foreach ($fields AS $key => $val) { + foreach ($fields as $key => $val) { if (empty($val)) { unset($fields[$key]); } else { @@ -424,7 +427,7 @@ class Probe { $fieldnames = array(); - foreach ($fields AS $key => $val) { + foreach ($fields as $key => $val) { if (empty($val)) { unset($fields[$key]); } else { @@ -450,7 +453,8 @@ class Probe { * * @return string switched URL */ - private static function switchScheme($url) { + private static function switchScheme($url) + { $parts = parse_url($url); if (!isset($parts['scheme'])) { @@ -469,12 +473,14 @@ class Probe { /** * @brief Checks if a profile url should be OStatus but only provides partial information * - * @param array $webfinger Webfinger data - * @param string $lrdd Path template for webfinger request + * @param array $webfinger Webfinger data + * @param string $lrdd Path template for webfinger request + * @param string $type type * * @return array fixed webfinger data */ - private static function fixOstatus($webfinger, $lrdd, $type) { + private static function fixOStatus($webfinger, $lrdd, $type) + { if (empty($webfinger['links']) || empty($webfinger['subject'])) { return $webfinger; } @@ -512,13 +518,14 @@ class Probe { * * This function is only called by the "uri" function that adds caching and rearranging of data. * - * @param string $uri Address that should be probed - * @param string $network Test for this specific network - * @param integer $uid User ID for the probe (only used for mails) + * @param string $uri Address that should be probed + * @param string $network Test for this specific network + * @param integer $uid User ID for the probe (only used for mails) * * @return array uri data */ - private static function detect($uri, $network, $uid) { + private static function detect($uri, $network, $uid) + { $parts = parse_url($uri); if (!empty($parts["scheme"]) && !empty($parts["host"]) && !empty($parts["path"])) { @@ -552,7 +559,6 @@ class Probe { $nick = ltrim($nick, '@'); $addr = $nick."@".$host; - } elseif (strstr($uri, '@')) { // If the URI starts with "mailto:" then jump directly to the mail detection if (strpos($uri, 'mailto:') !== false) { @@ -583,7 +589,6 @@ class Probe { return self::mail($uri, $uid); } $addr = $uri; - } else { logger("Uri ".$uri." was not detectable", LOGGER_DEBUG); return false; @@ -593,7 +598,7 @@ class Probe { /// @todo Do we need the prefix "acct:" or "acct://"? - foreach ($lrdd AS $type => $template) { + foreach ($lrdd as $type => $template) { if ($webfinger) { continue; } @@ -603,7 +608,7 @@ class Probe { $webfinger = self::webfinger($path, $type); // Fix possible problems with GNU Social probing to wrong scheme - $webfinger = self::fixOstatus($webfinger, $template, $type); + $webfinger = self::fixOStatus($webfinger, $template, $type); // We cannot be sure that the detected address was correct, so we don't use the values if ($webfinger && ($uri != $addr)) { @@ -675,17 +680,18 @@ class Probe { * * For details see RFC 7033: * - * @param string $url Address that should be probed + * @param string $url Address that should be probed + * @param string $type type * * @return array webfinger data */ - private static function webfinger($url, $type) { - + private static function webfinger($url, $type) + { $xrd_timeout = Config::get('system', 'xrd_timeout', 20); $redirects = 0; $ret = z_fetch_url($url, false, $redirects, array('timeout' => $xrd_timeout, 'accept_content' => $type)); - if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) { + if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) { return false; } $data = $ret['body']; @@ -745,11 +751,12 @@ class Probe { * This functionality was originally created for the directory. * * @param string $noscrape_url Link to the noscrape page - * @param array $data The already fetched data + * @param array $data The already fetched data * * @return array noscrape data */ - private static function pollNoscrape($noscrape_url, $data) { + private static function pollNoscrape($noscrape_url, $data) + { $ret = z_fetch_url($noscrape_url); if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) { return false; @@ -836,7 +843,8 @@ class Probe { * * @return int Number of errors */ - public static function validDfrn($data) { + public static function validDfrn($data) + { $errors = 0; if (!isset($data['key'])) { $errors ++; @@ -863,8 +871,8 @@ class Probe { * * @return array profile data */ - public static function profile($profile_link) { - + public static function profile($profile_link) + { $data = array(); logger("Check profile ".$profile_link, LOGGER_DEBUG); @@ -908,7 +916,8 @@ class Probe { * * @return array DFRN data */ - private static function dfrn($webfinger) { + private static function dfrn($webfinger) + { $hcard_url = ""; $data = array(); foreach ($webfinger["links"] as $link) { @@ -974,13 +983,14 @@ class Probe { /** * @brief Poll the hcard page (Diaspora and Friendica specific) * - * @param string $hcard_url Link to the hcard page - * @param array $data The already fetched data - * @param boolean $dfrn Poll DFRN specific data + * @param string $hcard_url Link to the hcard page + * @param array $data The already fetched data + * @param boolean $dfrn Poll DFRN specific data * * @return array hcard data */ - private static function pollHcard($hcard_url, $data, $dfrn = false) { + private static function pollHcard($hcard_url, $data, $dfrn = false) + { $ret = z_fetch_url($hcard_url); if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) { return false; @@ -1097,7 +1107,8 @@ class Probe { * * @return array Diaspora data */ - private static function diaspora($webfinger) { + private static function diaspora($webfinger) + { $hcard_url = ""; $data = array(); foreach ($webfinger["links"] as $link) { @@ -1175,11 +1186,12 @@ class Probe { * @brief Check for OStatus contact * * @param array $webfinger Webfinger data - * @param bool $short Short detection mode + * @param bool $short Short detection mode * * @return array|bool OStatus data or "false" on error or "true" on short mode */ - private static function ostatus($webfinger, $short = false) { + private static function ostatus($webfinger, $short = false) + { $data = array(); if (is_array($webfinger["aliases"])) { @@ -1190,8 +1202,9 @@ class Probe { } } - if (is_string($webfinger["subject"]) && strstr($webfinger["subject"], "@") && - !strstr(normalise_link($webfinger["subject"]), "http://")) { + if (is_string($webfinger["subject"]) && strstr($webfinger["subject"], "@") + && !strstr(normalise_link($webfinger["subject"]), "http://") + ) { $data["addr"] = str_replace('acct:', '', $webfinger["subject"]); } @@ -1299,8 +1312,8 @@ class Probe { * * @return array profile data */ - private static function pumpioProfileData($profile_link) { - + private static function pumpioProfileData($profile_link) + { $doc = new DOMDocument(); if (!@$doc->loadHTMLFile($profile_link)) { return false; @@ -1339,8 +1352,8 @@ class Probe { * * @return array pump.io data */ - private static function pumpio($webfinger) { - + private static function pumpio($webfinger) + { $data = array(); foreach ($webfinger["links"] as $link) { if (($link["rel"] == "http://webfinger.net/rel/profile-page") @@ -1387,7 +1400,8 @@ class Probe { * * @return string feed link */ - private static function getFeedLink($url) { + private static function getFeedLink($url) + { $doc = new DOMDocument(); if (!@$doc->loadHTMLFile($url)) { @@ -1425,12 +1439,13 @@ class Probe { /** * @brief Check for feed contact * - * @param string $url Profile link + * @param string $url Profile link * @param boolean $probe Do a probe if the page contains a feed link * * @return array feed data */ - private static function feed($url, $probe = true) { + private static function feed($url, $probe = true) + { $ret = z_fetch_url($url); if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) { return false; @@ -1485,13 +1500,13 @@ class Probe { /** * @brief Check for mail contact * - * @param string $uri Profile link + * @param string $uri Profile link * @param integer $uid User ID * * @return array mail data */ - private static function mail($uri, $uid) { - + private static function mail($uri, $uid) + { if (!validate_email($uri)) { return false; } @@ -1568,11 +1583,12 @@ class Probe { * @brief Mix two paths together to possibly fix missing parts * * @param string $avatar Path to the avatar - * @param string $base Another path that is hopefully complete + * @param string $base Another path that is hopefully complete * * @return string fixed avatar path */ - public static function fixAvatar($avatar, $base) { + public static function fixAvatar($avatar, $base) + { $base_parts = parse_url($base); // Remove all parts that could create a problem diff --git a/src/ParseUrl.php b/src/ParseUrl.php index 047876279..0183fdb3f 100644 --- a/src/ParseUrl.php +++ b/src/ParseUrl.php @@ -454,6 +454,7 @@ class ParseUrl * * @param string $tag The pure tag name * @param int $k Counter for internal use + * @return void */ private static function arrAddHashes(&$tag, $k) { diff --git a/src/Util/Lock.php b/src/Util/Lock.php index 9d9696296..9c4498445 100644 --- a/src/Util/Lock.php +++ b/src/Util/Lock.php @@ -1,11 +1,12 @@ =')) { if (empty(self::$semaphore[$fn_name])) { return false; @@ -186,8 +193,10 @@ class Lock { /** * @brief Removes all lock that were set by us + * @return void */ - public static function removeAll() { + public static function removeAll() + { $memcache = self::connectMemcache(); if (is_object($memcache)) { // We cannot delete all cache entries, but this doesn't matter with memcache From 9622dedaeb0dde00fe1896f7e08095ef59371f56 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Sun, 19 Nov 2017 17:33:07 -0500 Subject: [PATCH 073/175] New function new function from recent develop branch merge --- src/Core/Worker.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Core/Worker.php b/src/Core/Worker.php index 2417af554..7dcdf4e88 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -969,7 +969,11 @@ class Worker self::killStaleWorkers(); } - public static function spawnWorker() { + /** + * @return void + */ + public static function spawnWorker() + { $args = array("scripts/worker.php", "no_cron"); get_app()->proc_run($args); } From 1eb2e541f6614390c4959de8d1386734f541a883 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Mon, 20 Nov 2017 11:14:35 -0500 Subject: [PATCH 074/175] New from rebase more adjustments after rebase --- src/Model/GlobalContact.php | 16 ++++++++++++---- src/Model/User.php | 4 ++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/Model/GlobalContact.php b/src/Model/GlobalContact.php index 44fbd64b6..be8b28260 100644 --- a/src/Model/GlobalContact.php +++ b/src/Model/GlobalContact.php @@ -1054,15 +1054,23 @@ class GlobalContact } } - public static function getRandomUrl() { - $r = q("SELECT `url` FROM `gcontact` WHERE `network` = '%s' + /** + * @return string + */ + public static function getRandomUrl() + { + $r = q( + "SELECT `url` FROM `gcontact` WHERE `network` = '%s' AND `last_contact` >= `last_failure` AND `updated` > UTC_TIMESTAMP - INTERVAL 1 MONTH ORDER BY rand() LIMIT 1", - dbesc(NETWORK_DFRN)); + dbesc(NETWORK_DFRN) + ); - if (DBM::is_result($r)) + if (DBM::is_result($r)) { return dirname($r[0]['url']); + } + return ''; } } diff --git a/src/Model/User.php b/src/Model/User.php index ec4d1013b..01bcce28d 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -17,6 +17,10 @@ require_once 'plugin.php'; */ class User { + /** + * @param object $uid user to remove + * @return void + */ public static function remove($uid) { if (!$uid) { From 28cceda4613997a4c11c381605f696b3b52b305e Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Mon, 20 Nov 2017 11:29:55 -0500 Subject: [PATCH 075/175] Indentation modified to multi line function call. --- src/Core/Worker.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Core/Worker.php b/src/Core/Worker.php index 7dcdf4e88..2e7bb483e 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -533,7 +533,11 @@ class Worker while ($entry = dba::fetch($entries)) { if (!posix_kill($entry["pid"], 0)) { - dba::update('workerqueue', array('executed' => NULL_DATE, 'pid' => 0), array('id' => $entry["id"])); + dba::update( + 'workerqueue', + array('executed' => NULL_DATE, 'pid' => 0), + array('id' => $entry["id"]) + ); } else { // Kill long running processes // Check if the priority is in a valid range From ddacbf2c136c05a8ecf0aa65f8afdbce6134b95c Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Mon, 20 Nov 2017 12:56:31 -0500 Subject: [PATCH 076/175] XML class standards updated the xml class for PSR-2 --- include/api.php | 2 +- include/network.php | 2 +- include/salmon.php | 6 +- mod/ping.php | 4 +- src/Network/Probe.php | 4 +- src/Protocol/DFRN.php | 198 +++++++++++++++++++------------------- src/Protocol/Diaspora.php | 8 +- src/Protocol/OStatus.php | 155 ++++++++++++++--------------- src/Util/XML.php | 34 ++++--- 9 files changed, 210 insertions(+), 203 deletions(-) diff --git a/include/api.php b/include/api.php index 2cfdcf024..9f91139d1 100644 --- a/include/api.php +++ b/include/api.php @@ -902,7 +902,7 @@ function api_create_xml($data, $root_element) $data3 = array($root_element => $data2); - $ret = XML::from_array($data3, $xml, false, $namespaces); + $ret = XML::fromArray($data3, $xml, false, $namespaces); return $ret; } diff --git a/include/network.php b/include/network.php index e9cfe8603..c11cdb2c6 100644 --- a/include/network.php +++ b/include/network.php @@ -414,7 +414,7 @@ function xml_status($st, $message = '') $xmldata = array("result" => $result); - echo XML::from_array($xmldata, $xml); + echo XML::fromArray($xmldata, $xml); killme(); } diff --git a/include/salmon.php b/include/salmon.php index 9a1ef72e5..264b92e80 100644 --- a/include/salmon.php +++ b/include/salmon.php @@ -112,7 +112,7 @@ function slapper($owner, $url, $slap) $namespaces = array("me" => "http://salmon-protocol.org/ns/magic-env"); - $salmon = XML::from_array($xmldata, $xml, false, $namespaces); + $salmon = XML::fromArray($xmldata, $xml, false, $namespaces); // slap them post_url($url, $salmon, array( @@ -138,7 +138,7 @@ function slapper($owner, $url, $slap) $namespaces = array("me" => "http://salmon-protocol.org/ns/magic-env"); - $salmon = XML::from_array($xmldata, $xml, false, $namespaces); + $salmon = XML::fromArray($xmldata, $xml, false, $namespaces); // slap them post_url($url, $salmon, array( @@ -161,7 +161,7 @@ function slapper($owner, $url, $slap) $namespaces = array("me" => "http://salmon-protocol.org/ns/magic-env"); - $salmon = XML::from_array($xmldata, $xml, false, $namespaces); + $salmon = XML::fromArray($xmldata, $xml, false, $namespaces); // slap them post_url($url, $salmon, array( diff --git a/mod/ping.php b/mod/ping.php index 39882d5e3..3ab316d45 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -115,7 +115,7 @@ function ping_init(App $a) } } else { header("Content-type: text/xml"); - echo XML::from_array($data, $xml); + echo XML::fromArray($data, $xml); } killme(); } @@ -412,7 +412,7 @@ function ping_init(App $a) $data = ping_format_xml_data($data, $sysnotify_count, $notifications, $sysmsgs, $sysmsgs_info, $groups_unseen, $forums_unseen); header("Content-type: text/xml"); - echo XML::from_array(array("result" => $data), $xml); + echo XML::fromArray(array("result" => $data), $xml); } killme(); diff --git a/src/Network/Probe.php b/src/Network/Probe.php index cb5fcd8b2..6001489ec 100644 --- a/src/Network/Probe.php +++ b/src/Network/Probe.php @@ -127,7 +127,7 @@ class Probe return array(); } - $links = XML::element_to_array($xrd); + $links = XML::elementToArray($xrd); if (!isset($links["xrd"]["link"])) { logger("No xrd data found for ".$host, LOGGER_DEBUG); return array(); @@ -712,7 +712,7 @@ class Probe return false; } - $xrd_arr = XML::element_to_array($xrd); + $xrd_arr = XML::elementToArray($xrd); if (!isset($xrd_arr["xrd"]["link"])) { logger("No XML webfinger links for ".$url, LOGGER_DEBUG); return false; diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 592bca83c..9a378d874 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -403,17 +403,17 @@ class DFRN $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']); + XML::addElement($doc, $sender, "dfrn:name", $owner['name']); + XML::addElement($doc, $sender, "dfrn:uri", $owner['url']); + XML::addElement($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']); + XML::addElement($doc, $mail, "dfrn:id", $item['uri']); + XML::addElement($doc, $mail, "dfrn:in-reply-to", $item['parent-uri']); + XML::addElement($doc, $mail, "dfrn:sentdate", datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , ATOM_TIME)); + XML::addElement($doc, $mail, "dfrn:subject", $item['title']); + XML::addElement($doc, $mail, "dfrn:content", $item['body']); $root->appendChild($mail); @@ -438,11 +438,11 @@ class DFRN $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']); + XML::addElement($doc, $suggest, "dfrn:url", $item['url']); + XML::addElement($doc, $suggest, "dfrn:name", $item['name']); + XML::addElement($doc, $suggest, "dfrn:photo", $item['photo']); + XML::addElement($doc, $suggest, "dfrn:request", $item['request']); + XML::addElement($doc, $suggest, "dfrn:note", $item['note']); $root->appendChild($suggest); @@ -490,18 +490,18 @@ class DFRN $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:addr", $owner['addr']); - XML::add_element($doc, $relocate, "dfrn:avatar", $owner['avatar']); - 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", Config::get('system','site_pubkey')); + XML::addElement($doc, $relocate, "dfrn:url", $owner['url']); + XML::addElement($doc, $relocate, "dfrn:name", $owner['name']); + XML::addElement($doc, $relocate, "dfrn:addr", $owner['addr']); + XML::addElement($doc, $relocate, "dfrn:avatar", $owner['avatar']); + XML::addElement($doc, $relocate, "dfrn:photo", $photos[4]); + XML::addElement($doc, $relocate, "dfrn:thumb", $photos[5]); + XML::addElement($doc, $relocate, "dfrn:micro", $photos[6]); + XML::addElement($doc, $relocate, "dfrn:request", $owner['request']); + XML::addElement($doc, $relocate, "dfrn:confirm", $owner['confirm']); + XML::addElement($doc, $relocate, "dfrn:notify", $owner['notify']); + XML::addElement($doc, $relocate, "dfrn:poll", $owner['poll']); + XML::addElement($doc, $relocate, "dfrn:sitepubkey", Config::get('system','site_pubkey')); $root->appendChild($relocate); @@ -540,17 +540,17 @@ class DFRN $root->setAttribute("xmlns:ostatus", NAMESPACE_OSTATUS); $root->setAttribute("xmlns:statusnet", NAMESPACE_STATUSNET); - XML::add_element($doc, $root, "id", System::baseUrl()."/profile/".$owner["nick"]); - XML::add_element($doc, $root, "title", $owner["name"]); + XML::addElement($doc, $root, "id", System::baseUrl()."/profile/".$owner["nick"]); + XML::addElement($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); + XML::addElement($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); + XML::addElement($doc, $root, "link", "", $attributes); $attributes = array("rel" => "alternate", "type" => "text/html", "href" => $alternatelink); - XML::add_element($doc, $root, "link", "", $attributes); + XML::addElement($doc, $root, "link", "", $attributes); if ($public) { @@ -558,26 +558,26 @@ class DFRN OStatus::hublinks($doc, $root, $owner["nick"]); $attributes = array("rel" => "salmon", "href" => System::baseUrl()."/salmon/".$owner["nick"]); - XML::add_element($doc, $root, "link", "", $attributes); + XML::addElement($doc, $root, "link", "", $attributes); $attributes = array("rel" => "http://salmon-protocol.org/ns/salmon-replies", "href" => System::baseUrl()."/salmon/".$owner["nick"]); - XML::add_element($doc, $root, "link", "", $attributes); + XML::addElement($doc, $root, "link", "", $attributes); $attributes = array("rel" => "http://salmon-protocol.org/ns/salmon-mention", "href" => System::baseUrl()."/salmon/".$owner["nick"]); - XML::add_element($doc, $root, "link", "", $attributes); + XML::addElement($doc, $root, "link", "", $attributes); } // For backward compatibility we keep this element if ($owner['page-flags'] == PAGE_COMMUNITY) { - XML::add_element($doc, $root, "dfrn:community", 1); + XML::addElement($doc, $root, "dfrn:community", 1); } // The former element is replaced by this one - XML::add_element($doc, $root, "dfrn:account_type", $owner["account-type"]); + XML::addElement($doc, $root, "dfrn:account_type", $owner["account-type"]); /// @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)); + XML::addElement($doc, $root, "updated", datetime_convert("UTC", "UTC", "now", ATOM_TIME)); $author = self::add_author($doc, $owner, $authorelement, $public); $root->appendChild($author); @@ -621,9 +621,9 @@ class DFRN $attributes = array("dfrn:updated" => $namdate); } - XML::add_element($doc, $author, "name", $owner["name"], $attributes); - XML::add_element($doc, $author, "uri", System::baseUrl().'/profile/'.$owner["nickname"], $attributes); - XML::add_element($doc, $author, "dfrn:handle", $owner["addr"], $attributes); + XML::addElement($doc, $author, "name", $owner["name"], $attributes); + XML::addElement($doc, $author, "uri", System::baseUrl().'/profile/'.$owner["nickname"], $attributes); + XML::addElement($doc, $author, "dfrn:handle", $owner["addr"], $attributes); $attributes = array("rel" => "photo", "type" => "image/jpeg", "media:width" => 175, "media:height" => 175, "href" => $owner['photo']); @@ -632,13 +632,13 @@ class DFRN $attributes["dfrn:updated"] = $picdate; } - XML::add_element($doc, $author, "link", "", $attributes); + XML::addElement($doc, $author, "link", "", $attributes); $attributes["rel"] = "avatar"; - XML::add_element($doc, $author, "link", "", $attributes); + XML::addElement($doc, $author, "link", "", $attributes); if ($hidewall) { - XML::add_element($doc, $author, "dfrn:hide", "true"); + XML::addElement($doc, $author, "dfrn:hide", "true"); } // The following fields will only be generated if the data isn't meant for a public feed @@ -649,7 +649,7 @@ class DFRN $birthday = feed_birthday($owner['uid'], $owner['timezone']); if ($birthday) { - XML::add_element($doc, $author, "dfrn:birthday", $birthday); + XML::addElement($doc, $author, "dfrn:birthday", $birthday); } // Only show contact details when we are allowed to @@ -665,26 +665,26 @@ class DFRN if (DBM::is_result($r)) { $profile = $r[0]; - XML::add_element($doc, $author, "poco:displayName", $profile["name"]); - XML::add_element($doc, $author, "poco:updated", $namdate); + XML::addElement($doc, $author, "poco:displayName", $profile["name"]); + XML::addElement($doc, $author, "poco:updated", $namdate); if (trim($profile["dob"]) > '0001-01-01') { - XML::add_element($doc, $author, "poco:birthday", "0000-".date("m-d", strtotime($profile["dob"]))); + XML::addElement($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"]); + XML::addElement($doc, $author, "poco:note", $profile["about"]); + XML::addElement($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")); + XML::addElement($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"); + XML::addElement($doc, $urls, "poco:type", "homepage"); + XML::addElement($doc, $urls, "poco:value", $profile["homepage"]); + XML::addElement($doc, $urls, "poco:primary", "true"); $author->appendChild($urls); } @@ -692,33 +692,33 @@ class DFRN $keywords = explode(",", $profile["pub_keywords"]); foreach ($keywords as $keyword) { - XML::add_element($doc, $author, "poco:tags", trim($keyword)); + XML::addElement($doc, $author, "poco:tags", trim($keyword)); } } if (trim($profile["xmpp"]) != "") { $ims = $doc->createElement("poco:ims"); - XML::add_element($doc, $ims, "poco:type", "xmpp"); - XML::add_element($doc, $ims, "poco:value", $profile["xmpp"]); - XML::add_element($doc, $ims, "poco:primary", "true"); + XML::addElement($doc, $ims, "poco:type", "xmpp"); + XML::addElement($doc, $ims, "poco:value", $profile["xmpp"]); + XML::addElement($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", Profile::formatLocation($profile)); + XML::addElement($doc, $element, "poco:formatted", Profile::formatLocation($profile)); if (trim($profile["locality"]) != "") { - XML::add_element($doc, $element, "poco:locality", $profile["locality"]); + XML::addElement($doc, $element, "poco:locality", $profile["locality"]); } if (trim($profile["region"]) != "") { - XML::add_element($doc, $element, "poco:region", $profile["region"]); + XML::addElement($doc, $element, "poco:region", $profile["region"]); } if (trim($profile["country-name"]) != "") { - XML::add_element($doc, $element, "poco:country", $profile["country-name"]); + XML::addElement($doc, $element, "poco:country", $profile["country-name"]); } $author->appendChild($element); @@ -744,9 +744,9 @@ class DFRN $contact = Contact::getDetailsByURL($contact_url, $item["uid"]); $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"]); + XML::addElement($doc, $author, "name", $contact["name"]); + XML::addElement($doc, $author, "uri", $contact["url"]); + XML::addElement($doc, $author, "dfrn:handle", $contact["addr"]); /// @Todo /// - Check real image type and image size @@ -757,7 +757,7 @@ class DFRN "media:width" => 80, "media:height" => 80, "href" => $contact["photo"]); - XML::add_element($doc, $author, "link", "", $attributes); + XML::addElement($doc, $author, "link", "", $attributes); $attributes = array( "rel" => "avatar", @@ -765,7 +765,7 @@ class DFRN "media:width" => 80, "media:height" => 80, "href" => $contact["photo"]); - XML::add_element($doc, $author, "link", "", $attributes); + XML::addElement($doc, $author, "link", "", $attributes); return $author; } @@ -790,13 +790,13 @@ class DFRN return false; } if ($r->type) { - XML::add_element($doc, $entry, "activity:object-type", $r->type); + XML::addElement($doc, $entry, "activity:object-type", $r->type); } if ($r->id) { - XML::add_element($doc, $entry, "id", $r->id); + XML::addElement($doc, $entry, "id", $r->id); } if ($r->title) { - XML::add_element($doc, $entry, "title", $r->title); + XML::addElement($doc, $entry, "title", $r->title); } if ($r->link) { @@ -815,16 +815,16 @@ class DFRN foreach ($link->attributes() as $parameter => $value) { $attributes[$parameter] = $value; } - XML::add_element($doc, $entry, "link", "", $attributes); + XML::addElement($doc, $entry, "link", "", $attributes); } } } else { $attributes = array("rel" => "alternate", "type" => "text/html", "href" => $r->link); - XML::add_element($doc, $entry, "link", "", $attributes); + XML::addElement($doc, $entry, "link", "", $attributes); } } if ($r->content) { - XML::add_element($doc, $entry, "content", bbcode($r->content), array("type" => "html")); + XML::addElement($doc, $entry, "content", bbcode($r->content), array("type" => "html")); } return $entry; @@ -863,7 +863,7 @@ class DFRN $attributes["title"] = trim($matches[4]); } - XML::add_element($doc, $root, "link", "", $attributes); + XML::addElement($doc, $root, "link", "", $attributes); } } } @@ -893,7 +893,7 @@ class DFRN 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); + return XML::createElement($doc, "at:deleted-entry", "", $attributes); } if (!$single) { @@ -944,7 +944,7 @@ class DFRN $attributes = array("ref" => $parent_item, "type" => "text/html", "href" => $parent[0]['plink'], "dfrn:diaspora_guid" => $parent[0]['guid']); - XML::add_element($doc, $entry, "thr:in-reply-to", "", $attributes); + XML::addElement($doc, $entry, "thr:in-reply-to", "", $attributes); } // Add conversation data. This is used for OStatus @@ -967,23 +967,23 @@ class DFRN "href" => $conversation_href, "ref" => $conversation_uri); - XML::add_element($doc, $entry, "ostatus:conversation", $conversation_uri, $attributes); + XML::addElement($doc, $entry, "ostatus:conversation", $conversation_uri, $attributes); - XML::add_element($doc, $entry, "id", $item["uri"]); - XML::add_element($doc, $entry, "title", $item["title"]); + XML::addElement($doc, $entry, "id", $item["uri"]); + XML::addElement($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::addElement($doc, $entry, "published", datetime_convert("UTC", "UTC", $item["created"] . "+00:00", ATOM_TIME)); + XML::addElement($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)); + XML::addElement($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)); + XML::addElement($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( + XML::addElement( $doc, $entry, "link", @@ -995,50 +995,50 @@ class DFRN // "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'])); + XML::addElement($doc, $entry, "dfrn:comment-allow", intval($item['last-child'])); } if ($item['location']) { - XML::add_element($doc, $entry, "dfrn:location", $item['location']); + XML::addElement($doc, $entry, "dfrn:location", $item['location']); } if ($item['coord']) { - XML::add_element($doc, $entry, "georss:point", $item['coord']); + XML::addElement($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)); + XML::addElement($doc, $entry, "dfrn:private", (($item['private']) ? $item['private'] : 1)); } if ($item['extid']) { - XML::add_element($doc, $entry, "dfrn:extid", $item['extid']); + XML::addElement($doc, $entry, "dfrn:extid", $item['extid']); } if ($item['bookmark']) { - XML::add_element($doc, $entry, "dfrn:bookmark", "true"); + XML::addElement($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::addElement($doc, $entry, "statusnet:notice_info", "", array("local_id" => $item['id'], "source" => $item['app'])); } - XML::add_element($doc, $entry, "dfrn:diaspora_guid", $item["guid"]); + XML::addElement($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::addElement($doc, $entry, "dfrn:diaspora_signature", $sign); } - XML::add_element($doc, $entry, "activity:verb", construct_verb($item)); + XML::addElement($doc, $entry, "activity:verb", construct_verb($item)); if ($item['object-type'] != "") { - XML::add_element($doc, $entry, "activity:object-type", $item['object-type']); + XML::addElement($doc, $entry, "activity:object-type", $item['object-type']); } elseif ($item['id'] == $item['parent']) { - XML::add_element($doc, $entry, "activity:object-type", ACTIVITY_OBJ_NOTE); + XML::addElement($doc, $entry, "activity:object-type", ACTIVITY_OBJ_NOTE); } else { - XML::add_element($doc, $entry, "activity:object-type", ACTIVITY_OBJ_COMMENT); + XML::addElement($doc, $entry, "activity:object-type", ACTIVITY_OBJ_COMMENT); } $actobj = self::create_activity($doc, "activity:object", $item['object']); @@ -1056,7 +1056,7 @@ class DFRN if (count($tags)) { foreach ($tags as $t) { if (($type != 'html') || ($t[0] != "@")) { - XML::add_element($doc, $entry, "category", "", array("scheme" => "X-DFRN:".$t[0].":".$t[1], "term" => $t[2])); + XML::addElement($doc, $entry, "category", "", array("scheme" => "X-DFRN:".$t[0].":".$t[1], "term" => $t[2])); } } } @@ -1077,7 +1077,7 @@ class DFRN ); if (DBM::is_result($r) && ($r[0]["forum"] || $r[0]["prv"])) { - XML::add_element( + XML::addElement( $doc, $entry, "link", @@ -1087,7 +1087,7 @@ class DFRN "href" => $mention) ); } else { - XML::add_element( + XML::addElement( $doc, $entry, "link", @@ -1704,7 +1704,7 @@ class DFRN $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); + XML::addElement($obj_doc, $obj_element, "type", $activity_type); $id = $xpath->query("atom:id", $activity)->item(0); if (is_object($id)) { diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index ccd1ec594..1a320d14e 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -1913,7 +1913,7 @@ class Diaspora "title" => "", "content" => $parent_body)); - return XML::from_array($xmldata, $xml, true); + return XML::fromArray($xmldata, $xml, true); } /** @@ -2345,7 +2345,7 @@ class Diaspora "id" => $contact["url"]."/".$contact["name"], "link" => $link)); - return XML::from_array($xmldata, $xml, true); + return XML::fromArray($xmldata, $xml, true); } /** @@ -3040,7 +3040,7 @@ class Diaspora $namespaces = array("me" => "http://salmon-protocol.org/ns/magic-env"); - return XML::from_array($xmldata, $xml, false, $namespaces); + return XML::fromArray($xmldata, $xml, false, $namespaces); } /** @@ -3173,7 +3173,7 @@ class Diaspora { $data = array($type => $message); - return XML::from_array($data, $xml); + return XML::fromArray($data, $xml); } /** diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index dfdc75498..5d765bf6f 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -1250,39 +1250,39 @@ class OStatus $root->setAttribute("xmlns:mastodon", NAMESPACE_MASTODON); $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, $root, "id", System::baseUrl()."/profile/".$owner["nick"]); - XML::add_element($doc, $root, "title", sprintf("%s timeline", $owner["name"])); - XML::add_element($doc, $root, "subtitle", sprintf("Updates from %s on %s", $owner["name"], $a->config["sitename"])); - XML::add_element($doc, $root, "logo", $owner["photo"]); - XML::add_element($doc, $root, "updated", datetime_convert("UTC", "UTC", "now", ATOM_TIME)); + XML::addElement($doc, $root, "generator", FRIENDICA_PLATFORM, $attributes); + XML::addElement($doc, $root, "id", System::baseUrl()."/profile/".$owner["nick"]); + XML::addElement($doc, $root, "title", sprintf("%s timeline", $owner["name"])); + XML::addElement($doc, $root, "subtitle", sprintf("Updates from %s on %s", $owner["name"], $a->config["sitename"])); + XML::addElement($doc, $root, "logo", $owner["photo"]); + XML::addElement($doc, $root, "updated", datetime_convert("UTC", "UTC", "now", ATOM_TIME)); $author = self::addAuthor($doc, $owner); $root->appendChild($author); $attributes = array("href" => $owner["url"], "rel" => "alternate", "type" => "text/html"); - XML::add_element($doc, $root, "link", "", $attributes); + XML::addElement($doc, $root, "link", "", $attributes); /// @TODO We have to find out what this is /// $attributes = array("href" => System::baseUrl()."/sup", /// "rel" => "http://api.friendfeed.com/2008/03#sup", /// "type" => "application/json"); - /// XML::add_element($doc, $root, "link", "", $attributes); + /// XML::addElement($doc, $root, "link", "", $attributes); self::hublinks($doc, $root, $owner["nick"]); $attributes = array("href" => System::baseUrl()."/salmon/".$owner["nick"], "rel" => "salmon"); - XML::add_element($doc, $root, "link", "", $attributes); + XML::addElement($doc, $root, "link", "", $attributes); $attributes = array("href" => System::baseUrl()."/salmon/".$owner["nick"], "rel" => "http://salmon-protocol.org/ns/salmon-replies"); - XML::add_element($doc, $root, "link", "", $attributes); + XML::addElement($doc, $root, "link", "", $attributes); $attributes = array("href" => System::baseUrl()."/salmon/".$owner["nick"], "rel" => "http://salmon-protocol.org/ns/salmon-mention"); - XML::add_element($doc, $root, "link", "", $attributes); + XML::addElement($doc, $root, "link", "", $attributes); $attributes = array("href" => System::baseUrl()."/api/statuses/user_timeline/".$owner["nick"].".atom", "rel" => "self", "type" => "application/atom+xml"); - XML::add_element($doc, $root, "link", "", $attributes); + XML::addElement($doc, $root, "link", "", $attributes); return $root; } @@ -1297,7 +1297,7 @@ class OStatus public static function hublinks($doc, $root, $nick) { $h = System::baseUrl() . '/pubsubhubbub/'.$nick; - XML::add_element($doc, $root, "link", "", array("href" => $h, "rel" => "hub")); + XML::addElement($doc, $root, "link", "", array("href" => $h, "rel" => "hub")); } /** @@ -1319,7 +1319,7 @@ class OStatus "href" => $siteinfo["image"], "type" => $imgdata["mime"], "length" => intval($imgdata["size"])); - XML::add_element($doc, $root, "link", "", $attributes); + XML::addElement($doc, $root, "link", "", $attributes); break; case 'video': $attributes = array("rel" => "enclosure", @@ -1327,7 +1327,7 @@ class OStatus "type" => "text/html; charset=UTF-8", "length" => "", "title" => $siteinfo["title"]); - XML::add_element($doc, $root, "link", "", $attributes); + XML::addElement($doc, $root, "link", "", $attributes); break; default: break; @@ -1340,7 +1340,7 @@ class OStatus "type" => $imgdata["mime"], "length" => intval($imgdata["size"])); - XML::add_element($doc, $root, "link", "", $attributes); + XML::addElement($doc, $root, "link", "", $attributes); } $arr = explode('[/attach],', $item['attach']); @@ -1359,7 +1359,7 @@ class OStatus if (trim($matches[4]) != "") { $attributes["title"] = trim($matches[4]); } - XML::add_element($doc, $root, "link", "", $attributes); + XML::addElement($doc, $root, "link", "", $attributes); } } } @@ -1380,15 +1380,15 @@ class OStatus $profile = $r[0]; } $author = $doc->createElement("author"); - XML::add_element($doc, $author, "id", $owner["url"]); - XML::add_element($doc, $author, "activity:object-type", ACTIVITY_OBJ_PERSON); - XML::add_element($doc, $author, "uri", $owner["url"]); - XML::add_element($doc, $author, "name", $owner["nick"]); - XML::add_element($doc, $author, "email", $owner["addr"]); - XML::add_element($doc, $author, "summary", bbcode($owner["about"], false, false, 7)); + XML::addElement($doc, $author, "id", $owner["url"]); + XML::addElement($doc, $author, "activity:object-type", ACTIVITY_OBJ_PERSON); + XML::addElement($doc, $author, "uri", $owner["url"]); + XML::addElement($doc, $author, "name", $owner["nick"]); + XML::addElement($doc, $author, "email", $owner["addr"]); + XML::addElement($doc, $author, "summary", bbcode($owner["about"], false, false, 7)); $attributes = array("rel" => "alternate", "type" => "text/html", "href" => $owner["url"]); - XML::add_element($doc, $author, "link", "", $attributes); + XML::addElement($doc, $author, "link", "", $attributes); $attributes = array( "rel" => "avatar", @@ -1396,7 +1396,7 @@ class OStatus "media:width" => 175, "media:height" => 175, "href" => $owner["photo"]); - XML::add_element($doc, $author, "link", "", $attributes); + XML::addElement($doc, $author, "link", "", $attributes); if (isset($owner["thumb"])) { $attributes = array( @@ -1405,34 +1405,34 @@ class OStatus "media:width" => 80, "media:height" => 80, "href" => $owner["thumb"]); - XML::add_element($doc, $author, "link", "", $attributes); + XML::addElement($doc, $author, "link", "", $attributes); } - XML::add_element($doc, $author, "poco:preferredUsername", $owner["nick"]); - XML::add_element($doc, $author, "poco:displayName", $owner["name"]); - XML::add_element($doc, $author, "poco:note", bbcode($owner["about"], false, false, 7)); + XML::addElement($doc, $author, "poco:preferredUsername", $owner["nick"]); + XML::addElement($doc, $author, "poco:displayName", $owner["name"]); + XML::addElement($doc, $author, "poco:note", bbcode($owner["about"], false, false, 7)); if (trim($owner["location"]) != "") { $element = $doc->createElement("poco:address"); - XML::add_element($doc, $element, "poco:formatted", $owner["location"]); + XML::addElement($doc, $element, "poco:formatted", $owner["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"); + XML::addElement($doc, $urls, "poco:type", "homepage"); + XML::addElement($doc, $urls, "poco:value", $profile["homepage"]); + XML::addElement($doc, $urls, "poco:primary", "true"); $author->appendChild($urls); } if (count($profile)) { - XML::add_element($doc, $author, "followers", "", array("url" => System::baseUrl()."/viewcontacts/".$owner["nick"])); - XML::add_element($doc, $author, "statusnet:profile_info", "", array("local_id" => $owner["uid"])); + XML::addElement($doc, $author, "followers", "", array("url" => System::baseUrl()."/viewcontacts/".$owner["nick"])); + XML::addElement($doc, $author, "statusnet:profile_info", "", array("local_id" => $owner["uid"])); } if ($profile["publish"]) { - XML::add_element($doc, $author, "mastodon:scope", "public"); + XML::addElement($doc, $author, "mastodon:scope", "public"); } return $author; } @@ -1514,12 +1514,12 @@ class OStatus private static function sourceEntry($doc, $contact) { $source = $doc->createElement("source"); - XML::add_element($doc, $source, "id", $contact["poll"]); - XML::add_element($doc, $source, "title", $contact["name"]); - XML::add_element($doc, $source, "link", "", array("rel" => "alternate", "type" => "text/html", "href" => $contact["alias"])); - XML::add_element($doc, $source, "link", "", array("rel" => "self", "type" => "application/atom+xml", "href" => $contact["poll"])); - XML::add_element($doc, $source, "icon", $contact["photo"]); - XML::add_element($doc, $source, "updated", datetime_convert("UTC", "UTC", $contact["success_update"]."+00:00", ATOM_TIME)); + XML::addElement($doc, $source, "id", $contact["poll"]); + XML::addElement($doc, $source, "title", $contact["name"]); + XML::addElement($doc, $source, "link", "", array("rel" => "alternate", "type" => "text/html", "href" => $contact["alias"])); + XML::addElement($doc, $source, "link", "", array("rel" => "self", "type" => "application/atom+xml", "href" => $contact["poll"])); + XML::addElement($doc, $source, "icon", $contact["photo"]); + XML::addElement($doc, $source, "updated", datetime_convert("UTC", "UTC", $contact["success_update"]."+00:00", ATOM_TIME)); return $source; } @@ -1618,7 +1618,7 @@ class OStatus $as_object = $doc->createElement("activity:object"); - XML::add_element($doc, $as_object, "activity:object-type", NAMESPACE_ACTIVITY_SCHEMA."activity"); + XML::addElement($doc, $as_object, "activity:object-type", NAMESPACE_ACTIVITY_SCHEMA."activity"); self::entryContent($doc, $as_object, $repeated_item, $owner, "", "", false); @@ -1627,7 +1627,7 @@ class OStatus $as_object2 = $doc->createElement("activity:object"); - XML::add_element($doc, $as_object2, "activity:object-type", self::constructObjecttype($repeated_item)); + XML::addElement($doc, $as_object2, "activity:object-type", self::constructObjecttype($repeated_item)); $title = sprintf("New comment by %s", $contact["nick"]); @@ -1678,7 +1678,7 @@ class OStatus ); $parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']); - XML::add_element($doc, $as_object, "activity:object-type", self::constructObjecttype($parent[0])); + XML::addElement($doc, $as_object, "activity:object-type", self::constructObjecttype($parent[0])); self::entryContent($doc, $as_object, $parent[0], $owner, "New entry"); @@ -1701,18 +1701,18 @@ class OStatus private static function addPersonObject($doc, $owner, $contact) { $object = $doc->createElement("activity:object"); - XML::add_element($doc, $object, "activity:object-type", ACTIVITY_OBJ_PERSON); + XML::addElement($doc, $object, "activity:object-type", ACTIVITY_OBJ_PERSON); if ($contact['network'] == NETWORK_PHANTOM) { - XML::add_element($doc, $object, "id", $contact['url']); + XML::addElement($doc, $object, "id", $contact['url']); return $object; } - XML::add_element($doc, $object, "id", $contact["alias"]); - XML::add_element($doc, $object, "title", $contact["nick"]); + XML::addElement($doc, $object, "id", $contact["alias"]); + XML::addElement($doc, $object, "title", $contact["nick"]); $attributes = array("rel" => "alternate", "type" => "text/html", "href" => $contact["url"]); - XML::add_element($doc, $object, "link", "", $attributes); + XML::addElement($doc, $object, "link", "", $attributes); $attributes = array( "rel" => "avatar", @@ -1720,14 +1720,14 @@ class OStatus "media:width" => 175, "media:height" => 175, "href" => $contact["photo"]); - XML::add_element($doc, $object, "link", "", $attributes); + XML::addElement($doc, $object, "link", "", $attributes); - XML::add_element($doc, $object, "poco:preferredUsername", $contact["nick"]); - XML::add_element($doc, $object, "poco:displayName", $contact["name"]); + XML::addElement($doc, $object, "poco:preferredUsername", $contact["nick"]); + XML::addElement($doc, $object, "poco:displayName", $contact["name"]); if (trim($contact["location"]) != "") { $element = $doc->createElement("poco:address"); - XML::add_element($doc, $element, "poco:formatted", $contact["location"]); + XML::addElement($doc, $element, "poco:formatted", $contact["location"]); $object->appendChild($element); } @@ -1817,7 +1817,7 @@ class OStatus $title = self::entryHeader($doc, $entry, $owner, $toplevel); - XML::add_element($doc, $entry, "activity:object-type", ACTIVITY_OBJ_NOTE); + XML::addElement($doc, $entry, "activity:object-type", ACTIVITY_OBJ_NOTE); self::entryContent($doc, $entry, $item, $owner, $title); @@ -1879,8 +1879,8 @@ class OStatus $verb = self::constructVerb($item); } - XML::add_element($doc, $entry, "id", $item["uri"]); - XML::add_element($doc, $entry, "title", $title); + XML::addElement($doc, $entry, "id", $item["uri"]); + XML::addElement($doc, $entry, "title", $title); $body = self::formatPicturePost($item['body']); @@ -1890,20 +1890,25 @@ class OStatus $body = bbcode($body, false, false, 7); - XML::add_element($doc, $entry, "content", $body, array("type" => "html")); + XML::addElement($doc, $entry, "content", $body, array("type" => "html")); - XML::add_element($doc, $entry, "link", "", array("rel" => "alternate", "type" => "text/html", + XML::addElement( + $doc, + $entry, + "link", + "", + array("rel" => "alternate", "type" => "text/html", "href" => System::baseUrl()."/display/".$item["guid"]) ); if ($complete && ($item["id"] > 0)) { - XML::add_element($doc, $entry, "status_net", "", array("notice_id" => $item["id"])); + XML::addElement($doc, $entry, "status_net", "", array("notice_id" => $item["id"])); } - XML::add_element($doc, $entry, "activity:verb", $verb); + XML::addElement($doc, $entry, "activity:verb", $verb); - 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::addElement($doc, $entry, "published", datetime_convert("UTC", "UTC", $item["created"]."+00:00", ATOM_TIME)); + XML::addElement($doc, $entry, "updated", datetime_convert("UTC", "UTC", $item["edited"]."+00:00", ATOM_TIME)); } /** @@ -1941,12 +1946,12 @@ class OStatus $attributes = array( "ref" => $parent_item, "href" => $parent_plink); - XML::add_element($doc, $entry, "thr:in-reply-to", "", $attributes); + XML::addElement($doc, $entry, "thr:in-reply-to", "", $attributes); $attributes = array( "rel" => "related", "href" => $parent_plink); - XML::add_element($doc, $entry, "link", "", $attributes); + XML::addElement($doc, $entry, "link", "", $attributes); } if (intval($item["parent"]) > 0) { @@ -1965,14 +1970,14 @@ class OStatus } } - XML::add_element($doc, $entry, "link", "", array("rel" => "ostatus:conversation", "href" => $conversation_href)); + XML::addElement($doc, $entry, "link", "", array("rel" => "ostatus:conversation", "href" => $conversation_href)); $attributes = array( "href" => $conversation_href, "local_id" => $item["parent"], "ref" => $conversation_uri); - XML::add_element($doc, $entry, "ostatus:conversation", $conversation_uri, $attributes); + XML::addElement($doc, $entry, "ostatus:conversation", $conversation_uri, $attributes); } $tags = item_getfeedtags($item); @@ -2000,14 +2005,14 @@ class OStatus dbesc(normalise_link($mention)) ); if ($r[0]["forum"] || $r[0]["prv"]) { - XML::add_element($doc, $entry, "link", "", + XML::addElement($doc, $entry, "link", "", array( "rel" => "mentioned", "ostatus:object-type" => ACTIVITY_OBJ_GROUP, "href" => $mention) ); } else { - XML::add_element($doc, $entry, "link", "", + XML::addElement($doc, $entry, "link", "", array( "rel" => "mentioned", "ostatus:object-type" => ACTIVITY_OBJ_PERSON, @@ -2017,18 +2022,18 @@ class OStatus } if (!$item["private"]) { - XML::add_element($doc, $entry, "link", "", array("rel" => "ostatus:attention", + XML::addElement($doc, $entry, "link", "", array("rel" => "ostatus:attention", "href" => "http://activityschema.org/collection/public")); - XML::add_element($doc, $entry, "link", "", array("rel" => "mentioned", + XML::addElement($doc, $entry, "link", "", array("rel" => "mentioned", "ostatus:object-type" => "http://activitystrea.ms/schema/1.0/collection", "href" => "http://activityschema.org/collection/public")); - XML::add_element($doc, $entry, "mastodon:scope", "public"); + XML::addElement($doc, $entry, "mastodon:scope", "public"); } if (count($tags)) { foreach ($tags as $t) { if ($t[0] != "@") { - XML::add_element($doc, $entry, "category", "", array("term" => $t[2])); + XML::addElement($doc, $entry, "category", "", array("term" => $t[2])); } } } @@ -2048,10 +2053,10 @@ class OStatus } if ($item["coord"] != "") { - XML::add_element($doc, $entry, "georss:point", $item["coord"]); + XML::addElement($doc, $entry, "georss:point", $item["coord"]); } - XML::add_element($doc, $entry, "statusnet:notice_info", "", $attributes); + XML::addElement($doc, $entry, "statusnet:notice_info", "", $attributes); } } diff --git a/src/Util/XML.php b/src/Util/XML.php index 7ecf85acd..a3cf758da 100644 --- a/src/Util/XML.php +++ b/src/Util/XML.php @@ -1,5 +1,4 @@ $value) { @@ -34,7 +33,7 @@ class XML if (is_array($value)) { $root = new SimpleXMLElement("<".$key."/>"); - self::from_array($value, $root, $remove_header, $namespaces, false); + self::fromArray($value, $root, $remove_header, $namespaces, false); } else { $root = new SimpleXMLElement("<".$key.">".xmlify($value).""); } @@ -106,7 +105,7 @@ class XML $element = $xml->addChild($key, xmlify($value), $namespace); } elseif (is_array($value)) { $element = $xml->addChild($key, null, $namespace); - self::from_array($value, $element, $remove_header, $namespaces, false); + self::fromArray($value, $element, $remove_header, $namespaces, false); } } } @@ -117,6 +116,7 @@ class XML * @param object $source The XML source * @param object $target The XML target * @param string $elementname Name of the XML element of the target + * @return void */ public static function copy(&$source, &$target, $elementname) { @@ -140,7 +140,7 @@ class XML * * @return object XML element object */ - public static function create_element($doc, $element, $value = "", $attributes = array()) + public static function createElement($doc, $element, $value = "", $attributes = array()) { $element = $doc->createElement($element, xmlify($value)); @@ -160,10 +160,11 @@ class XML * @param string $element XML element name * @param string $value XML value * @param array $attributes array containing the attributes + * @return void */ - public static function add_element($doc, $parent, $element, $value = "", $attributes = array()) + public static function addElement($doc, $parent, $element, $value = "", $attributes = array()) { - $element = self::create_element($doc, $element, $value, $attributes); + $element = self::createElement($doc, $element, $value, $attributes); $parent->appendChild($element); } @@ -177,7 +178,7 @@ class XML * * @return array | sring The array from the xml element or the string */ - public static function element_to_array($xml_element, &$recursion_depth=0) + public static function elementToArray($xml_element, &$recursion_depth = 0) { // If we're getting too deep, bail out if ($recursion_depth > 512) { @@ -200,7 +201,7 @@ class XML foreach ($xml_element as $key => $value) { $recursion_depth++; - $result_array[strtolower($key)] = self::element_to_array($value, $recursion_depth); + $result_array[strtolower($key)] = self::elementToArray($value, $recursion_depth); $recursion_depth--; } @@ -220,13 +221,13 @@ class XML /** * @brief Convert the given XML text to an array in the XML structure. * - * Xml::to_array() will convert the given XML text to an array in the XML structure. + * Xml::toArray() will convert the given XML text to an array in the XML structure. * Link: http://www.bin-co.com/php/scripts/xml2array/ * Portions significantly re-written by mike@macgirvin.com for Friendica * (namespaces, lowercase tags, get_attribute default changed, more...) * - * Examples: $array = Xml::to_array(file_get_contents('feed.xml')); - * $array = Xml::to_array(file_get_contents('feed.xml', true, 1, 'attribute')); + * Examples: $array = Xml::toArray(file_get_contents('feed.xml')); + * $array = Xml::toArray(file_get_contents('feed.xml', true, 1, 'attribute')); * * @param object $contents The XML text * @param boolean $namespaces True or false include namespace information @@ -238,14 +239,14 @@ class XML * * @return array The parsed XML in an array form. Use print_r() to see the resulting array structure. */ - public static function to_array($contents, $namespaces = true, $get_attributes = 1, $priority = 'attribute') + public static function toArray($contents, $namespaces = true, $get_attributes = 1, $priority = 'attribute') { if (!$contents) { return array(); } if (!function_exists('xml_parser_create')) { - logger('Xml::to_array: parser function missing'); + logger('Xml::toArray: parser function missing'); return array(); } @@ -260,7 +261,7 @@ class XML } if (! $parser) { - logger('Xml::to_array: xml_parser_create: no resource'); + logger('Xml::toArray: xml_parser_create: no resource'); return array(); } @@ -272,7 +273,7 @@ class XML @xml_parser_free($parser); if (! $xml_values) { - logger('Xml::to_array: libxml: parse error: ' . $contents, LOGGER_DATA); + logger('Xml::toArray: libxml: parse error: ' . $contents, LOGGER_DATA); foreach (libxml_get_errors() as $err) { logger('libxml: parse: ' . $err->code . " at " . $err->line . ":" . $err->column . " : " . $err->message, LOGGER_DATA); } @@ -402,6 +403,7 @@ class XML * * @param object $doc XML document * @param string $node Node name + * @return void */ public static function deleteNode(&$doc, $node) { From 2830be25ea662cb82a652bbfaa209feb4a0e3717 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Mon, 20 Nov 2017 15:17:20 -0500 Subject: [PATCH 077/175] Formatting change change multi line format. --- src/Protocol/OStatus.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index 5d765bf6f..7ff8f8f60 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -1892,13 +1892,8 @@ class OStatus XML::addElement($doc, $entry, "content", $body, array("type" => "html")); - XML::addElement( - $doc, - $entry, - "link", - "", - array("rel" => "alternate", "type" => "text/html", - "href" => System::baseUrl()."/display/".$item["guid"]) + XML::addElement($doc, $entry, "link", "", array("rel" => "alternate", "type" => "text/html", + "href" => System::baseUrl()."/display/".$item["guid"]) ); if ($complete && ($item["id"] > 0)) { From 1726ededac6d50f7dabe5fdc482fb29632c7cda1 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Mon, 20 Nov 2017 15:37:30 -0500 Subject: [PATCH 078/175] Emailer to src Move emailer to src Friendica\Util namespace --- include/Emailer.php | 85 --------------------------------------- include/enotify.php | 21 +++++----- mod/item.php | 15 +++---- src/Util/Emailer.php | 94 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 114 insertions(+), 101 deletions(-) delete mode 100644 include/Emailer.php create mode 100644 src/Util/Emailer.php diff --git a/include/Emailer.php b/include/Emailer.php deleted file mode 100644 index 978b19218..000000000 --- a/include/Emailer.php +++ /dev/null @@ -1,85 +0,0 @@ -\n" . - "Reply-To: $fromName <{$params['replyTo']}>\n" . - "MIME-Version: 1.0\n" . - "Content-Type: multipart/alternative; boundary=\"{$mimeBoundary}\""; - - // assemble the final multipart message body with the text and html types included - $textBody = chunk_split(base64_encode($params['textVersion'])); - $htmlBody = chunk_split(base64_encode($params['htmlVersion'])); - $multipartMessageBody = - "--" . $mimeBoundary . "\n" . // plain text section - "Content-Type: text/plain; charset=UTF-8\n" . - "Content-Transfer-Encoding: base64\n\n" . - $textBody . "\n"; - - if (!$email_textonly && !is_null($params['htmlVersion'])){ - $multipartMessageBody .= - "--" . $mimeBoundary . "\n" . // text/html section - "Content-Type: text/html; charset=UTF-8\n" . - "Content-Transfer-Encoding: base64\n\n" . - $htmlBody . "\n"; - } - $multipartMessageBody .= - "--" . $mimeBoundary . "--\n"; // message ending - - // send the message - $hookdata = array( - 'to' => $params['toEmail'], - 'subject' => $messageSubject, - 'body' => $multipartMessageBody, - 'headers' => $messageHeader - ); - //echo "

"; var_dump($hookdata); killme();
-		call_hooks("emailer_send", $hookdata);
-		$res = mail(
-			$hookdata['to'],							// send to address
-			$hookdata['subject'],						// subject
-			$hookdata['body'], 	 						// message body
-			$hookdata['headers']						// message headers
-		);
-		logger("header " . 'To: ' . $params['toEmail'] . "\n" . $messageHeader, LOGGER_DEBUG);
-		logger("return value " . (($res)?"true":"false"), LOGGER_DEBUG);
-		return $res;
-	}
-}
diff --git a/include/enotify.php b/include/enotify.php
index 7de2027ca..dc030fa8b 100644
--- a/include/enotify.php
+++ b/include/enotify.php
@@ -1,14 +1,16 @@
  $params['uid'],
 			'fromName' => $sender_name,
 			'fromEmail' => $sender_email,
@@ -646,11 +649,11 @@ function notification($params) {
 			'messageSubject' => $datarray['subject'],
 			'htmlVersion' => $email_html_body,
 			'textVersion' => $email_text_body,
-			'additionalMailHeader' => $datarray['headers'],
-		));
+			'additionalMailHeader' => $datarray['headers'])
+		);
 	}
 
-    return False;
+	return false;
 }
 
 /**
diff --git a/mod/item.php b/mod/item.php
index 8055d63ae..442262868 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -24,6 +24,7 @@ use Friendica\Model\GlobalContact;
 use Friendica\Network\Probe;
 use Friendica\Object\Contact;
 use Friendica\Protocol\Diaspora;
+use Friendica\Util\Emailer;
 
 require_once 'include/crypto.php';
 require_once 'include/enotify.php';
@@ -1036,13 +1037,13 @@ function item_post(App $a) {
 				$message = '' . $link . $html . $disclaimer . '';
 				include_once 'include/html2plain.php';
 				$params = array (
-				    'fromName' => $a->user['username'],
-				    'fromEmail' => $a->user['email'],
-				    'toEmail' => $addr,
-				    'replyTo' => $a->user['email'],
-				    'messageSubject' => $subject,
-				    'htmlVersion' => $message,
-				    'textVersion' => html2plain($html.$disclaimer),
+				'fromName' => $a->user['username'],
+				'fromEmail' => $a->user['email'],
+				'toEmail' => $addr,
+				'replyTo' => $a->user['email'],
+				'messageSubject' => $subject,
+				'htmlVersion' => $message,
+				'textVersion' => html2plain($html.$disclaimer),
 				);
 				Emailer::send($params);
 			}
diff --git a/src/Util/Emailer.php b/src/Util/Emailer.php
new file mode 100644
index 000000000..a2be983d6
--- /dev/null
+++ b/src/Util/Emailer.php
@@ -0,0 +1,94 @@
+\n" .
+						"Reply-To: $fromName <{$params['replyTo']}>\n" .
+						"MIME-Version: 1.0\n" .
+						"Content-Type: multipart/alternative; boundary=\"{$mimeBoundary}\"";
+
+		// assemble the final multipart message body with the text and html types included
+		$textBody	=	chunk_split(base64_encode($params['textVersion']));
+		$htmlBody	=	chunk_split(base64_encode($params['htmlVersion']));
+		$multipartMessageBody =	"--" . $mimeBoundary . "\n" .					// plain text section
+								"Content-Type: text/plain; charset=UTF-8\n" .
+								"Content-Transfer-Encoding: base64\n\n" .
+								$textBody . "\n";
+
+		if (!$email_textonly && !is_null($params['htmlVersion'])) {
+			$multipartMessageBody .=
+				"--" . $mimeBoundary . "\n" .				// text/html section
+				"Content-Type: text/html; charset=UTF-8\n" .
+				"Content-Transfer-Encoding: base64\n\n" .
+				$htmlBody . "\n";
+		}
+		$multipartMessageBody .=
+			"--" . $mimeBoundary . "--\n";					// message ending
+
+		// send the message
+		$hookdata = array(
+			'to' => $params['toEmail'],
+			'subject' => $messageSubject,
+			'body' => $multipartMessageBody,
+			'headers' => $messageHeader
+		);
+		//echo "
"; var_dump($hookdata); killme();
+		call_hooks("emailer_send", $hookdata);
+		$res = mail(
+			$hookdata['to'],							// send to address
+			$hookdata['subject'],						// subject
+			$hookdata['body'], 	 						// message body
+			$hookdata['headers']						// message headers
+		);
+		logger("header " . 'To: ' . $params['toEmail'] . "\n" . $messageHeader, LOGGER_DEBUG);
+		logger("return value " . (($res)?"true":"false"), LOGGER_DEBUG);
+		return $res;
+	}
+}

From 0877cf862c21065936639db1a22284dd52cb74e6 Mon Sep 17 00:00:00 2001
From: Michael 
Date: Mon, 20 Nov 2017 21:30:57 +0000
Subject: [PATCH 079/175] Queue and GProbe should now be executed

---
 src/Worker/GProbe.php | 7 +++++--
 src/Worker/Queue.php  | 5 ++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/Worker/GProbe.php b/src/Worker/GProbe.php
index bfe277fe0..2dd663367 100644
--- a/src/Worker/GProbe.php
+++ b/src/Worker/GProbe.php
@@ -1,7 +1,10 @@
 
Date: Mon, 20 Nov 2017 19:03:58 -0500
Subject: [PATCH 080/175] Indentation fix

errant indentation change
---
 mod/item.php | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/mod/item.php b/mod/item.php
index 442262868..97c26b5f9 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -1037,13 +1037,13 @@ function item_post(App $a) {
 				$message = '' . $link . $html . $disclaimer . '';
 				include_once 'include/html2plain.php';
 				$params = array (
-				'fromName' => $a->user['username'],
-				'fromEmail' => $a->user['email'],
-				'toEmail' => $addr,
-				'replyTo' => $a->user['email'],
-				'messageSubject' => $subject,
-				'htmlVersion' => $message,
-				'textVersion' => html2plain($html.$disclaimer),
+					'fromName' => $a->user['username'],
+					'fromEmail' => $a->user['email'],
+					'toEmail' => $addr,
+					'replyTo' => $a->user['email'],
+					'messageSubject' => $subject,
+					'htmlVersion' => $message,
+					'textVersion' => html2plain($html.$disclaimer)
 				);
 				Emailer::send($params);
 			}

From 04a7291303c1ec1b23b5e0334e28f550d35513e0 Mon Sep 17 00:00:00 2001
From: rabuzarus 
Date: Tue, 21 Nov 2017 03:45:13 +0100
Subject: [PATCH 081/175] Bugfix: show no registrations notifs if there are
 none

---
 mod/ping.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mod/ping.php b/mod/ping.php
index 3ab316d45..c6f67d397 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -202,13 +202,13 @@ function ping_init(App $a)
 
 		if ($a->config['register_policy'] == REGISTER_APPROVE && is_site_admin()) {
 			$regs = q(
-				"SELECT `contact`.`name`, `contact`.`url`, `contact`.`micro`, `register`.`created`, COUNT(*) AS `total`
+				"SELECT `contact`.`name`, `contact`.`url`, `contact`.`micro`, `register`.`created`
 				FROM `contact` RIGHT JOIN `register` ON `register`.`uid` = `contact`.`uid`
 				WHERE `contact`.`self` = 1"
 			);
 
 			if (DBM::is_result($regs)) {
-				$register_count = $regs[0]['total'];
+				$register_count = count($regs);
 			}
 		}
 

From 7cee150868b35bca64c65c3f821232137465d14f Mon Sep 17 00:00:00 2001
From: Adam Magness 
Date: Tue, 21 Nov 2017 07:20:22 -0500
Subject: [PATCH 082/175] ForumManager to src

ForumManager moved to Friendica\Content namespace
---
 include/identity.php                      |   4 +-
 mod/network.php                           |   8 +-
 mod/ping.php                              |   4 +-
 {include => src/Content}/ForumManager.php | 109 +++++++++++-----------
 view/theme/vier/theme.php                 |  26 +++---
 5 files changed, 77 insertions(+), 74 deletions(-)
 rename {include => src/Content}/ForumManager.php (64%)

diff --git a/include/identity.php b/include/identity.php
index 96a978133..b8f4727ad 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -4,6 +4,7 @@
  */
 
 use Friendica\App;
+use Friendica\Content\ForumManager;
 use Friendica\Core\Cache;
 use Friendica\Core\Config;
 use Friendica\Core\PConfig;
@@ -12,7 +13,6 @@ use Friendica\Core\Worker;
 use Friendica\Database\DBM;
 use Friendica\Object\Contact;
 
-require_once 'include/ForumManager.php';
 require_once 'include/bbcode.php';
 require_once 'mod/proxy.php';
 
@@ -795,7 +795,7 @@ function advanced_profile(App $a)
 
 		//show subcribed forum if it is enabled in the usersettings
 		if (feature_enabled($uid, 'forumlist_profile')) {
-			$profile['forumlist'] = array( t('Forums:'), ForumManager::profile_advanced($uid));
+			$profile['forumlist'] = array( t('Forums:'), ForumManager::profileAdvanced($uid));
 		}
 
 		if ($a->profile['uid'] == local_user()) {
diff --git a/mod/network.php b/mod/network.php
index ff86e0b9e..f58fad6fd 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -1,6 +1,9 @@
 page['aside'] .= (feature_enabled(local_user(),'groups') ? group_side('network/0','network','standard',$group_id) : '');
-	$a->page['aside'] .= (feature_enabled(local_user(),'forumlist_widget') ? ForumManager::widget(local_user(),$cid) : '');
+	$a->page['aside'] .= (feature_enabled(local_user(), 'forumlist_widget') ? ForumManager::widget(local_user(), $cid) : '');
 	$a->page['aside'] .= posted_date_widget('network',local_user(),false);
 	$a->page['aside'] .= networks_widget('network',(x($_GET, 'nets') ? $_GET['nets'] : ''));
 	$a->page['aside'] .= saved_searches($search);
diff --git a/mod/ping.php b/mod/ping.php
index c6f67d397..99d5777ea 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -3,6 +3,7 @@
  * @file include/ping.php
  */
 use Friendica\App;
+use Friendica\Content\ForumManager;
 use Friendica\Core\Cache;
 use Friendica\Core\System;
 use Friendica\Core\PConfig;
@@ -12,7 +13,6 @@ use Friendica\Util\XML;
 
 require_once 'include/datetime.php';
 require_once 'include/bbcode.php';
-require_once 'include/ForumManager.php';
 require_once 'include/group.php';
 require_once 'mod/proxy.php';
 require_once 'include/enotify.php';
@@ -162,7 +162,7 @@ function ping_init(App $a)
 			}
 
 			if (intval(feature_enabled(local_user(), 'forumlist_widget'))) {
-				$forum_counts = ForumManager::count_unseen_items();
+				$forum_counts = ForumManager::countUnseenItems();
 				if (DBM::is_result($forums_counts)) {
 					foreach ($forums_counts as $forum_count) {
 						if ($forum_count['count'] > 0) {
diff --git a/include/ForumManager.php b/src/Content/ForumManager.php
similarity index 64%
rename from include/ForumManager.php
rename to src/Content/ForumManager.php
index 039b4f5d2..e5d153f75 100644
--- a/include/ForumManager.php
+++ b/src/Content/ForumManager.php
@@ -1,39 +1,37 @@
  forum url
 	 *	'name'	=> forum name
 	 *	'id'	=> number of the key from the array
 	 *	'micro' => contact photo in format micro
 	 *	'thumb' => contact photo in format thumb
 	 */
-	public static function get_list($uid, $showhidden = true, $lastitem, $showprivate = false) {
-
+	public static function getList($uid, $lastitem, $showhidden = true, $showprivate = false)
+	{
 		$forumlist = array();
 
 		$order = (($showhidden) ? '' : ' AND NOT `hidden` ');
@@ -43,16 +41,19 @@ class ForumManager {
 			$select = '(`forum` OR `prv`)';
 		}
 
-		$contacts = dba::p("SELECT `contact`.`id`, `contact`.`url`, `contact`.`name`, `contact`.`micro`, `contact`.`thumb` FROM `contact`
+		$contacts = dba::p(
+			"SELECT `contact`.`id`, `contact`.`url`, `contact`.`name`, `contact`.`micro`, `contact`.`thumb`
+			FROM `contact`
 				WHERE `network`= 'dfrn' AND $select AND `uid` = ?
 				AND NOT `blocked` AND NOT `hidden` AND NOT `pending` AND NOT `archive`
 				AND `success_update` > `failure_update`
-				$order ",
-				$uid
+			$order ",
+			$uid
 		);
 
-		if (!$contacts)
+		if (!$contacts) {
 			return($forumlist);
+		}
 
 		while ($contact = dba::fetch($contacts)) {
 			$forumlist[] = array(
@@ -76,30 +77,28 @@ class ForumManager {
 	 * in the settings, it appears at the notwork page sidebar
 	 *
 	 * @param int $uid The ID of the User
-	 * @param int $cid
-	 *	The contact id which is used to mark a forum as "selected"
+	 * @param int $cid The contact id which is used to mark a forum as "selected"
 	 * @return string
 	 */
-	public static function widget($uid,$cid = 0) {
-
-		if(! intval(feature_enabled(local_user(),'forumlist_widget')))
+	public static function widget($uid, $cid = 0)
+	{
+		if (! intval(feature_enabled(local_user(), 'forumlist_widget'))) {
 			return;
+		}
 
 		$o = '';
 
 		//sort by last updated item
 		$lastitem = true;
 
-		$contacts = self::get_list($uid,true,$lastitem, true);
+		$contacts = self::getList($uid, $lastitem, true, true);
 		$total = count($contacts);
 		$visible_forums = 10;
 
 		if (DBM::is_result($contacts)) {
-
 			$id = 0;
 
-			foreach($contacts as $contact) {
-
+			foreach ($contacts as $contact) {
 				$selected = (($cid == $contact['id']) ? ' forum-selected' : '');
 
 				$entry = array(
@@ -116,14 +115,16 @@ class ForumManager {
 
 			$tpl = get_markup_template('widget_forumlist.tpl');
 
-			$o .= replace_macros($tpl,array(
-				'$title'	=> t('Forums'),
-				'$forums'	=> $entries,
-				'$link_desc'	=> t('External link to forum'),
-				'$total'	=> $total,
-				'$visible_forums' => $visible_forums,
-				'$showmore'	=> t('show more'),
-			));
+			$o .= replace_macros(
+				$tpl,
+				array(
+					'$title'	=> t('Forums'),
+					'$forums'	=> $entries,
+					'$link_desc'	=> t('External link to forum'),
+					'$total'	=> $total,
+					'$visible_forums' => $visible_forums,
+					'$showmore'	=> t('show more'))
+			);
 		}
 
 		return $o;
@@ -137,13 +138,13 @@ class ForumManager {
 	 *
 	 * @param int $uid The ID of the User
 	 * @return string
-	 *
 	 */
-	public static function profile_advanced($uid) {
-
-		$profile = intval(feature_enabled($uid,'forumlist_profile'));
-		if(! $profile)
+	public static function profileAdvanced($uid)
+	{
+		$profile = intval(feature_enabled($uid, 'forumlist_profile'));
+		if (! $profile) {
 			return;
+		}
 
 		$o = '';
 
@@ -153,20 +154,22 @@ class ForumManager {
 		//don't sort by last updated item
 		$lastitem = false;
 
-		$contacts = self::get_list($uid,false,$lastitem,false);
+		$contacts = self::getList($uid, $lastitem, false, false);
 
 		$total_shown = 0;
 
-		foreach($contacts as $contact) {
-			$forumlist .= micropro($contact,false,'forumlist-profile-advanced');
+		foreach ($contacts as $contact) {
+			$forumlist .= micropro($contact, false, 'forumlist-profile-advanced');
 			$total_shown ++;
-			if($total_shown == $show_total)
+			if ($total_shown == $show_total) {
 				break;
+			}
 		}
 
-		if(count($contacts) > 0)
+		if (count($contacts) > 0) {
 			$o .= $forumlist;
 			return $o;
+		}
 	}
 
 	/**
@@ -178,10 +181,11 @@ class ForumManager {
 	 *	'id' => contact id
 	 *	'name' => contact/forum name
 	 *	'count' => counted unseen forum items
-	 *
 	 */
-	public static function count_unseen_items() {
-		$r = q("SELECT `contact`.`id`, `contact`.`name`, COUNT(*) AS `count` FROM `item`
+	public static function countUnseenItems()
+	{
+		$r = q(
+			"SELECT `contact`.`id`, `contact`.`name`, COUNT(*) AS `count` FROM `item`
 				INNER JOIN `contact` ON `item`.`contact-id` = `contact`.`id`
 				WHERE `item`.`uid` = %d AND `item`.`visible` AND NOT `item`.`deleted` AND `item`.`unseen`
 				AND `contact`.`network`= 'dfrn' AND (`contact`.`forum` OR `contact`.`prv`)
@@ -194,5 +198,4 @@ class ForumManager {
 
 		return $r;
 	}
-
 }
diff --git a/view/theme/vier/theme.php b/view/theme/vier/theme.php
index 40d4d9c73..a8654f743 100644
--- a/view/theme/vier/theme.php
+++ b/view/theme/vier/theme.php
@@ -10,6 +10,7 @@
  */
 
 use Friendica\App;
+use Friendica\Content\ForumManager;
 use Friendica\Core\Config;
 use Friendica\Core\PConfig;
 use Friendica\Core\System;
@@ -210,9 +211,6 @@ function vier_community_info() {
 
 	//Community_Pages at right_aside
 	if ($show_pages && local_user()) {
-
-		require_once 'include/ForumManager.php';
-
 		if (x($_GET, 'cid') && intval($_GET['cid']) != 0) {
 			$cid = $_GET['cid'];
 		}
@@ -220,16 +218,14 @@ function vier_community_info() {
 		//sort by last updated item
 		$lastitem = true;
 
-		$contacts = ForumManager::get_list($a->user['uid'],true,$lastitem, true);
+		$contacts = ForumManager::getList($a->user['uid'], $lastitem, true, true);
 		$total = count($contacts);
 		$visible_forums = 10;
 
 		if (count($contacts)) {
-
 			$id = 0;
 
 			foreach ($contacts as $contact) {
-
 				$selected = (($cid == $contact['id']) ? ' forum-selected' : '');
 
 				$entry = array(
@@ -247,14 +243,16 @@ function vier_community_info() {
 
 			$tpl = get_markup_template('widget_forumlist_right.tpl');
 
-			$page .= replace_macros($tpl, array(
-				'$title'          => t('Forums'),
-				'$forums'         => $entries,
-				'$link_desc'      => t('External link to forum'),
-				'$total'          => $total,
-				'$visible_forums' => $visible_forums,
-				'$showmore'       => t('show more'),
-			));
+			$page .= replace_macros(
+				$tpl,
+				array(
+					'$title'          => t('Forums'),
+					'$forums'         => $entries,
+					'$link_desc'      => t('External link to forum'),
+					'$total'          => $total,
+					'$visible_forums' => $visible_forums,
+					'$showmore'       => t('show more'))
+			);
 
 			$aside['$page'] = $page;
 		}

From 723b40eea45c2b610558e0e566ee74ec0221b691 Mon Sep 17 00:00:00 2001
From: Michael 
Date: Tue, 21 Nov 2017 21:00:11 +0000
Subject: [PATCH 083/175] No obsolete mysql_* anymore

---
 include/dba.php     | 49 +--------------------------------------------
 include/uimport.php |  1 -
 2 files changed, 1 insertion(+), 49 deletions(-)

diff --git a/include/dba.php b/include/dba.php
index 070722b9b..79c15c85b 100644
--- a/include/dba.php
+++ b/include/dba.php
@@ -93,18 +93,6 @@ class dba {
 			}
 		}
 
-		if (!self::$connected && function_exists('mysql_connect')) {
-			self::$driver = 'mysql';
-			self::$db = mysql_connect($serveraddr, $user, $pass);
-			if (self::$db && mysql_select_db($db, self::$db)) {
-				self::$connected = true;
-
-				if (isset($a->config["system"]["db_charset"])) {
-					mysql_set_charset($a->config["system"]["db_charset"], self::$db);
-				}
-			}
-		}
-
 		// No suitable SQL driver was found.
 		if (!self::$connected) {
 			self::$db = null;
@@ -134,9 +122,6 @@ class dba {
 				case 'mysqli':
 					self::$_server_info = self::$db->server_info;
 					break;
-				case 'mysql':
-					self::$_server_info = mysql_get_server_info(self::$db);
-					break;
 			}
 		}
 		return self::$_server_info;
@@ -216,8 +201,6 @@ class dba {
 				return substr(@self::$db->quote($str, PDO::PARAM_STR), 1, -1);
 			case 'mysqli':
 				return @self::$db->real_escape_string($str);
-			case 'mysql':
-				return @mysql_real_escape_string($str,self::$db);
 		}
 	}
 
@@ -235,9 +218,6 @@ class dba {
 			case 'mysqli':
 				$connected = self::$db->ping();
 				break;
-			case 'mysql':
-				$connected = mysql_ping(self::$db);
-				break;
 		}
 		return $connected;
 	}
@@ -485,22 +465,6 @@ class dba {
 					self::$affected_rows = $retval->affected_rows;
 				}
 				break;
-			case 'mysql':
-				// For the old "mysql" functions we cannot use prepared statements
-				$retval = mysql_query(self::replace_parameters($sql, $args), self::$db);
-				if (mysql_errno(self::$db)) {
-					self::$error = mysql_error(self::$db);
-					self::$errorno = mysql_errno(self::$db);
-				} else {
-					self::$affected_rows = mysql_affected_rows($retval);
-
-					// Due to missing mysql_* support this here wasn't tested at all
-					// See here: http://php.net/manual/en/function.mysql-num-rows.php
-					if (self::$affected_rows <= 0) {
-						self::$affected_rows = mysql_num_rows($retval);
-					}
-				}
-				break;
 		}
 
 		// We are having an own error logging in the function "e"
@@ -668,8 +632,6 @@ class dba {
 				return $stmt->columnCount();
 			case 'mysqli':
 				return $stmt->field_count;
-			case 'mysql':
-				return mysql_affected_rows($stmt);
 		}
 		return 0;
 	}
@@ -688,8 +650,6 @@ class dba {
 				return $stmt->rowCount();
 			case 'mysqli':
 				return $stmt->num_rows;
-			case 'mysql':
-				return mysql_num_rows($stmt);
 		}
 		return 0;
 	}
@@ -740,8 +700,6 @@ class dba {
 					$columns[$fields[$param]->name] = $col;
 				}
 				return $columns;
-			case 'mysql':
-				return mysql_fetch_array($stmt, MYSQL_ASSOC);
 		}
 	}
 
@@ -781,9 +739,6 @@ class dba {
 			case 'mysqli':
 				$id = self::$db->insert_id;
 				break;
-			case 'mysql':
-				$id = mysql_insert_id(self::$db);
-				break;
 		}
 		return $id;
 	}
@@ -1250,10 +1205,8 @@ class dba {
 			case 'pdo':
 				return $stmt->closeCursor();
 			case 'mysqli':
-				return $stmt->free_result();
+				$stmt->free_result();
 				return $stmt->close();
-			case 'mysql':
-				return mysql_free_result($stmt);
 		}
 	}
 }
diff --git a/include/uimport.php b/include/uimport.php
index 93f978c07..8554ba6f0 100644
--- a/include/uimport.php
+++ b/include/uimport.php
@@ -147,7 +147,6 @@ function import_account(App $a, $file) {
 	// import user
 	$r = db_import_assoc('user', $account['user']);
 	if ($r === false) {
-		//echo "
"; var_dump($r, $query, mysql_error()); killme();
 		logger("uimport:insert user : ERROR : " . dba::errorMessage(), LOGGER_NORMAL);
 		notice(t("User creation error"));
 		return;

From d982c68d7542a1001191498aef95920996b0232a Mon Sep 17 00:00:00 2001
From: Michael 
Date: Tue, 21 Nov 2017 23:03:33 +0000
Subject: [PATCH 084/175] Cache.php is now using dba methods

---
 src/Core/Cache.php | 92 +++++++++++++++++++---------------------------
 1 file changed, 38 insertions(+), 54 deletions(-)

diff --git a/src/Core/Cache.php b/src/Core/Cache.php
index 39f5d12fa..eb58811e2 100644
--- a/src/Core/Cache.php
+++ b/src/Core/Cache.php
@@ -7,6 +7,7 @@ namespace Friendica\Core;
 use Friendica\Core\Config;
 use Friendica\Core\PConfig;
 use Friendica\Database\DBM;
+use dba;
 
 /**
  * @brief Class for storing data for a short time
@@ -106,13 +107,10 @@ class Cache
 		// Frequently clear cache
 		self::clear($duration);
 
-		$r = q(
-			"SELECT `v` FROM `cache` WHERE `k`='%s' LIMIT 1",
-			dbesc($key)
-		);
+		$r = dba::select('cache', array('v'), array('k' => $key), array('limit' => 1));
 
 		if (DBM::is_result($r)) {
-			$cached = $r[0]['v'];
+			$cached = $r['v'];
 			$value = @unserialize($cached);
 
 			// Only return a value if the serialized value is valid.
@@ -146,15 +144,9 @@ class Cache
 			$memcache->set(get_app()->get_hostname().":".$key, serialize($value), MEMCACHE_COMPRESSED, self::duration($duration));
 			return;
 		}
-
-		/// @todo store the cache data in the same way like the config data
-		q(
-			"REPLACE INTO `cache` (`k`,`v`,`expire_mode`,`updated`) VALUES ('%s','%s',%d,'%s')",
-			dbesc($key),
-			dbesc(serialize($value)),
-			intval($duration),
-			dbesc(datetime_convert())
-		);
+		$fields = array('v' => serialize($value), 'expire_mode' => $duration, 'updated' => datetime_convert());
+		$condition = array('k' => $key);
+		dba::update('cache', $fields, $condition, true);
 	}
 
 	/**
@@ -169,77 +161,69 @@ class Cache
 		// Clear long lasting cache entries only once a day
 		if (Config::get("system", "cache_cleared_day") < time() - self::duration(CACHE_DAY)) {
 			if ($max_level == CACHE_MONTH) {
-				q(
-					"DELETE FROM `cache` WHERE `updated` < '%s' AND `expire_mode` = %d",
-					dbesc(datetime_convert('UTC', 'UTC', "now - 30 days")),
-					intval(CACHE_MONTH)
-				);
+				$condition = array("`updated` < ? AND `expire_mode` = ?",
+						datetime_convert('UTC', 'UTC', "now - 30 days"),
+						CACHE_MONTH);
+				dba::delete('cache', $condition);
 			}
 
 			if ($max_level <= CACHE_WEEK) {
-				q(
-					"DELETE FROM `cache` WHERE `updated` < '%s' AND `expire_mode` = %d",
-					dbesc(datetime_convert('UTC', 'UTC', "now - 7 days")),
-					intval(CACHE_WEEK)
-				);
+				$condition = array("`updated` < ? AND `expire_mode` = ?",
+						datetime_convert('UTC', 'UTC', "now - 7 days"),
+						CACHE_WEEK);
+				dba::delete('cache', $condition);
 			}
 
 			if ($max_level <= CACHE_DAY) {
-				q(
-					"DELETE FROM `cache` WHERE `updated` < '%s' AND `expire_mode` = %d",
-					dbesc(datetime_convert('UTC', 'UTC', "now - 1 days")),
-					intval(CACHE_DAY)
-				);
+				$condition = array("`updated` < ? AND `expire_mode` = ?",
+						datetime_convert('UTC', 'UTC', "now - 1 days"),
+						CACHE_DAY);
+				dba::delete('cache', $condition);
 			}
 			Config::set("system", "cache_cleared_day", time());
 		}
 
 		if (($max_level <= CACHE_HOUR) && (Config::get("system", "cache_cleared_hour")) < time() - self::duration(CACHE_HOUR)) {
-			q(
-				"DELETE FROM `cache` WHERE `updated` < '%s' AND `expire_mode` = %d",
-				dbesc(datetime_convert('UTC', 'UTC', "now - 1 hours")),
-				intval(CACHE_HOUR)
-			);
+			$condition = array("`updated` < ? AND `expire_mode` = ?",
+					datetime_convert('UTC', 'UTC', "now - 1 hours"),
+					CACHE_HOUR);
+			dba::delete('cache', $condition);
 
 			Config::set("system", "cache_cleared_hour", time());
 		}
 
 		if (($max_level <= CACHE_HALF_HOUR) && (Config::get("system", "cache_cleared_half_hour")) < time() - self::duration(CACHE_HALF_HOUR)) {
-			q(
-				"DELETE FROM `cache` WHERE `updated` < '%s' AND `expire_mode` = %d",
-				dbesc(datetime_convert('UTC', 'UTC', "now - 30 minutes")),
-				intval(CACHE_HALF_HOUR)
-			);
+			$condition = array("`updated` < ? AND `expire_mode` = ?",
+					datetime_convert('UTC', 'UTC', "now - 30 minutes"),
+					CACHE_HALF_HOUR);
+			dba::delete('cache', $condition);
 
 			Config::set("system", "cache_cleared_half_hour", time());
 		}
 
 		if (($max_level <= CACHE_QUARTER_HOUR) && (Config::get("system", "cache_cleared_quarter_hour")) < time() - self::duration(CACHE_QUARTER_HOUR)) {
-			q(
-				"DELETE FROM `cache` WHERE `updated` < '%s' AND `expire_mode` = %d",
-				dbesc(datetime_convert('UTC', 'UTC', "now - 15 minutes")),
-				intval(CACHE_QUARTER_HOUR)
-			);
+			$condition = array("`updated` < ? AND `expire_mode` = ?",
+					datetime_convert('UTC', 'UTC', "now - 15 minutes"),
+					CACHE_QUARTER_HOUR);
+			dba::delete('cache', $condition);
 
 			Config::set("system", "cache_cleared_quarter_hour", time());
 		}
 
 		if (($max_level <= CACHE_FIVE_MINUTES) && (Config::get("system", "cache_cleared_five_minute")) < time() - self::duration(CACHE_FIVE_MINUTES)) {
-			q(
-				"DELETE FROM `cache` WHERE `updated` < '%s' AND `expire_mode` = %d",
-				dbesc(datetime_convert('UTC', 'UTC', "now - 5 minutes")),
-				intval(CACHE_FIVE_MINUTES)
-			);
+			$condition = array("`updated` < ? AND `expire_mode` = ?",
+					datetime_convert('UTC', 'UTC', "now - 5 minutes"),
+					CACHE_FIVE_MINUTES);
+			dba::delete('cache', $condition);
 
 			Config::set("system", "cache_cleared_five_minute", time());
 		}
 
 		if (($max_level <= CACHE_MINUTE) && (Config::get("system", "cache_cleared_minute")) < time() - self::duration(CACHE_MINUTE)) {
-			q(
-				"DELETE FROM `cache` WHERE `updated` < '%s' AND `expire_mode` = %d",
-				dbesc(datetime_convert('UTC', 'UTC', "now - 1 minutes")),
-				intval(CACHE_MINUTE)
-			);
+			$condition = array("`updated` < ? AND `expire_mode` = ?",
+					datetime_convert('UTC', 'UTC', "now - 1 minutes"),
+					CACHE_MINUTE);
+			dba::delete('cache', $condition);
 
 			Config::set("system", "cache_cleared_minute", time());
 		}

From 2acc8091ab25b8dade97eba11e1c9f290c82b18f Mon Sep 17 00:00:00 2001
From: Tobias Diekershoff 
Date: Wed, 22 Nov 2017 07:34:37 +0100
Subject: [PATCH 085/175] IT translations THX Mauro Batini

---
 view/lang/it/messages.po | 12298 +++++++++++++++++++------------------
 view/lang/it/strings.php |  2273 +++----
 2 files changed, 7373 insertions(+), 7198 deletions(-)

diff --git a/view/lang/it/messages.po b/view/lang/it/messages.po
index 9b9def9ca..e90885a79 100644
--- a/view/lang/it/messages.po
+++ b/view/lang/it/messages.po
@@ -9,15 +9,16 @@
 # fabrixxm , 2011-2012
 # Francesco Apruzzese , 2012-2013
 # ufic , 2012
+# Mauro Batini , 2017
 # Paolo Wave , 2012
 # Sandro Santilli , 2015-2016
 msgid ""
 msgstr ""
 "Project-Id-Version: friendica\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-05-03 07:08+0200\n"
-"PO-Revision-Date: 2017-05-15 11:24+0000\n"
-"Last-Translator: fabrixxm \n"
+"POT-Creation-Date: 2017-11-07 07:03+0100\n"
+"PO-Revision-Date: 2017-11-18 18:26+0000\n"
+"Last-Translator: Mauro Batini \n"
 "Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -25,439 +26,302 @@ msgstr ""
 "Language: it\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: include/ForumManager.php:114 include/nav.php:131 include/text.php:1093
-#: view/theme/vier/theme.php:254
-msgid "Forums"
-msgstr "Forum"
+#: include/features.php:65
+msgid "General Features"
+msgstr "Funzionalità generali"
 
-#: include/ForumManager.php:116 view/theme/vier/theme.php:256
-msgid "External link to forum"
-msgstr "Link esterno al forum"
+#: include/features.php:67
+msgid "Multiple Profiles"
+msgstr "Profili multipli"
 
-#: include/ForumManager.php:119 include/contact_widgets.php:269
-#: include/items.php:2450 mod/content.php:624 object/Item.php:420
-#: view/theme/vier/theme.php:259 boot.php:1000
-msgid "show more"
-msgstr "mostra di più"
+#: include/features.php:67
+msgid "Ability to create multiple profiles"
+msgstr "Possibilità di creare profili multipli"
 
-#: include/NotificationsManager.php:153
-msgid "System"
-msgstr "Sistema"
+#: include/features.php:68
+msgid "Photo Location"
+msgstr "Località Foto"
 
-#: include/NotificationsManager.php:160 include/nav.php:158 mod/admin.php:517
-#: view/theme/frio/theme.php:253
-msgid "Network"
-msgstr "Rete"
+#: include/features.php:68
+msgid ""
+"Photo metadata is normally stripped. This extracts the location (if present)"
+" prior to stripping metadata and links it to a map."
+msgstr "I metadati delle foto vengono rimossi. Questa opzione estrae la località (se presenta) prima di rimuovere i metadati e la collega a una mappa."
 
-#: include/NotificationsManager.php:167 mod/network.php:832
-#: mod/profiles.php:696
-msgid "Personal"
-msgstr "Personale"
+#: include/features.php:69
+msgid "Export Public Calendar"
+msgstr "Esporta calendario pubblico"
 
-#: include/NotificationsManager.php:174 include/nav.php:105
-#: include/nav.php:161
-msgid "Home"
-msgstr "Home"
+#: include/features.php:69
+msgid "Ability for visitors to download the public calendar"
+msgstr "Permesso ai visitatori di scaricare il calendario pubblico"
 
-#: include/NotificationsManager.php:181 include/nav.php:166
-msgid "Introductions"
-msgstr "Presentazioni"
+#: include/features.php:74
+msgid "Post Composition Features"
+msgstr "Funzionalità di composizione dei post"
 
-#: include/NotificationsManager.php:239 include/NotificationsManager.php:251
+#: include/features.php:75
+msgid "Post Preview"
+msgstr "Anteprima dei post"
+
+#: include/features.php:75
+msgid "Allow previewing posts and comments before publishing them"
+msgstr "Permetti di avere un'anteprima di messaggi e commenti prima di pubblicarli"
+
+#: include/features.php:76
+msgid "Auto-mention Forums"
+msgstr "Auto-cita i Forum"
+
+#: include/features.php:76
+msgid ""
+"Add/remove mention when a forum page is selected/deselected in ACL window."
+msgstr "Aggiunge/rimuove una menzione quando una pagina forum è selezionata/deselezionata nella finestra dei permessi."
+
+#: include/features.php:81
+msgid "Network Sidebar Widgets"
+msgstr "Widget della barra laterale nella pagina Rete"
+
+#: include/features.php:82
+msgid "Search by Date"
+msgstr "Cerca per data"
+
+#: include/features.php:82
+msgid "Ability to select posts by date ranges"
+msgstr "Permette di filtrare i post per data"
+
+#: include/features.php:83 include/features.php:113
+msgid "List Forums"
+msgstr "Elenco forum"
+
+#: include/features.php:83
+msgid "Enable widget to display the forums your are connected with"
+msgstr "Abilita il widget che mostra i forum ai quali sei connesso"
+
+#: include/features.php:84
+msgid "Group Filter"
+msgstr "Filtra gruppi"
+
+#: include/features.php:84
+msgid "Enable widget to display Network posts only from selected group"
+msgstr "Abilita il widget per filtrare i post solo per il gruppo selezionato"
+
+#: include/features.php:85
+msgid "Network Filter"
+msgstr "Filtro reti"
+
+#: include/features.php:85
+msgid "Enable widget to display Network posts only from selected network"
+msgstr "Abilita il widget per mostrare i post solo per la rete selezionata"
+
+#: include/features.php:86 mod/search.php:37 mod/network.php:196
+msgid "Saved Searches"
+msgstr "Ricerche salvate"
+
+#: include/features.php:86
+msgid "Save search terms for re-use"
+msgstr "Salva i termini cercati per riutilizzarli"
+
+#: include/features.php:91
+msgid "Network Tabs"
+msgstr "Schede pagina Rete"
+
+#: include/features.php:92
+msgid "Network Personal Tab"
+msgstr "Scheda Personali"
+
+#: include/features.php:92
+msgid "Enable tab to display only Network posts that you've interacted on"
+msgstr "Abilita la scheda per mostrare solo i post a cui hai partecipato"
+
+#: include/features.php:93
+msgid "Network New Tab"
+msgstr "Scheda Nuovi"
+
+#: include/features.php:93
+msgid "Enable tab to display only new Network posts (from the last 12 hours)"
+msgstr "Abilita la scheda per mostrare solo i post nuovi (nelle ultime 12 ore)"
+
+#: include/features.php:94
+msgid "Network Shared Links Tab"
+msgstr "Scheda Link Condivisi"
+
+#: include/features.php:94
+msgid "Enable tab to display only Network posts with links in them"
+msgstr "Abilita la scheda per mostrare solo i post che contengono link"
+
+#: include/features.php:99
+msgid "Post/Comment Tools"
+msgstr "Strumenti per messaggi/commenti"
+
+#: include/features.php:100
+msgid "Multiple Deletion"
+msgstr "Eliminazione multipla"
+
+#: include/features.php:100
+msgid "Select and delete multiple posts/comments at once"
+msgstr "Seleziona ed elimina vari messaggi e commenti in una volta sola"
+
+#: include/features.php:101
+msgid "Edit Sent Posts"
+msgstr "Modifica i post inviati"
+
+#: include/features.php:101
+msgid "Edit and correct posts and comments after sending"
+msgstr "Modifica e correggi messaggi e commenti dopo averli inviati"
+
+#: include/features.php:102
+msgid "Tagging"
+msgstr "Aggiunta tag"
+
+#: include/features.php:102
+msgid "Ability to tag existing posts"
+msgstr "Permette di aggiungere tag ai post già esistenti"
+
+#: include/features.php:103
+msgid "Post Categories"
+msgstr "Categorie post"
+
+#: include/features.php:103
+msgid "Add categories to your posts"
+msgstr "Aggiungi categorie ai tuoi post"
+
+#: include/features.php:104 include/contact_widgets.php:167
+msgid "Saved Folders"
+msgstr "Cartelle Salvate"
+
+#: include/features.php:104
+msgid "Ability to file posts under folders"
+msgstr "Permette di archiviare i post in cartelle"
+
+#: include/features.php:105
+msgid "Dislike Posts"
+msgstr "Non mi piace"
+
+#: include/features.php:105
+msgid "Ability to dislike posts/comments"
+msgstr "Permetti di inviare \"non mi piace\" ai messaggi"
+
+#: include/features.php:106
+msgid "Star Posts"
+msgstr "Post preferiti"
+
+#: include/features.php:106
+msgid "Ability to mark special posts with a star indicator"
+msgstr "Permette di segnare i post preferiti con una stella"
+
+#: include/features.php:107
+msgid "Mute Post Notifications"
+msgstr "Silenzia le notifiche di nuovi post"
+
+#: include/features.php:107
+msgid "Ability to mute notifications for a thread"
+msgstr "Permette di silenziare le notifiche di nuovi post in una discussione"
+
+#: include/features.php:112
+msgid "Advanced Profile Settings"
+msgstr "Impostazioni Avanzate Profilo"
+
+#: include/features.php:113
+msgid "Show visitors public community forums at the Advanced Profile Page"
+msgstr "Mostra ai visitatori i forum nella pagina Profilo Avanzato"
+
+#: include/datetime.php:66 include/datetime.php:68 mod/profiles.php:697
+msgid "Miscellaneous"
+msgstr "Varie"
+
+#: include/datetime.php:196 include/identity.php:655
+msgid "Birthday:"
+msgstr "Compleanno:"
+
+#: include/datetime.php:198 mod/profiles.php:720
+msgid "Age: "
+msgstr "Età : "
+
+#: include/datetime.php:200
+msgid "YYYY-MM-DD or MM-DD"
+msgstr "AAAA-MM-GG o MM-GG"
+
+#: include/datetime.php:370
+msgid "never"
+msgstr "mai"
+
+#: include/datetime.php:376
+msgid "less than a second ago"
+msgstr "meno di un secondo fa"
+
+#: include/datetime.php:379
+msgid "year"
+msgstr "anno"
+
+#: include/datetime.php:379
+msgid "years"
+msgstr "anni"
+
+#: include/datetime.php:380 include/event.php:490 mod/cal.php:282
+#: mod/events.php:393
+msgid "month"
+msgstr "mese"
+
+#: include/datetime.php:380
+msgid "months"
+msgstr "mesi"
+
+#: include/datetime.php:381 include/event.php:491 mod/cal.php:283
+#: mod/events.php:394
+msgid "week"
+msgstr "settimana"
+
+#: include/datetime.php:381
+msgid "weeks"
+msgstr "settimane"
+
+#: include/datetime.php:382 include/event.php:492 mod/cal.php:284
+#: mod/events.php:395
+msgid "day"
+msgstr "giorno"
+
+#: include/datetime.php:382
+msgid "days"
+msgstr "giorni"
+
+#: include/datetime.php:383
+msgid "hour"
+msgstr "ora"
+
+#: include/datetime.php:383
+msgid "hours"
+msgstr "ore"
+
+#: include/datetime.php:384
+msgid "minute"
+msgstr "minuto"
+
+#: include/datetime.php:384
+msgid "minutes"
+msgstr "minuti"
+
+#: include/datetime.php:385
+msgid "second"
+msgstr "secondo"
+
+#: include/datetime.php:385
+msgid "seconds"
+msgstr "secondi"
+
+#: include/datetime.php:394
 #, php-format
-msgid "%s commented on %s's post"
-msgstr "%s ha commentato il messaggio di %s"
+msgid "%1$d %2$s ago"
+msgstr "%1$d %2$s fa"
 
-#: include/NotificationsManager.php:250
+#: include/datetime.php:620
 #, php-format
-msgid "%s created a new post"
-msgstr "%s a creato un nuovo messaggio"
+msgid "%s's birthday"
+msgstr "Compleanno di %s"
 
-#: include/NotificationsManager.php:265
+#: include/datetime.php:621 include/dfrn.php:1361
 #, php-format
-msgid "%s liked %s's post"
-msgstr "a %s è piaciuto il messaggio di %s"
-
-#: include/NotificationsManager.php:278
-#, php-format
-msgid "%s disliked %s's post"
-msgstr "a %s non è piaciuto il messaggio di %s"
-
-#: include/NotificationsManager.php:291
-#, php-format
-msgid "%s is attending %s's event"
-msgstr "%s partecipa all'evento di %s"
-
-#: include/NotificationsManager.php:304
-#, php-format
-msgid "%s is not attending %s's event"
-msgstr "%s non partecipa all'evento di %s"
-
-#: include/NotificationsManager.php:317
-#, php-format
-msgid "%s may attend %s's event"
-msgstr "%s potrebbe partecipare all'evento di %s"
-
-#: include/NotificationsManager.php:334
-#, php-format
-msgid "%s is now friends with %s"
-msgstr "%s è ora amico di %s"
-
-#: include/NotificationsManager.php:770
-msgid "Friend Suggestion"
-msgstr "Amico suggerito"
-
-#: include/NotificationsManager.php:803
-msgid "Friend/Connect Request"
-msgstr "Richiesta amicizia/connessione"
-
-#: include/NotificationsManager.php:803
-msgid "New Follower"
-msgstr "Qualcuno inizia a seguirti"
-
-#: include/Photo.php:1038 include/Photo.php:1054 include/Photo.php:1062
-#: include/Photo.php:1087 include/message.php:146 mod/wall_upload.php:249
-#: mod/item.php:467
-msgid "Wall Photos"
-msgstr "Foto della bacheca"
-
-#: include/delivery.php:427
-msgid "(no subject)"
-msgstr "(nessun oggetto)"
-
-#: include/delivery.php:439 include/enotify.php:43
-msgid "noreply"
-msgstr "nessuna risposta"
-
-#: include/like.php:27 include/conversation.php:153 include/diaspora.php:1576
-#, php-format
-msgid "%1$s likes %2$s's %3$s"
-msgstr "A %1$s piace %3$s di %2$s"
-
-#: include/like.php:31 include/like.php:36 include/conversation.php:156
-#, php-format
-msgid "%1$s doesn't like %2$s's %3$s"
-msgstr "A %1$s non piace %3$s di %2$s"
-
-#: include/like.php:41
-#, php-format
-msgid "%1$s is attending %2$s's %3$s"
-msgstr "%1$s parteciperà a %3$s di %2$s"
-
-#: include/like.php:46
-#, php-format
-msgid "%1$s is not attending %2$s's %3$s"
-msgstr "%1$s non parteciperà a %3$s di %2$s"
-
-#: include/like.php:51
-#, php-format
-msgid "%1$s may attend %2$s's %3$s"
-msgstr "%1$s forse parteciperà a %3$s di %2$s"
-
-#: include/like.php:178 include/conversation.php:141
-#: include/conversation.php:293 include/text.php:1872 mod/subthread.php:88
-#: mod/tagger.php:62
-msgid "photo"
-msgstr "foto"
-
-#: include/like.php:178 include/conversation.php:136
-#: include/conversation.php:146 include/conversation.php:288
-#: include/conversation.php:297 include/diaspora.php:1580 mod/subthread.php:88
-#: mod/tagger.php:62
-msgid "status"
-msgstr "stato"
-
-#: include/like.php:180 include/conversation.php:133
-#: include/conversation.php:285 include/text.php:1870
-msgid "event"
-msgstr "l'evento"
-
-#: include/message.php:15 include/message.php:169
-msgid "[no subject]"
-msgstr "[nessun oggetto]"
-
-#: include/nav.php:35 mod/navigation.php:19
-msgid "Nothing new here"
-msgstr "Niente di nuovo qui"
-
-#: include/nav.php:39 mod/navigation.php:23
-msgid "Clear notifications"
-msgstr "Pulisci le notifiche"
-
-#: include/nav.php:40 include/text.php:1083
-msgid "@name, !forum, #tags, content"
-msgstr "@nome, !forum, #tag, contenuto"
-
-#: include/nav.php:78 view/theme/frio/theme.php:243 boot.php:1867
-msgid "Logout"
-msgstr "Esci"
-
-#: include/nav.php:78 view/theme/frio/theme.php:243
-msgid "End this session"
-msgstr "Finisci questa sessione"
-
-#: include/nav.php:81 include/identity.php:769 mod/contacts.php:645
-#: mod/contacts.php:841 view/theme/frio/theme.php:246
-msgid "Status"
-msgstr "Stato"
-
-#: include/nav.php:81 include/nav.php:161 view/theme/frio/theme.php:246
-msgid "Your posts and conversations"
-msgstr "I tuoi messaggi e le tue conversazioni"
-
-#: include/nav.php:82 include/identity.php:622 include/identity.php:744
-#: include/identity.php:777 mod/contacts.php:647 mod/contacts.php:849
-#: mod/newmember.php:32 mod/profperm.php:105 view/theme/frio/theme.php:247
-msgid "Profile"
-msgstr "Profilo"
-
-#: include/nav.php:82 view/theme/frio/theme.php:247
-msgid "Your profile page"
-msgstr "Pagina del tuo profilo"
-
-#: include/nav.php:83 include/identity.php:785 mod/fbrowser.php:31
-#: view/theme/frio/theme.php:248
-msgid "Photos"
-msgstr "Foto"
-
-#: include/nav.php:83 view/theme/frio/theme.php:248
-msgid "Your photos"
-msgstr "Le tue foto"
-
-#: include/nav.php:84 include/identity.php:793 include/identity.php:796
-#: view/theme/frio/theme.php:249
-msgid "Videos"
-msgstr "Video"
-
-#: include/nav.php:84 view/theme/frio/theme.php:249
-msgid "Your videos"
-msgstr "I tuoi video"
-
-#: include/nav.php:85 include/nav.php:149 include/identity.php:805
-#: include/identity.php:816 mod/cal.php:270 mod/events.php:374
-#: view/theme/frio/theme.php:250 view/theme/frio/theme.php:254
-msgid "Events"
-msgstr "Eventi"
-
-#: include/nav.php:85 view/theme/frio/theme.php:250
-msgid "Your events"
-msgstr "I tuoi eventi"
-
-#: include/nav.php:86
-msgid "Personal notes"
-msgstr "Note personali"
-
-#: include/nav.php:86
-msgid "Your personal notes"
-msgstr "Le tue note personali"
-
-#: include/nav.php:95 mod/bookmarklet.php:12 boot.php:1868
-msgid "Login"
-msgstr "Accedi"
-
-#: include/nav.php:95
-msgid "Sign in"
-msgstr "Entra"
-
-#: include/nav.php:105
-msgid "Home Page"
-msgstr "Home Page"
-
-#: include/nav.php:109 mod/register.php:289 boot.php:1844
-msgid "Register"
-msgstr "Registrati"
-
-#: include/nav.php:109
-msgid "Create an account"
-msgstr "Crea un account"
-
-#: include/nav.php:115 mod/help.php:47 view/theme/vier/theme.php:297
-msgid "Help"
-msgstr "Guida"
-
-#: include/nav.php:115
-msgid "Help and documentation"
-msgstr "Guida e documentazione"
-
-#: include/nav.php:119
-msgid "Apps"
-msgstr "Applicazioni"
-
-#: include/nav.php:119
-msgid "Addon applications, utilities, games"
-msgstr "Applicazioni, utilità e giochi aggiuntivi"
-
-#: include/nav.php:123 include/text.php:1080 mod/search.php:149
-msgid "Search"
-msgstr "Cerca"
-
-#: include/nav.php:123
-msgid "Search site content"
-msgstr "Cerca nel contenuto del sito"
-
-#: include/nav.php:126 include/text.php:1088
-msgid "Full Text"
-msgstr "Testo Completo"
-
-#: include/nav.php:127 include/text.php:1089
-msgid "Tags"
-msgstr "Tags:"
-
-#: include/nav.php:128 include/nav.php:192 include/identity.php:838
-#: include/identity.php:841 include/text.php:1090 mod/contacts.php:800
-#: mod/contacts.php:861 mod/viewcontacts.php:121 view/theme/frio/theme.php:257
-msgid "Contacts"
-msgstr "Contatti"
-
-#: include/nav.php:143 include/nav.php:145 mod/community.php:32
-msgid "Community"
-msgstr "Comunità"
-
-#: include/nav.php:143
-msgid "Conversations on this site"
-msgstr "Conversazioni su questo sito"
-
-#: include/nav.php:145
-msgid "Conversations on the network"
-msgstr "Conversazioni nella rete"
-
-#: include/nav.php:149 include/identity.php:808 include/identity.php:819
-#: view/theme/frio/theme.php:254
-msgid "Events and Calendar"
-msgstr "Eventi e calendario"
-
-#: include/nav.php:152
-msgid "Directory"
-msgstr "Elenco"
-
-#: include/nav.php:152
-msgid "People directory"
-msgstr "Elenco delle persone"
-
-#: include/nav.php:154
-msgid "Information"
-msgstr "Informazioni"
-
-#: include/nav.php:154
-msgid "Information about this friendica instance"
-msgstr "Informazioni su questo server friendica"
-
-#: include/nav.php:158 view/theme/frio/theme.php:253
-msgid "Conversations from your friends"
-msgstr "Conversazioni dai tuoi amici"
-
-#: include/nav.php:159
-msgid "Network Reset"
-msgstr "Reset pagina Rete"
-
-#: include/nav.php:159
-msgid "Load Network page with no filters"
-msgstr "Carica la pagina Rete senza nessun filtro"
-
-#: include/nav.php:166
-msgid "Friend Requests"
-msgstr "Richieste di amicizia"
-
-#: include/nav.php:169 mod/notifications.php:96
-msgid "Notifications"
-msgstr "Notifiche"
-
-#: include/nav.php:170
-msgid "See all notifications"
-msgstr "Vedi tutte le notifiche"
-
-#: include/nav.php:171 mod/settings.php:906
-msgid "Mark as seen"
-msgstr "Segna come letto"
-
-#: include/nav.php:171
-msgid "Mark all system notifications seen"
-msgstr "Segna tutte le notifiche come viste"
-
-#: include/nav.php:175 mod/message.php:179 view/theme/frio/theme.php:255
-msgid "Messages"
-msgstr "Messaggi"
-
-#: include/nav.php:175 view/theme/frio/theme.php:255
-msgid "Private mail"
-msgstr "Posta privata"
-
-#: include/nav.php:176
-msgid "Inbox"
-msgstr "In arrivo"
-
-#: include/nav.php:177
-msgid "Outbox"
-msgstr "Inviati"
-
-#: include/nav.php:178 mod/message.php:16
-msgid "New Message"
-msgstr "Nuovo messaggio"
-
-#: include/nav.php:181
-msgid "Manage"
-msgstr "Gestisci"
-
-#: include/nav.php:181
-msgid "Manage other pages"
-msgstr "Gestisci altre pagine"
-
-#: include/nav.php:184 mod/settings.php:81
-msgid "Delegations"
-msgstr "Delegazioni"
-
-#: include/nav.php:184 mod/delegate.php:130
-msgid "Delegate Page Management"
-msgstr "Gestione delegati per la pagina"
-
-#: include/nav.php:186 mod/newmember.php:22 mod/settings.php:111
-#: mod/admin.php:1618 mod/admin.php:1894 view/theme/frio/theme.php:256
-msgid "Settings"
-msgstr "Impostazioni"
-
-#: include/nav.php:186 view/theme/frio/theme.php:256
-msgid "Account settings"
-msgstr "Parametri account"
-
-#: include/nav.php:189 include/identity.php:290
-msgid "Profiles"
-msgstr "Profili"
-
-#: include/nav.php:189
-msgid "Manage/Edit Profiles"
-msgstr "Gestisci/Modifica i profili"
-
-#: include/nav.php:192 view/theme/frio/theme.php:257
-msgid "Manage/edit friends and contacts"
-msgstr "Gestisci/modifica amici e contatti"
-
-#: include/nav.php:197 mod/admin.php:196
-msgid "Admin"
-msgstr "Amministrazione"
-
-#: include/nav.php:197
-msgid "Site setup and configuration"
-msgstr "Configurazione del sito"
-
-#: include/nav.php:200
-msgid "Navigation"
-msgstr "Navigazione"
-
-#: include/nav.php:200
-msgid "Site map"
-msgstr "Mappa del sito"
-
-#: include/plugin.php:530 include/plugin.php:532
-msgid "Click here to upgrade."
-msgstr "Clicca qui per aggiornare."
-
-#: include/plugin.php:538
-msgid "This action exceeds the limits set by your subscription plan."
-msgstr "Questa azione eccede i limiti del tuo piano di sottoscrizione."
-
-#: include/plugin.php:543
-msgid "This action is not available under your subscription plan."
-msgstr "Questa azione non è disponibile nel tuo piano di sottoscrizione."
+msgid "Happy Birthday %s"
+msgstr "Buon compleanno %s"
 
 #: include/profile_selectors.php:6
 msgid "Male"
@@ -511,7 +375,7 @@ msgstr "Non specificato"
 msgid "Other"
 msgstr "Altro"
 
-#: include/profile_selectors.php:6 include/conversation.php:1547
+#: include/profile_selectors.php:6 include/conversation.php:1565
 msgid "Undecided"
 msgid_plural "Undecided"
 msgstr[0] "Indeciso"
@@ -605,7 +469,7 @@ msgstr "Infedele"
 msgid "Sex Addict"
 msgstr "Sesso-dipendente"
 
-#: include/profile_selectors.php:42 include/user.php:263 include/user.php:267
+#: include/profile_selectors.php:42 include/user.php:256 include/user.php:260
 msgid "Friends"
 msgstr "Amici"
 
@@ -693,230 +557,1017 @@ msgstr "Non interessa"
 msgid "Ask me"
 msgstr "Chiedimelo"
 
-#: include/security.php:61
-msgid "Welcome "
-msgstr "Ciao"
-
-#: include/security.php:62
-msgid "Please upload a profile photo."
-msgstr "Carica una foto per il profilo."
-
-#: include/security.php:65
-msgid "Welcome back "
-msgstr "Ciao "
-
-#: include/security.php:429
+#: include/group.php:25
 msgid ""
-"The form security token was not correct. This probably happened because the "
-"form has been opened for too long (>3 hours) before submitting it."
-msgstr "Il token di sicurezza della form non era corretto. Probabilmente la form è rimasta aperta troppo a lungo (più di tre ore) prima di inviarla."
+"A deleted group with this name was revived. Existing item permissions "
+"may apply to this group and any future members. If this is "
+"not what you intended, please create another group with a different name."
+msgstr "Un gruppo eliminato con questo nome è stato ricreato. I permessi  esistenti su un elemento possono essere applicati a questo gruppo e tutti i membri futuri. Se questo non è ciò che si intende, si prega di creare un altro gruppo con un nome diverso."
 
-#: include/uimport.php:91
-msgid "Error decoding account file"
-msgstr "Errore decodificando il file account"
+#: include/group.php:201
+msgid "Default privacy group for new contacts"
+msgstr "Gruppo predefinito per i nuovi contatti"
 
-#: include/uimport.php:97
-msgid "Error! No version data in file! This is not a Friendica account file?"
-msgstr "Errore! Nessuna informazione di versione nel file! Potrebbe non essere un file account di Friendica?"
+#: include/group.php:234
+msgid "Everybody"
+msgstr "Tutti"
 
-#: include/uimport.php:113 include/uimport.php:124
-msgid "Error! Cannot check nickname"
-msgstr "Errore! Non posso controllare il nickname"
+#: include/group.php:257
+msgid "edit"
+msgstr "modifica"
 
-#: include/uimport.php:117 include/uimport.php:128
-#, php-format
-msgid "User '%s' already exists on this server!"
-msgstr "L'utente '%s' esiste già su questo server!"
+#: include/group.php:278 mod/newmember.php:39
+msgid "Groups"
+msgstr "Gruppi"
 
-#: include/uimport.php:150
-msgid "User creation error"
-msgstr "Errore creando l'utente"
+#: include/group.php:280
+msgid "Edit groups"
+msgstr "Modifica gruppi"
 
-#: include/uimport.php:170
-msgid "User profile creation error"
-msgstr "Errore creando il profilo dell'utente"
+#: include/group.php:282
+msgid "Edit group"
+msgstr "Modifica gruppo"
 
-#: include/uimport.php:219
-#, php-format
-msgid "%d contact not imported"
-msgid_plural "%d contacts not imported"
-msgstr[0] "%d contatto non importato"
-msgstr[1] "%d contatti non importati"
+#: include/group.php:283
+msgid "Create a new group"
+msgstr "Crea un nuovo gruppo"
 
-#: include/uimport.php:289
-msgid "Done. You can now login with your username and password"
-msgstr "Fatto. Ora puoi entrare con il tuo nome utente e la tua password"
+#: include/group.php:284 mod/group.php:101 mod/group.php:198
+msgid "Group Name: "
+msgstr "Nome del gruppo:"
 
-#: include/Contact.php:395 include/Contact.php:408 include/Contact.php:453
-#: include/conversation.php:1004 include/conversation.php:1020
-#: mod/allfriends.php:68 mod/directory.php:157 mod/match.php:73
-#: mod/suggest.php:82 mod/dirfind.php:209
-msgid "View Profile"
-msgstr "Visualizza profilo"
+#: include/group.php:286
+msgid "Contacts not in any group"
+msgstr "Contatti in nessun gruppo."
 
-#: include/Contact.php:409 include/contact_widgets.php:32
-#: include/conversation.php:1017 mod/allfriends.php:69 mod/contacts.php:610
-#: mod/match.php:74 mod/suggest.php:83 mod/dirfind.php:210 mod/follow.php:106
-msgid "Connect/Follow"
-msgstr "Connetti/segui"
+#: include/group.php:288 mod/network.php:197
+msgid "add"
+msgstr "aggiungi"
 
-#: include/Contact.php:452 include/conversation.php:1003
-msgid "View Status"
-msgstr "Visualizza stato"
-
-#: include/Contact.php:454 include/conversation.php:1005
-msgid "View Photos"
-msgstr "Visualizza foto"
-
-#: include/Contact.php:455 include/conversation.php:1006
-msgid "Network Posts"
-msgstr "Post della Rete"
-
-#: include/Contact.php:456 include/conversation.php:1007
-msgid "View Contact"
-msgstr "Mostra contatto"
-
-#: include/Contact.php:457
-msgid "Drop Contact"
-msgstr "Rimuovi contatto"
-
-#: include/Contact.php:458 include/conversation.php:1008
-msgid "Send PM"
-msgstr "Invia messaggio privato"
-
-#: include/Contact.php:459 include/conversation.php:1012
-msgid "Poke"
-msgstr "Stuzzica"
-
-#: include/Contact.php:840
-msgid "Organisation"
-msgstr "Organizzazione"
-
-#: include/Contact.php:843
-msgid "News"
-msgstr "Notizie"
-
-#: include/Contact.php:846
-msgid "Forum"
+#: include/ForumManager.php:119 include/nav.php:134 include/text.php:1100
+#: view/theme/vier/theme.php:249
+msgid "Forums"
 msgstr "Forum"
 
-#: include/acl_selectors.php:353
-msgid "Post to Email"
-msgstr "Invia a email"
+#: include/ForumManager.php:121 view/theme/vier/theme.php:251
+msgid "External link to forum"
+msgstr "Link esterno al forum"
 
-#: include/acl_selectors.php:358
+#: include/ForumManager.php:124 include/contact_widgets.php:272
+#: include/items.php:2413 object/Item.php:417 view/theme/vier/theme.php:254
+#: src/App.php:523
+msgid "show more"
+msgstr "mostra di più"
+
+#: include/NotificationsManager.php:157
+msgid "System"
+msgstr "Sistema"
+
+#: include/NotificationsManager.php:164 include/nav.php:161 mod/admin.php:590
+#: view/theme/frio/theme.php:260
+msgid "Network"
+msgstr "Rete"
+
+#: include/NotificationsManager.php:171 mod/network.php:914
+#: mod/profiles.php:695
+msgid "Personal"
+msgstr "Personale"
+
+#: include/NotificationsManager.php:178 include/nav.php:108
+#: include/nav.php:164
+msgid "Home"
+msgstr "Home"
+
+#: include/NotificationsManager.php:185 include/nav.php:169
+msgid "Introductions"
+msgstr "Presentazioni"
+
+#: include/NotificationsManager.php:243 include/NotificationsManager.php:255
 #, php-format
-msgid "Connectors disabled, since \"%s\" is enabled."
-msgstr "Connettore disabilitato, dato che \"%s\" è abilitato."
+msgid "%s commented on %s's post"
+msgstr "%s ha commentato il messaggio di %s"
 
-#: include/acl_selectors.php:359 mod/settings.php:1188
-msgid "Hide your profile details from unknown viewers?"
-msgstr "Nascondi i dettagli del tuo profilo ai visitatori sconosciuti?"
-
-#: include/acl_selectors.php:365
-msgid "Visible to everybody"
-msgstr "Visibile a tutti"
-
-#: include/acl_selectors.php:366 view/theme/vier/config.php:108
-msgid "show"
-msgstr "mostra"
-
-#: include/acl_selectors.php:367 view/theme/vier/config.php:108
-msgid "don't show"
-msgstr "non mostrare"
-
-#: include/acl_selectors.php:373 mod/editpost.php:123
-msgid "CC: email addresses"
-msgstr "CC: indirizzi email"
-
-#: include/acl_selectors.php:374 mod/editpost.php:130
-msgid "Example: bob@example.com, mary@example.com"
-msgstr "Esempio: bob@example.com, mary@example.com"
-
-#: include/acl_selectors.php:376 mod/events.php:508 mod/photos.php:1196
-#: mod/photos.php:1593
-msgid "Permissions"
-msgstr "Permessi"
-
-#: include/acl_selectors.php:377
-msgid "Close"
-msgstr "Chiudi"
-
-#: include/api.php:1089
+#: include/NotificationsManager.php:254
 #, php-format
-msgid "Daily posting limit of %d posts reached. The post was rejected."
-msgstr "Limite giornaliero di %d messaggi raggiunto. Il messaggio è stato rifiutato"
+msgid "%s created a new post"
+msgstr "%s a creato un nuovo messaggio"
 
-#: include/api.php:1110
+#: include/NotificationsManager.php:269
 #, php-format
-msgid "Weekly posting limit of %d posts reached. The post was rejected."
-msgstr "Limite settimanale di %d messaggi raggiunto. Il messaggio è stato rifiutato"
+msgid "%s liked %s's post"
+msgstr "a %s è piaciuto il messaggio di %s"
 
-#: include/api.php:1131
+#: include/NotificationsManager.php:282
 #, php-format
-msgid "Monthly posting limit of %d posts reached. The post was rejected."
-msgstr "Limite mensile di %d messaggi raggiunto. Il messaggio è stato rifiutato"
+msgid "%s disliked %s's post"
+msgstr "a %s non è piaciuto il messaggio di %s"
 
-#: include/auth.php:51
+#: include/NotificationsManager.php:295
+#, php-format
+msgid "%s is attending %s's event"
+msgstr "%s partecipa all'evento di %s"
+
+#: include/NotificationsManager.php:308
+#, php-format
+msgid "%s is not attending %s's event"
+msgstr "%s non partecipa all'evento di %s"
+
+#: include/NotificationsManager.php:321
+#, php-format
+msgid "%s may attend %s's event"
+msgstr "%s potrebbe partecipare all'evento di %s"
+
+#: include/NotificationsManager.php:338
+#, php-format
+msgid "%s is now friends with %s"
+msgstr "%s è ora amico di %s"
+
+#: include/NotificationsManager.php:776
+msgid "Friend Suggestion"
+msgstr "Amico suggerito"
+
+#: include/NotificationsManager.php:805
+msgid "Friend/Connect Request"
+msgstr "Richiesta amicizia/connessione"
+
+#: include/NotificationsManager.php:805
+msgid "New Follower"
+msgstr "Qualcuno inizia a seguirti"
+
+#: include/auth.php:53
 msgid "Logged out."
 msgstr "Uscita effettuata."
 
-#: include/auth.php:122 include/auth.php:184 mod/openid.php:110
+#: include/auth.php:124 include/auth.php:186 mod/openid.php:111
 msgid "Login failed."
 msgstr "Accesso fallito."
 
-#: include/auth.php:138 include/user.php:75
+#: include/auth.php:140 include/user.php:77
 msgid ""
 "We encountered a problem while logging in with the OpenID you provided. "
 "Please check the correct spelling of the ID."
 msgstr "Abbiamo incontrato un problema mentre contattavamo il server OpenID che ci hai fornito. Controlla di averlo scritto giusto."
 
-#: include/auth.php:138 include/user.php:75
+#: include/auth.php:140 include/user.php:77
 msgid "The error message was:"
 msgstr "Il messaggio riportato era:"
 
-#: include/bb2diaspora.php:230 include/event.php:17 mod/localtime.php:12
+#: include/bb2diaspora.php:234 include/event.php:19 include/event.php:933
+#: mod/localtime.php:14
 msgid "l F d, Y \\@ g:i A"
 msgstr "l d F Y \\@ G:i"
 
-#: include/bb2diaspora.php:236 include/event.php:34 include/event.php:54
-#: include/event.php:525
+#: include/bb2diaspora.php:240 include/event.php:36 include/event.php:53
+#: include/event.php:496 include/event.php:985
 msgid "Starts:"
 msgstr "Inizia:"
 
-#: include/bb2diaspora.php:244 include/event.php:37 include/event.php:60
-#: include/event.php:526
+#: include/bb2diaspora.php:248 include/event.php:39 include/event.php:59
+#: include/event.php:497 include/event.php:989
 msgid "Finishes:"
 msgstr "Finisce:"
 
-#: include/bb2diaspora.php:253 include/event.php:41 include/event.php:67
-#: include/event.php:527 include/identity.php:336 mod/contacts.php:636
-#: mod/directory.php:139 mod/events.php:493 mod/notifications.php:244
+#: include/bb2diaspora.php:257 include/event.php:43 include/event.php:68
+#: include/event.php:498 include/event.php:1003 include/identity.php:340
+#: mod/notifications.php:247 mod/directory.php:133 mod/contacts.php:658
+#: mod/events.php:517
 msgid "Location:"
 msgstr "Posizione:"
 
-#: include/bbcode.php:380 include/bbcode.php:1132 include/bbcode.php:1133
+#: include/contact_widgets.php:12
+msgid "Add New Contact"
+msgstr "Aggiungi nuovo contatto"
+
+#: include/contact_widgets.php:13
+msgid "Enter address or web location"
+msgstr "Inserisci posizione o indirizzo web"
+
+#: include/contact_widgets.php:14
+msgid "Example: bob@example.com, http://example.com/barbara"
+msgstr "Esempio: bob@example.com, http://example.com/barbara"
+
+#: include/contact_widgets.php:16 include/identity.php:230
+#: mod/allfriends.php:88 mod/match.php:93 mod/suggest.php:101
+#: mod/dirfind.php:211
+msgid "Connect"
+msgstr "Connetti"
+
+#: include/contact_widgets.php:31
+#, php-format
+msgid "%d invitation available"
+msgid_plural "%d invitations available"
+msgstr[0] "%d invito disponibile"
+msgstr[1] "%d inviti disponibili"
+
+#: include/contact_widgets.php:37
+msgid "Find People"
+msgstr "Trova persone"
+
+#: include/contact_widgets.php:38
+msgid "Enter name or interest"
+msgstr "Inserisci un nome o un interesse"
+
+#: include/contact_widgets.php:39 include/Contact.php:411
+#: include/conversation.php:1035 mod/allfriends.php:72 mod/follow.php:143
+#: mod/match.php:78 mod/suggest.php:83 mod/contacts.php:590
+#: mod/dirfind.php:214
+msgid "Connect/Follow"
+msgstr "Connetti/segui"
+
+#: include/contact_widgets.php:40
+msgid "Examples: Robert Morgenstein, Fishing"
+msgstr "Esempi: Mario Rossi, Pesca"
+
+#: include/contact_widgets.php:41 mod/directory.php:200 mod/contacts.php:828
+msgid "Find"
+msgstr "Trova"
+
+#: include/contact_widgets.php:42 mod/suggest.php:114
+#: view/theme/vier/theme.php:196
+msgid "Friend Suggestions"
+msgstr "Contatti suggeriti"
+
+#: include/contact_widgets.php:43 view/theme/vier/theme.php:195
+msgid "Similar Interests"
+msgstr "Interessi simili"
+
+#: include/contact_widgets.php:44
+msgid "Random Profile"
+msgstr "Profilo causale"
+
+#: include/contact_widgets.php:45 view/theme/vier/theme.php:197
+msgid "Invite Friends"
+msgstr "Invita amici"
+
+#: include/contact_widgets.php:46
+msgid "View Global Directory"
+msgstr "Vedi Directory Globale"
+
+#: include/contact_widgets.php:132
+msgid "Networks"
+msgstr "Reti"
+
+#: include/contact_widgets.php:135
+msgid "All Networks"
+msgstr "Tutte le Reti"
+
+#: include/contact_widgets.php:170 include/contact_widgets.php:205
+msgid "Everything"
+msgstr "Tutto"
+
+#: include/contact_widgets.php:202
+msgid "Categories"
+msgstr "Categorie"
+
+#: include/contact_widgets.php:267
+#, php-format
+msgid "%d contact in common"
+msgid_plural "%d contacts in common"
+msgstr[0] "%d contatto in comune"
+msgstr[1] "%d contatti in comune"
+
+#: include/enotify.php:28
+msgid "Friendica Notification"
+msgstr "Notifica Friendica"
+
+#: include/enotify.php:31
+msgid "Thank You,"
+msgstr "Grazie,"
+
+#: include/enotify.php:34
+#, php-format
+msgid "%s Administrator"
+msgstr "Amministratore %s"
+
+#: include/enotify.php:36
+#, php-format
+msgid "%1$s, %2$s Administrator"
+msgstr "%1$s,  amministratore di %2$s"
+
+#: include/enotify.php:47 include/delivery.php:441
+msgid "noreply"
+msgstr "nessuna risposta"
+
+#: include/enotify.php:81
+#, php-format
+msgid "%s "
+msgstr "%s "
+
+#: include/enotify.php:94
+#, php-format
+msgid "[Friendica:Notify] New mail received at %s"
+msgstr "[Friendica:Notifica] Nuovo messaggio privato ricevuto su %s"
+
+#: include/enotify.php:96
+#, php-format
+msgid "%1$s sent you a new private message at %2$s."
+msgstr "%1$s ti ha inviato un nuovo messaggio privato su %2$s."
+
+#: include/enotify.php:97
+#, php-format
+msgid "%1$s sent you %2$s."
+msgstr "%1$s ti ha inviato %2$s"
+
+#: include/enotify.php:97
+msgid "a private message"
+msgstr "un messaggio privato"
+
+#: include/enotify.php:99
+#, php-format
+msgid "Please visit %s to view and/or reply to your private messages."
+msgstr "Visita %s per vedere e/o rispondere ai tuoi messaggi privati."
+
+#: include/enotify.php:145
+#, php-format
+msgid "%1$s commented on [url=%2$s]a %3$s[/url]"
+msgstr "%1$s ha commentato [url=%2$s]%3$s[/url]"
+
+#: include/enotify.php:152
+#, php-format
+msgid "%1$s commented on [url=%2$s]%3$s's %4$s[/url]"
+msgstr "%1$s ha commentato [url=%2$s]%4$s di %3$s[/url]"
+
+#: include/enotify.php:160
+#, php-format
+msgid "%1$s commented on [url=%2$s]your %3$s[/url]"
+msgstr "%1$s ha commentato un [url=%2$s]tuo %3$s[/url]"
+
+#: include/enotify.php:170
+#, php-format
+msgid "[Friendica:Notify] Comment to conversation #%1$d by %2$s"
+msgstr "[Friendica:Notifica] Commento di %2$s alla conversazione #%1$d"
+
+#: include/enotify.php:172
+#, php-format
+msgid "%s commented on an item/conversation you have been following."
+msgstr "%s ha commentato un elemento che stavi seguendo."
+
+#: include/enotify.php:175 include/enotify.php:189 include/enotify.php:203
+#: include/enotify.php:217 include/enotify.php:235 include/enotify.php:249
+#, php-format
+msgid "Please visit %s to view and/or reply to the conversation."
+msgstr "Visita %s per vedere e/o commentare la conversazione"
+
+#: include/enotify.php:182
+#, php-format
+msgid "[Friendica:Notify] %s posted to your profile wall"
+msgstr "[Friendica:Notifica] %s ha scritto sulla tua bacheca"
+
+#: include/enotify.php:184
+#, php-format
+msgid "%1$s posted to your profile wall at %2$s"
+msgstr "%1$s ha scritto sulla tua bacheca su %2$s"
+
+#: include/enotify.php:185
+#, php-format
+msgid "%1$s posted to [url=%2$s]your wall[/url]"
+msgstr "%1$s ha inviato un messaggio sulla [url=%2$s]tua bacheca[/url]"
+
+#: include/enotify.php:196
+#, php-format
+msgid "[Friendica:Notify] %s tagged you"
+msgstr "[Friendica:Notifica] %s ti ha taggato"
+
+#: include/enotify.php:198
+#, php-format
+msgid "%1$s tagged you at %2$s"
+msgstr "%1$s ti ha taggato su %2$s"
+
+#: include/enotify.php:199
+#, php-format
+msgid "%1$s [url=%2$s]tagged you[/url]."
+msgstr "%1$s [url=%2$s]ti ha taggato[/url]."
+
+#: include/enotify.php:210
+#, php-format
+msgid "[Friendica:Notify] %s shared a new post"
+msgstr "[Friendica:Notifica] %s ha condiviso un nuovo messaggio"
+
+#: include/enotify.php:212
+#, php-format
+msgid "%1$s shared a new post at %2$s"
+msgstr "%1$s ha condiviso un nuovo messaggio su %2$s"
+
+#: include/enotify.php:213
+#, php-format
+msgid "%1$s [url=%2$s]shared a post[/url]."
+msgstr "%1$s [url=%2$s]ha condiviso un messaggio[/url]."
+
+#: include/enotify.php:224
+#, php-format
+msgid "[Friendica:Notify] %1$s poked you"
+msgstr "[Friendica:Notifica] %1$s ti ha stuzzicato"
+
+#: include/enotify.php:226
+#, php-format
+msgid "%1$s poked you at %2$s"
+msgstr "%1$s ti ha stuzzicato su %2$s"
+
+#: include/enotify.php:227
+#, php-format
+msgid "%1$s [url=%2$s]poked you[/url]."
+msgstr "%1$s [url=%2$s]ti ha stuzzicato[/url]."
+
+#: include/enotify.php:242
+#, php-format
+msgid "[Friendica:Notify] %s tagged your post"
+msgstr "[Friendica:Notifica] %s ha taggato un tuo messaggio"
+
+#: include/enotify.php:244
+#, php-format
+msgid "%1$s tagged your post at %2$s"
+msgstr "%1$s ha taggato il tuo post su %2$s"
+
+#: include/enotify.php:245
+#, php-format
+msgid "%1$s tagged [url=%2$s]your post[/url]"
+msgstr "%1$s ha taggato [url=%2$s]il tuo post[/url]"
+
+#: include/enotify.php:256
+msgid "[Friendica:Notify] Introduction received"
+msgstr "[Friendica:Notifica] Hai ricevuto una presentazione"
+
+#: include/enotify.php:258
+#, php-format
+msgid "You've received an introduction from '%1$s' at %2$s"
+msgstr "Hai ricevuto un'introduzione da '%1$s' su %2$s"
+
+#: include/enotify.php:259
+#, php-format
+msgid "You've received [url=%1$s]an introduction[/url] from %2$s."
+msgstr "Hai ricevuto [url=%1$s]un'introduzione[/url] da %2$s."
+
+#: include/enotify.php:263 include/enotify.php:306
+#, php-format
+msgid "You may visit their profile at %s"
+msgstr "Puoi visitare il suo profilo presso %s"
+
+#: include/enotify.php:265
+#, php-format
+msgid "Please visit %s to approve or reject the introduction."
+msgstr "Visita %s per approvare o rifiutare la presentazione."
+
+#: include/enotify.php:273
+msgid "[Friendica:Notify] A new person is sharing with you"
+msgstr "[Friendica:Notifica] Una nuova persona sta condividendo con te"
+
+#: include/enotify.php:275 include/enotify.php:276
+#, php-format
+msgid "%1$s is sharing with you at %2$s"
+msgstr "%1$s sta condividendo con te su %2$s"
+
+#: include/enotify.php:282
+msgid "[Friendica:Notify] You have a new follower"
+msgstr "[Friendica:Notifica] Una nuova persona ti segue"
+
+#: include/enotify.php:284 include/enotify.php:285
+#, php-format
+msgid "You have a new follower at %2$s : %1$s"
+msgstr "Un nuovo utente ha iniziato a seguirti su %2$s : %1$s"
+
+#: include/enotify.php:296
+msgid "[Friendica:Notify] Friend suggestion received"
+msgstr "[Friendica:Notifica] Hai ricevuto un suggerimento di amicizia"
+
+#: include/enotify.php:298
+#, php-format
+msgid "You've received a friend suggestion from '%1$s' at %2$s"
+msgstr "Hai ricevuto un suggerimento di amicizia da '%1$s' su %2$s"
+
+#: include/enotify.php:299
+#, php-format
+msgid ""
+"You've received [url=%1$s]a friend suggestion[/url] for %2$s from %3$s."
+msgstr "Hai ricevuto [url=%1$s]un suggerimento di amicizia[/url] per %2$s su %3$s"
+
+#: include/enotify.php:304
+msgid "Name:"
+msgstr "Nome:"
+
+#: include/enotify.php:305
+msgid "Photo:"
+msgstr "Foto:"
+
+#: include/enotify.php:308
+#, php-format
+msgid "Please visit %s to approve or reject the suggestion."
+msgstr "Visita %s per approvare o rifiutare il suggerimento."
+
+#: include/enotify.php:316 include/enotify.php:330
+msgid "[Friendica:Notify] Connection accepted"
+msgstr "[Friendica:Notifica] Connessione accettata"
+
+#: include/enotify.php:318 include/enotify.php:332
+#, php-format
+msgid "'%1$s' has accepted your connection request at %2$s"
+msgstr "'%1$s' ha accettato la tua richiesta di connessione su %2$s"
+
+#: include/enotify.php:319 include/enotify.php:333
+#, php-format
+msgid "%2$s has accepted your [url=%1$s]connection request[/url]."
+msgstr "%2$s ha accettato la tua [url=%1$s]richiesta di connessione[/url]"
+
+#: include/enotify.php:323
+msgid ""
+"You are now mutual friends and may exchange status updates, photos, and "
+"email without restriction."
+msgstr "Ora siete amici reciproci e potete scambiarvi aggiornamenti di stato, foto e messaggi privati senza restrizioni."
+
+#: include/enotify.php:325
+#, php-format
+msgid "Please visit %s if you wish to make any changes to this relationship."
+msgstr "Visita %s se vuoi modificare questa relazione."
+
+#: include/enotify.php:337
+#, php-format
+msgid ""
+"'%1$s' has chosen to accept you a \"fan\", which restricts some forms of "
+"communication - such as private messaging and some profile interactions. If "
+"this is a celebrity or community page, these settings were applied "
+"automatically."
+msgstr "'%1$s' ha scelto di accettarti come \"fan\", il che limita alcune forme di comunicazione, come i messaggi privati, e alcune possibilità di interazione col profilo. Se è una pagina di una comunità o di una celebrità, queste impostazioni sono state applicate automaticamente."
+
+#: include/enotify.php:339
+#, php-format
+msgid ""
+"'%1$s' may choose to extend this into a two-way or more permissive "
+"relationship in the future."
+msgstr "'%1$s' può scegliere di estendere questa relazione in una relazione più permissiva in futuro."
+
+#: include/enotify.php:341
+#, php-format
+msgid "Please visit %s  if you wish to make any changes to this relationship."
+msgstr "Visita %s se desideri modificare questo collegamento."
+
+#: include/enotify.php:351
+msgid "[Friendica System:Notify] registration request"
+msgstr "[Friendica System:Notifica] richiesta di registrazione"
+
+#: include/enotify.php:353
+#, php-format
+msgid "You've received a registration request from '%1$s' at %2$s"
+msgstr "Hai ricevuto una richiesta di registrazione da '%1$s' su %2$s"
+
+#: include/enotify.php:354
+#, php-format
+msgid "You've received a [url=%1$s]registration request[/url] from %2$s."
+msgstr "Hai ricevuto una [url=%1$s]richiesta di registrazione[/url] da %2$s."
+
+#: include/enotify.php:358
+#, php-format
+msgid "Full Name:\t%1$s\\nSite Location:\t%2$s\\nLogin Name:\t%3$s (%4$s)"
+msgstr "Nome completo: %1$s\nIndirizzo del sito: %2$s\nNome utente: %3$s (%4$s)"
+
+#: include/enotify.php:361
+#, php-format
+msgid "Please visit %s to approve or reject the request."
+msgstr "Visita %s per approvare o rifiutare la richiesta."
+
+#: include/oembed.php:254
+msgid "Embedded content"
+msgstr "Contenuto incorporato"
+
+#: include/oembed.php:262
+msgid "Embedding disabled"
+msgstr "Embed disabilitato"
+
+#: include/security.php:64
+msgid "Welcome "
+msgstr "Ciao"
+
+#: include/security.php:65
+msgid "Please upload a profile photo."
+msgstr "Carica una foto per il profilo."
+
+#: include/security.php:67
+msgid "Welcome back "
+msgstr "Ciao "
+
+#: include/security.php:424
+msgid ""
+"The form security token was not correct. This probably happened because the "
+"form has been opened for too long (>3 hours) before submitting it."
+msgstr "Il token di sicurezza della form non era corretto. Probabilmente la form è rimasta aperta troppo a lungo (più di tre ore) prima di inviarla."
+
+#: include/photos.php:57 include/photos.php:66 mod/fbrowser.php:43
+#: mod/fbrowser.php:65 mod/photos.php:191 mod/photos.php:1109
+#: mod/photos.php:1233 mod/photos.php:1254 mod/photos.php:1816
+#: mod/photos.php:1830
+msgid "Contact Photos"
+msgstr "Foto dei contatti"
+
+#: include/nav.php:38 mod/navigation.php:22
+msgid "Nothing new here"
+msgstr "Niente di nuovo qui"
+
+#: include/nav.php:42 mod/navigation.php:26
+msgid "Clear notifications"
+msgstr "Pulisci le notifiche"
+
+#: include/nav.php:43 include/text.php:1090
+msgid "@name, !forum, #tags, content"
+msgstr "@nome, !forum, #tag, contenuto"
+
+#: include/nav.php:81 view/theme/frio/theme.php:250 boot.php:874
+msgid "Logout"
+msgstr "Esci"
+
+#: include/nav.php:81 view/theme/frio/theme.php:250
+msgid "End this session"
+msgstr "Finisci questa sessione"
+
+#: include/nav.php:84 include/identity.php:785 mod/contacts.php:667
+#: mod/contacts.php:863 view/theme/frio/theme.php:253
+msgid "Status"
+msgstr "Stato"
+
+#: include/nav.php:84 include/nav.php:164 view/theme/frio/theme.php:253
+msgid "Your posts and conversations"
+msgstr "I tuoi messaggi e le tue conversazioni"
+
+#: include/nav.php:85 include/identity.php:631 include/identity.php:760
+#: include/identity.php:793 mod/newmember.php:20 mod/profperm.php:107
+#: mod/contacts.php:669 mod/contacts.php:871 view/theme/frio/theme.php:254
+msgid "Profile"
+msgstr "Profilo"
+
+#: include/nav.php:85 view/theme/frio/theme.php:254
+msgid "Your profile page"
+msgstr "Pagina del tuo profilo"
+
+#: include/nav.php:86 include/identity.php:801 mod/fbrowser.php:34
+#: view/theme/frio/theme.php:255
+msgid "Photos"
+msgstr "Foto"
+
+#: include/nav.php:86 view/theme/frio/theme.php:255
+msgid "Your photos"
+msgstr "Le tue foto"
+
+#: include/nav.php:87 include/identity.php:809 include/identity.php:812
+#: view/theme/frio/theme.php:256
+msgid "Videos"
+msgstr "Video"
+
+#: include/nav.php:87 view/theme/frio/theme.php:256
+msgid "Your videos"
+msgstr "I tuoi video"
+
+#: include/nav.php:88 include/nav.php:152 include/identity.php:821
+#: include/identity.php:832 mod/cal.php:273 mod/events.php:383
+#: view/theme/frio/theme.php:257 view/theme/frio/theme.php:261
+msgid "Events"
+msgstr "Eventi"
+
+#: include/nav.php:88 view/theme/frio/theme.php:257
+msgid "Your events"
+msgstr "I tuoi eventi"
+
+#: include/nav.php:89
+msgid "Personal notes"
+msgstr "Note personali"
+
+#: include/nav.php:89
+msgid "Your personal notes"
+msgstr "Le tue note personali"
+
+#: include/nav.php:98 mod/bookmarklet.php:15 boot.php:875
+msgid "Login"
+msgstr "Accedi"
+
+#: include/nav.php:98
+msgid "Sign in"
+msgstr "Entra"
+
+#: include/nav.php:108
+msgid "Home Page"
+msgstr "Home Page"
+
+#: include/nav.php:112 mod/register.php:294 boot.php:851
+msgid "Register"
+msgstr "Registrati"
+
+#: include/nav.php:112
+msgid "Create an account"
+msgstr "Crea un account"
+
+#: include/nav.php:118 mod/help.php:51 view/theme/vier/theme.php:292
+msgid "Help"
+msgstr "Guida"
+
+#: include/nav.php:118
+msgid "Help and documentation"
+msgstr "Guida e documentazione"
+
+#: include/nav.php:122
+msgid "Apps"
+msgstr "Applicazioni"
+
+#: include/nav.php:122
+msgid "Addon applications, utilities, games"
+msgstr "Applicazioni, utilità e giochi aggiuntivi"
+
+#: include/nav.php:126 include/text.php:1087 mod/search.php:145
+msgid "Search"
+msgstr "Cerca"
+
+#: include/nav.php:126
+msgid "Search site content"
+msgstr "Cerca nel contenuto del sito"
+
+#: include/nav.php:129 include/text.php:1095
+msgid "Full Text"
+msgstr "Testo Completo"
+
+#: include/nav.php:130 include/text.php:1096
+msgid "Tags"
+msgstr "Tags:"
+
+#: include/nav.php:131 include/nav.php:195 include/identity.php:854
+#: include/identity.php:857 include/text.php:1097 mod/viewcontacts.php:124
+#: mod/contacts.php:822 mod/contacts.php:883 view/theme/frio/theme.php:264
+msgid "Contacts"
+msgstr "Contatti"
+
+#: include/nav.php:146 include/nav.php:148 mod/community.php:31
+msgid "Community"
+msgstr "Comunità"
+
+#: include/nav.php:146
+msgid "Conversations on this site"
+msgstr "Conversazioni su questo sito"
+
+#: include/nav.php:148
+msgid "Conversations on the network"
+msgstr "Conversazioni nella rete"
+
+#: include/nav.php:152 include/identity.php:824 include/identity.php:835
+#: view/theme/frio/theme.php:261
+msgid "Events and Calendar"
+msgstr "Eventi e calendario"
+
+#: include/nav.php:155
+msgid "Directory"
+msgstr "Elenco"
+
+#: include/nav.php:155
+msgid "People directory"
+msgstr "Elenco delle persone"
+
+#: include/nav.php:157
+msgid "Information"
+msgstr "Informazioni"
+
+#: include/nav.php:157
+msgid "Information about this friendica instance"
+msgstr "Informazioni su questo server friendica"
+
+#: include/nav.php:161 view/theme/frio/theme.php:260
+msgid "Conversations from your friends"
+msgstr "Conversazioni dai tuoi amici"
+
+#: include/nav.php:162
+msgid "Network Reset"
+msgstr "Reset pagina Rete"
+
+#: include/nav.php:162
+msgid "Load Network page with no filters"
+msgstr "Carica la pagina Rete senza nessun filtro"
+
+#: include/nav.php:169
+msgid "Friend Requests"
+msgstr "Richieste di amicizia"
+
+#: include/nav.php:172 mod/notifications.php:99
+msgid "Notifications"
+msgstr "Notifiche"
+
+#: include/nav.php:173
+msgid "See all notifications"
+msgstr "Vedi tutte le notifiche"
+
+#: include/nav.php:174 mod/settings.php:911
+msgid "Mark as seen"
+msgstr "Segna come letto"
+
+#: include/nav.php:174
+msgid "Mark all system notifications seen"
+msgstr "Segna tutte le notifiche come viste"
+
+#: include/nav.php:178 mod/message.php:180 view/theme/frio/theme.php:262
+msgid "Messages"
+msgstr "Messaggi"
+
+#: include/nav.php:178 view/theme/frio/theme.php:262
+msgid "Private mail"
+msgstr "Posta privata"
+
+#: include/nav.php:179
+msgid "Inbox"
+msgstr "In arrivo"
+
+#: include/nav.php:180
+msgid "Outbox"
+msgstr "Inviati"
+
+#: include/nav.php:181 mod/message.php:19
+msgid "New Message"
+msgstr "Nuovo messaggio"
+
+#: include/nav.php:184
+msgid "Manage"
+msgstr "Gestisci"
+
+#: include/nav.php:184
+msgid "Manage other pages"
+msgstr "Gestisci altre pagine"
+
+#: include/nav.php:187 mod/settings.php:81
+msgid "Delegations"
+msgstr "Delegazioni"
+
+#: include/nav.php:187 mod/delegate.php:130
+msgid "Delegate Page Management"
+msgstr "Gestione delegati per la pagina"
+
+#: include/nav.php:189 mod/newmember.php:15 mod/admin.php:1740
+#: mod/admin.php:2016 mod/settings.php:111 view/theme/frio/theme.php:263
+msgid "Settings"
+msgstr "Impostazioni"
+
+#: include/nav.php:189 view/theme/frio/theme.php:263
+msgid "Account settings"
+msgstr "Parametri account"
+
+#: include/nav.php:192 include/identity.php:294
+msgid "Profiles"
+msgstr "Profili"
+
+#: include/nav.php:192
+msgid "Manage/Edit Profiles"
+msgstr "Gestisci/Modifica i profili"
+
+#: include/nav.php:195 view/theme/frio/theme.php:264
+msgid "Manage/edit friends and contacts"
+msgstr "Gestisci/modifica amici e contatti"
+
+#: include/nav.php:200 mod/admin.php:204
+msgid "Admin"
+msgstr "Amministrazione"
+
+#: include/nav.php:200
+msgid "Site setup and configuration"
+msgstr "Configurazione del sito"
+
+#: include/nav.php:203
+msgid "Navigation"
+msgstr "Navigazione"
+
+#: include/nav.php:203
+msgid "Site map"
+msgstr "Mappa del sito"
+
+#: include/Contact.php:397 include/Contact.php:410 include/Contact.php:455
+#: include/conversation.php:1022 include/conversation.php:1038
+#: mod/allfriends.php:71 mod/match.php:77 mod/suggest.php:82
+#: mod/directory.php:151 mod/dirfind.php:213
+msgid "View Profile"
+msgstr "Visualizza profilo"
+
+#: include/Contact.php:454 include/conversation.php:1021
+msgid "View Status"
+msgstr "Visualizza stato"
+
+#: include/Contact.php:456 include/conversation.php:1023
+msgid "View Photos"
+msgstr "Visualizza foto"
+
+#: include/Contact.php:457 include/conversation.php:1024
+msgid "Network Posts"
+msgstr "Post della Rete"
+
+#: include/Contact.php:458 include/conversation.php:1025
+msgid "View Contact"
+msgstr "Mostra contatto"
+
+#: include/Contact.php:459
+msgid "Drop Contact"
+msgstr "Rimuovi contatto"
+
+#: include/Contact.php:460 include/conversation.php:1026
+msgid "Send PM"
+msgstr "Invia messaggio privato"
+
+#: include/Contact.php:461 include/conversation.php:1030
+msgid "Poke"
+msgstr "Stuzzica"
+
+#: include/Contact.php:884
+msgid "Organisation"
+msgstr "Organizzazione"
+
+#: include/Contact.php:887
+msgid "News"
+msgstr "Notizie"
+
+#: include/Contact.php:890
+msgid "Forum"
+msgstr "Forum"
+
+#: include/Photo.php:995 include/Photo.php:1011 include/Photo.php:1019
+#: include/Photo.php:1044 include/message.php:139 mod/item.php:470
+#: mod/wall_upload.php:227
+msgid "Wall Photos"
+msgstr "Foto della bacheca"
+
+#: include/acl_selectors.php:355
+msgid "Post to Email"
+msgstr "Invia a email"
+
+#: include/acl_selectors.php:360
+#, php-format
+msgid "Connectors disabled, since \"%s\" is enabled."
+msgstr "Connettore disabilitato, dato che \"%s\" è abilitato."
+
+#: include/acl_selectors.php:361 mod/settings.php:1175
+msgid "Hide your profile details from unknown viewers?"
+msgstr "Nascondi i dettagli del tuo profilo ai visitatori sconosciuti?"
+
+#: include/acl_selectors.php:367
+msgid "Visible to everybody"
+msgstr "Visibile a tutti"
+
+#: include/acl_selectors.php:368 view/theme/vier/config.php:110
+msgid "show"
+msgstr "mostra"
+
+#: include/acl_selectors.php:369 view/theme/vier/config.php:110
+msgid "don't show"
+msgstr "non mostrare"
+
+#: include/acl_selectors.php:375 mod/editpost.php:126
+msgid "CC: email addresses"
+msgstr "CC: indirizzi email"
+
+#: include/acl_selectors.php:376 mod/editpost.php:133
+msgid "Example: bob@example.com, mary@example.com"
+msgstr "Esempio: bob@example.com, mary@example.com"
+
+#: include/acl_selectors.php:378 mod/events.php:532 mod/photos.php:1173
+#: mod/photos.php:1570
+msgid "Permissions"
+msgstr "Permessi"
+
+#: include/acl_selectors.php:379
+msgid "Close"
+msgstr "Chiudi"
+
+#: include/api.php:1104
+#, php-format
+msgid "Daily posting limit of %d posts reached. The post was rejected."
+msgstr "Limite giornaliero di %d messaggi raggiunto. Il messaggio è stato rifiutato"
+
+#: include/api.php:1125
+#, php-format
+msgid "Weekly posting limit of %d posts reached. The post was rejected."
+msgstr "Limite settimanale di %d messaggi raggiunto. Il messaggio è stato rifiutato"
+
+#: include/api.php:1146
+#, php-format
+msgid "Monthly posting limit of %d posts reached. The post was rejected."
+msgstr "Limite mensile di %d messaggi raggiunto. Il messaggio è stato rifiutato"
+
+#: include/api.php:3718 include/user.php:302 include/user.php:310
+#: include/user.php:318 mod/photos.php:75 mod/photos.php:191
+#: mod/photos.php:778 mod/photos.php:1233 mod/photos.php:1254
+#: mod/photos.php:1840 mod/profile_photo.php:76 mod/profile_photo.php:84
+#: mod/profile_photo.php:92 mod/profile_photo.php:216
+#: mod/profile_photo.php:311 mod/profile_photo.php:321
+msgid "Profile Photos"
+msgstr "Foto del profilo"
+
+#: include/bbcode.php:429 include/bbcode.php:1192 include/bbcode.php:1193
 msgid "Image/photo"
 msgstr "Immagine/foto"
 
-#: include/bbcode.php:497
+#: include/bbcode.php:545
 #, php-format
 msgid "%2$s %3$s"
 msgstr "%2$s %3$s"
 
-#: include/bbcode.php:1089 include/bbcode.php:1111
+#: include/bbcode.php:1149 include/bbcode.php:1171
 msgid "$1 wrote:"
 msgstr "$1 ha scritto:"
 
-#: include/bbcode.php:1141 include/bbcode.php:1142
+#: include/bbcode.php:1201 include/bbcode.php:1202
 msgid "Encrypted content"
 msgstr "Contenuto criptato"
 
-#: include/bbcode.php:1257
+#: include/bbcode.php:1321
 msgid "Invalid source protocol"
 msgstr "Protocollo sorgente non valido"
 
-#: include/bbcode.php:1267
+#: include/bbcode.php:1332
 msgid "Invalid link protocol"
 msgstr "Protocollo link non valido"
 
@@ -944,19 +1595,19 @@ msgstr "E' ok, probabilmente innocuo"
 msgid "Reputable, has my trust"
 msgstr "Rispettabile, ha la mia fiducia"
 
-#: include/contact_selectors.php:56 mod/admin.php:980
+#: include/contact_selectors.php:56 mod/admin.php:1095
 msgid "Frequently"
 msgstr "Frequentemente"
 
-#: include/contact_selectors.php:57 mod/admin.php:981
+#: include/contact_selectors.php:57 mod/admin.php:1096
 msgid "Hourly"
 msgstr "Ogni ora"
 
-#: include/contact_selectors.php:58 mod/admin.php:982
+#: include/contact_selectors.php:58 mod/admin.php:1097
 msgid "Twice daily"
 msgstr "Due volte al dì"
 
-#: include/contact_selectors.php:59 mod/admin.php:983
+#: include/contact_selectors.php:59 mod/admin.php:1098
 msgid "Daily"
 msgstr "Giornalmente"
 
@@ -968,7 +1619,7 @@ msgstr "Settimanalmente"
 msgid "Monthly"
 msgstr "Mensilmente"
 
-#: include/contact_selectors.php:76 mod/dfrn_request.php:886
+#: include/contact_selectors.php:76 mod/dfrn_request.php:887
 msgid "Friendica"
 msgstr "Friendica"
 
@@ -981,12 +1632,12 @@ msgid "RSS/Atom"
 msgstr "RSS / Atom"
 
 #: include/contact_selectors.php:79 include/contact_selectors.php:86
-#: mod/admin.php:1490 mod/admin.php:1503 mod/admin.php:1516 mod/admin.php:1534
+#: mod/admin.php:1612 mod/admin.php:1625 mod/admin.php:1638 mod/admin.php:1656
 msgid "Email"
 msgstr "Email"
 
-#: include/contact_selectors.php:80 mod/dfrn_request.php:888
-#: mod/settings.php:848
+#: include/contact_selectors.php:80 mod/dfrn_request.php:889
+#: mod/settings.php:858
 msgid "Diaspora"
 msgstr "Diaspora"
 
@@ -1038,1678 +1689,1390 @@ msgstr "pnut"
 msgid "App.net"
 msgstr "App.net"
 
-#: include/contact_widgets.php:6
-msgid "Add New Contact"
-msgstr "Aggiungi nuovo contatto"
+#: include/conversation.php:135 include/conversation.php:287
+#: include/like.php:185 include/text.php:1894
+msgid "event"
+msgstr "l'evento"
 
-#: include/contact_widgets.php:7
-msgid "Enter address or web location"
-msgstr "Inserisci posizione o indirizzo web"
+#: include/conversation.php:138 include/conversation.php:148
+#: include/conversation.php:290 include/conversation.php:299
+#: include/diaspora.php:1787 include/like.php:183 mod/subthread.php:90
+#: mod/tagger.php:65
+msgid "status"
+msgstr "stato"
 
-#: include/contact_widgets.php:8
-msgid "Example: bob@example.com, http://example.com/barbara"
-msgstr "Esempio: bob@example.com, http://example.com/barbara"
+#: include/conversation.php:143 include/conversation.php:295
+#: include/like.php:183 include/text.php:1896 mod/subthread.php:90
+#: mod/tagger.php:65
+msgid "photo"
+msgstr "foto"
 
-#: include/contact_widgets.php:10 include/identity.php:224
-#: mod/allfriends.php:85 mod/match.php:89 mod/suggest.php:101
-#: mod/dirfind.php:207
-msgid "Connect"
-msgstr "Connetti"
-
-#: include/contact_widgets.php:24
+#: include/conversation.php:155 include/diaspora.php:1783 include/like.php:32
 #, php-format
-msgid "%d invitation available"
-msgid_plural "%d invitations available"
-msgstr[0] "%d invito disponibile"
-msgstr[1] "%d inviti disponibili"
+msgid "%1$s likes %2$s's %3$s"
+msgstr "A %1$s piace %3$s di %2$s"
 
-#: include/contact_widgets.php:30
-msgid "Find People"
-msgstr "Trova persone"
-
-#: include/contact_widgets.php:31
-msgid "Enter name or interest"
-msgstr "Inserisci un nome o un interesse"
-
-#: include/contact_widgets.php:33
-msgid "Examples: Robert Morgenstein, Fishing"
-msgstr "Esempi: Mario Rossi, Pesca"
-
-#: include/contact_widgets.php:34 mod/contacts.php:806 mod/directory.php:206
-msgid "Find"
-msgstr "Trova"
-
-#: include/contact_widgets.php:35 mod/suggest.php:114
-#: view/theme/vier/theme.php:201
-msgid "Friend Suggestions"
-msgstr "Contatti suggeriti"
-
-#: include/contact_widgets.php:36 view/theme/vier/theme.php:200
-msgid "Similar Interests"
-msgstr "Interessi simili"
-
-#: include/contact_widgets.php:37
-msgid "Random Profile"
-msgstr "Profilo causale"
-
-#: include/contact_widgets.php:38 view/theme/vier/theme.php:202
-msgid "Invite Friends"
-msgstr "Invita amici"
-
-#: include/contact_widgets.php:125
-msgid "Networks"
-msgstr "Reti"
-
-#: include/contact_widgets.php:128
-msgid "All Networks"
-msgstr "Tutte le Reti"
-
-#: include/contact_widgets.php:160 include/features.php:104
-msgid "Saved Folders"
-msgstr "Cartelle Salvate"
-
-#: include/contact_widgets.php:163 include/contact_widgets.php:198
-msgid "Everything"
-msgstr "Tutto"
-
-#: include/contact_widgets.php:195
-msgid "Categories"
-msgstr "Categorie"
-
-#: include/contact_widgets.php:264
+#: include/conversation.php:158 include/like.php:36 include/like.php:41
 #, php-format
-msgid "%d contact in common"
-msgid_plural "%d contacts in common"
-msgstr[0] "%d contatto in comune"
-msgstr[1] "%d contatti in comune"
+msgid "%1$s doesn't like %2$s's %3$s"
+msgstr "A %1$s non piace %3$s di %2$s"
 
-#: include/conversation.php:159
+#: include/conversation.php:161
 #, php-format
 msgid "%1$s attends %2$s's %3$s"
 msgstr "%1$s partecipa a %3$s di %2$s"
 
-#: include/conversation.php:162
+#: include/conversation.php:164
 #, php-format
 msgid "%1$s doesn't attend %2$s's %3$s"
 msgstr "%1$s non partecipa a %3$s di %2$s"
 
-#: include/conversation.php:165
+#: include/conversation.php:167
 #, php-format
 msgid "%1$s attends maybe %2$s's %3$s"
 msgstr "%1$s forse partecipa a %3$s di %2$s"
 
-#: include/conversation.php:198 mod/dfrn_confirm.php:478
+#: include/conversation.php:200 mod/dfrn_confirm.php:481
 #, php-format
 msgid "%1$s is now friends with %2$s"
 msgstr "%1$s e %2$s adesso sono amici"
 
-#: include/conversation.php:239
+#: include/conversation.php:241
 #, php-format
 msgid "%1$s poked %2$s"
 msgstr "%1$s ha stuzzicato %2$s"
 
-#: include/conversation.php:260 mod/mood.php:63
+#: include/conversation.php:262 mod/mood.php:66
 #, php-format
 msgid "%1$s is currently %2$s"
 msgstr "%1$s al momento è %2$s"
 
-#: include/conversation.php:307 mod/tagger.php:95
+#: include/conversation.php:309 mod/tagger.php:98
 #, php-format
 msgid "%1$s tagged %2$s's %3$s with %4$s"
 msgstr "%1$s ha taggato %3$s di %2$s con %4$s"
 
-#: include/conversation.php:334
+#: include/conversation.php:336
 msgid "post/item"
 msgstr "post/elemento"
 
-#: include/conversation.php:335
+#: include/conversation.php:337
 #, php-format
 msgid "%1$s marked %2$s's %3$s as favorite"
 msgstr "%1$s ha segnato il/la %3$s di %2$s come preferito"
 
-#: include/conversation.php:614 mod/content.php:372 mod/photos.php:1662
-#: mod/profiles.php:340
+#: include/conversation.php:623 mod/photos.php:1639 mod/profiles.php:340
 msgid "Likes"
 msgstr "Mi piace"
 
-#: include/conversation.php:614 mod/content.php:372 mod/photos.php:1662
-#: mod/profiles.php:344
+#: include/conversation.php:623 mod/photos.php:1639 mod/profiles.php:344
 msgid "Dislikes"
 msgstr "Non mi piace"
 
-#: include/conversation.php:615 include/conversation.php:1541
-#: mod/content.php:373 mod/photos.php:1663
+#: include/conversation.php:624 include/conversation.php:1559
+#: mod/photos.php:1640
 msgid "Attending"
 msgid_plural "Attending"
 msgstr[0] "Partecipa"
 msgstr[1] "Partecipano"
 
-#: include/conversation.php:615 mod/content.php:373 mod/photos.php:1663
+#: include/conversation.php:624 mod/photos.php:1640
 msgid "Not attending"
 msgstr "Non partecipa"
 
-#: include/conversation.php:615 mod/content.php:373 mod/photos.php:1663
+#: include/conversation.php:624 mod/photos.php:1640
 msgid "Might attend"
 msgstr "Forse partecipa"
 
-#: include/conversation.php:747 mod/content.php:453 mod/content.php:759
-#: mod/photos.php:1728 object/Item.php:137
+#: include/conversation.php:761 mod/photos.php:1705 object/Item.php:147
 msgid "Select"
 msgstr "Seleziona"
 
-#: include/conversation.php:748 mod/contacts.php:816 mod/contacts.php:1015
-#: mod/content.php:454 mod/content.php:760 mod/photos.php:1729
-#: mod/settings.php:744 mod/admin.php:1508 object/Item.php:138
+#: include/conversation.php:762 mod/admin.php:1630 mod/contacts.php:838
+#: mod/contacts.php:1037 mod/photos.php:1706 mod/settings.php:754
+#: object/Item.php:148
 msgid "Delete"
 msgstr "Rimuovi"
 
-#: include/conversation.php:791 mod/content.php:487 mod/content.php:915
-#: mod/content.php:916 object/Item.php:356 object/Item.php:357
+#: include/conversation.php:806 object/Item.php:350 object/Item.php:351
 #, php-format
 msgid "View %s's profile @ %s"
 msgstr "Vedi il profilo di %s @ %s"
 
-#: include/conversation.php:803 object/Item.php:344
+#: include/conversation.php:818 object/Item.php:338
 msgid "Categories:"
 msgstr "Categorie:"
 
-#: include/conversation.php:804 object/Item.php:345
+#: include/conversation.php:819 object/Item.php:339
 msgid "Filed under:"
 msgstr "Archiviato in:"
 
-#: include/conversation.php:811 mod/content.php:497 mod/content.php:928
-#: object/Item.php:370
+#: include/conversation.php:826 object/Item.php:364
 #, php-format
 msgid "%s from %s"
 msgstr "%s da %s"
 
-#: include/conversation.php:827 mod/content.php:513
+#: include/conversation.php:842
 msgid "View in context"
 msgstr "Vedi nel contesto"
 
-#: include/conversation.php:829 include/conversation.php:1298
-#: mod/content.php:515 mod/content.php:953 mod/editpost.php:114
-#: mod/wallmessage.php:140 mod/message.php:337 mod/message.php:522
-#: mod/photos.php:1627 object/Item.php:395
+#: include/conversation.php:844 include/conversation.php:1316
+#: mod/editpost.php:117 mod/message.php:337 mod/message.php:522
+#: mod/wallmessage.php:143 mod/photos.php:1604 object/Item.php:389
 msgid "Please wait"
 msgstr "Attendi"
 
-#: include/conversation.php:906
+#: include/conversation.php:921
 msgid "remove"
 msgstr "rimuovi"
 
-#: include/conversation.php:910
+#: include/conversation.php:925
 msgid "Delete Selected Items"
 msgstr "Cancella elementi selezionati"
 
-#: include/conversation.php:1002
+#: include/conversation.php:1020 view/theme/frio/theme.php:347
 msgid "Follow Thread"
 msgstr "Segui la discussione"
 
-#: include/conversation.php:1139
+#: include/conversation.php:1157
 #, php-format
 msgid "%s likes this."
 msgstr "Piace a %s."
 
-#: include/conversation.php:1142
+#: include/conversation.php:1160
 #, php-format
 msgid "%s doesn't like this."
 msgstr "Non piace a %s."
 
-#: include/conversation.php:1145
+#: include/conversation.php:1163
 #, php-format
 msgid "%s attends."
 msgstr "%s partecipa."
 
-#: include/conversation.php:1148
+#: include/conversation.php:1166
 #, php-format
 msgid "%s doesn't attend."
 msgstr "%s non partecipa."
 
-#: include/conversation.php:1151
+#: include/conversation.php:1169
 #, php-format
 msgid "%s attends maybe."
 msgstr "%s forse partecipa."
 
-#: include/conversation.php:1162
+#: include/conversation.php:1180
 msgid "and"
 msgstr "e"
 
-#: include/conversation.php:1168
+#: include/conversation.php:1186
 #, php-format
 msgid ", and %d other people"
 msgstr "e altre %d persone"
 
-#: include/conversation.php:1177
+#: include/conversation.php:1195
 #, php-format
 msgid "%2$d people like this"
 msgstr "Piace a %2$d persone."
 
-#: include/conversation.php:1178
+#: include/conversation.php:1196
 #, php-format
 msgid "%s like this."
 msgstr "a %s piace."
 
-#: include/conversation.php:1181
+#: include/conversation.php:1199
 #, php-format
 msgid "%2$d people don't like this"
 msgstr "Non piace a %2$d persone."
 
-#: include/conversation.php:1182
+#: include/conversation.php:1200
 #, php-format
 msgid "%s don't like this."
 msgstr "a %s non piace."
 
-#: include/conversation.php:1185
+#: include/conversation.php:1203
 #, php-format
 msgid "%2$d people attend"
 msgstr "%2$d persone partecipano"
 
-#: include/conversation.php:1186
+#: include/conversation.php:1204
 #, php-format
 msgid "%s attend."
 msgstr "%s partecipa."
 
-#: include/conversation.php:1189
+#: include/conversation.php:1207
 #, php-format
 msgid "%2$d people don't attend"
 msgstr "%2$d persone non partecipano"
 
-#: include/conversation.php:1190
+#: include/conversation.php:1208
 #, php-format
 msgid "%s don't attend."
 msgstr "%s non partecipa."
 
-#: include/conversation.php:1193
+#: include/conversation.php:1211
 #, php-format
 msgid "%2$d people attend maybe"
 msgstr "%2$d persone forse partecipano"
 
-#: include/conversation.php:1194
+#: include/conversation.php:1212
 #, php-format
 msgid "%s anttend maybe."
 msgstr "%s forse partecipano."
 
-#: include/conversation.php:1223 include/conversation.php:1239
+#: include/conversation.php:1241 include/conversation.php:1257
 msgid "Visible to everybody"
 msgstr "Visibile a tutti"
 
-#: include/conversation.php:1224 include/conversation.php:1240
-#: mod/wallmessage.php:114 mod/wallmessage.php:121 mod/message.php:271
-#: mod/message.php:278 mod/message.php:418 mod/message.php:425
+#: include/conversation.php:1242 include/conversation.php:1258
+#: mod/message.php:271 mod/message.php:278 mod/message.php:418
+#: mod/message.php:425 mod/wallmessage.php:117 mod/wallmessage.php:124
 msgid "Please enter a link URL:"
 msgstr "Inserisci l'indirizzo del link:"
 
-#: include/conversation.php:1225 include/conversation.php:1241
+#: include/conversation.php:1243 include/conversation.php:1259
 msgid "Please enter a video link/URL:"
 msgstr "Inserisci un collegamento video / URL:"
 
-#: include/conversation.php:1226 include/conversation.php:1242
+#: include/conversation.php:1244 include/conversation.php:1260
 msgid "Please enter an audio link/URL:"
 msgstr "Inserisci un collegamento audio / URL:"
 
-#: include/conversation.php:1227 include/conversation.php:1243
+#: include/conversation.php:1245 include/conversation.php:1261
 msgid "Tag term:"
 msgstr "Tag:"
 
-#: include/conversation.php:1228 include/conversation.php:1244
-#: mod/filer.php:30
+#: include/conversation.php:1246 include/conversation.php:1262
+#: mod/filer.php:31
 msgid "Save to Folder:"
 msgstr "Salva nella Cartella:"
 
-#: include/conversation.php:1229 include/conversation.php:1245
+#: include/conversation.php:1247 include/conversation.php:1263
 msgid "Where are you right now?"
 msgstr "Dove sei ora?"
 
-#: include/conversation.php:1230
+#: include/conversation.php:1248
 msgid "Delete item(s)?"
 msgstr "Cancellare questo elemento/i?"
 
-#: include/conversation.php:1279
+#: include/conversation.php:1297
 msgid "Share"
 msgstr "Condividi"
 
-#: include/conversation.php:1280 mod/editpost.php:100 mod/wallmessage.php:138
-#: mod/message.php:335 mod/message.php:519
+#: include/conversation.php:1298 mod/editpost.php:103 mod/message.php:335
+#: mod/message.php:519 mod/wallmessage.php:141
 msgid "Upload photo"
 msgstr "Carica foto"
 
-#: include/conversation.php:1281 mod/editpost.php:101
+#: include/conversation.php:1299 mod/editpost.php:104
 msgid "upload photo"
 msgstr "carica foto"
 
-#: include/conversation.php:1282 mod/editpost.php:102
+#: include/conversation.php:1300 mod/editpost.php:105
 msgid "Attach file"
 msgstr "Allega file"
 
-#: include/conversation.php:1283 mod/editpost.php:103
+#: include/conversation.php:1301 mod/editpost.php:106
 msgid "attach file"
 msgstr "allega file"
 
-#: include/conversation.php:1284 mod/editpost.php:104 mod/wallmessage.php:139
-#: mod/message.php:336 mod/message.php:520
+#: include/conversation.php:1302 mod/editpost.php:107 mod/message.php:336
+#: mod/message.php:520 mod/wallmessage.php:142
 msgid "Insert web link"
 msgstr "Inserisci link"
 
-#: include/conversation.php:1285 mod/editpost.php:105
+#: include/conversation.php:1303 mod/editpost.php:108
 msgid "web link"
 msgstr "link web"
 
-#: include/conversation.php:1286 mod/editpost.php:106
+#: include/conversation.php:1304 mod/editpost.php:109
 msgid "Insert video link"
 msgstr "Inserire collegamento video"
 
-#: include/conversation.php:1287 mod/editpost.php:107
+#: include/conversation.php:1305 mod/editpost.php:110
 msgid "video link"
 msgstr "link video"
 
-#: include/conversation.php:1288 mod/editpost.php:108
+#: include/conversation.php:1306 mod/editpost.php:111
 msgid "Insert audio link"
 msgstr "Inserisci collegamento audio"
 
-#: include/conversation.php:1289 mod/editpost.php:109
+#: include/conversation.php:1307 mod/editpost.php:112
 msgid "audio link"
 msgstr "link audio"
 
-#: include/conversation.php:1290 mod/editpost.php:110
+#: include/conversation.php:1308 mod/editpost.php:113
 msgid "Set your location"
 msgstr "La tua posizione"
 
-#: include/conversation.php:1291 mod/editpost.php:111
+#: include/conversation.php:1309 mod/editpost.php:114
 msgid "set location"
 msgstr "posizione"
 
-#: include/conversation.php:1292 mod/editpost.php:112
+#: include/conversation.php:1310 mod/editpost.php:115
 msgid "Clear browser location"
 msgstr "Rimuovi la localizzazione data dal browser"
 
-#: include/conversation.php:1293 mod/editpost.php:113
+#: include/conversation.php:1311 mod/editpost.php:116
 msgid "clear location"
 msgstr "canc. pos."
 
-#: include/conversation.php:1295 mod/editpost.php:127
+#: include/conversation.php:1313 mod/editpost.php:130
 msgid "Set title"
 msgstr "Scegli un titolo"
 
-#: include/conversation.php:1297 mod/editpost.php:129
+#: include/conversation.php:1315 mod/editpost.php:132
 msgid "Categories (comma-separated list)"
 msgstr "Categorie (lista separata da virgola)"
 
-#: include/conversation.php:1299 mod/editpost.php:115
+#: include/conversation.php:1317 mod/editpost.php:118
 msgid "Permission settings"
 msgstr "Impostazioni permessi"
 
-#: include/conversation.php:1300 mod/editpost.php:144
+#: include/conversation.php:1318 mod/editpost.php:147
 msgid "permissions"
 msgstr "permessi"
 
-#: include/conversation.php:1308 mod/editpost.php:124
+#: include/conversation.php:1326 mod/editpost.php:127
 msgid "Public post"
 msgstr "Messaggio pubblico"
 
-#: include/conversation.php:1313 mod/content.php:737 mod/editpost.php:135
-#: mod/events.php:503 mod/photos.php:1647 mod/photos.php:1689
-#: mod/photos.php:1769 object/Item.php:714
+#: include/conversation.php:1331 mod/editpost.php:138 mod/events.php:527
+#: mod/photos.php:1624 mod/photos.php:1666 mod/photos.php:1746
+#: object/Item.php:711
 msgid "Preview"
 msgstr "Anteprima"
 
-#: include/conversation.php:1317 include/items.php:2167 mod/contacts.php:455
-#: mod/editpost.php:138 mod/fbrowser.php:100 mod/fbrowser.php:135
-#: mod/suggest.php:32 mod/tagrm.php:11 mod/tagrm.php:96
-#: mod/dfrn_request.php:894 mod/follow.php:124 mod/message.php:209
-#: mod/photos.php:245 mod/photos.php:337 mod/settings.php:682
-#: mod/settings.php:708 mod/videos.php:132
+#: include/conversation.php:1335 include/items.php:2154
+#: mod/dfrn_request.php:895 mod/editpost.php:141 mod/follow.php:161
+#: mod/message.php:210 mod/tagrm.php:14 mod/tagrm.php:99 mod/suggest.php:35
+#: mod/fbrowser.php:104 mod/fbrowser.php:139 mod/unfollow.php:117
+#: mod/contacts.php:469 mod/photos.php:249 mod/photos.php:341
+#: mod/settings.php:692 mod/settings.php:718 mod/videos.php:136
 msgid "Cancel"
 msgstr "Annulla"
 
-#: include/conversation.php:1323
+#: include/conversation.php:1341
 msgid "Post to Groups"
 msgstr "Invia ai Gruppi"
 
-#: include/conversation.php:1324
+#: include/conversation.php:1342
 msgid "Post to Contacts"
 msgstr "Invia ai Contatti"
 
-#: include/conversation.php:1325
+#: include/conversation.php:1343
 msgid "Private post"
 msgstr "Post privato"
 
-#: include/conversation.php:1330 include/identity.php:264 mod/editpost.php:142
+#: include/conversation.php:1348 include/identity.php:268 mod/editpost.php:145
 msgid "Message"
 msgstr "Messaggio"
 
-#: include/conversation.php:1331 mod/editpost.php:143
+#: include/conversation.php:1349 mod/editpost.php:146
 msgid "Browser"
 msgstr "Browser"
 
-#: include/conversation.php:1513
+#: include/conversation.php:1531
 msgid "View all"
 msgstr "Mostra tutto"
 
-#: include/conversation.php:1535
+#: include/conversation.php:1553
 msgid "Like"
 msgid_plural "Likes"
 msgstr[0] "Mi piace"
 msgstr[1] "Mi piace"
 
-#: include/conversation.php:1538
+#: include/conversation.php:1556
 msgid "Dislike"
 msgid_plural "Dislikes"
 msgstr[0] "Non mi piace"
 msgstr[1] "Non mi piace"
 
-#: include/conversation.php:1544
+#: include/conversation.php:1562
 msgid "Not Attending"
 msgid_plural "Not Attending"
 msgstr[0] "Non partecipa"
 msgstr[1] "Non partecipano"
 
-#: include/datetime.php:66 include/datetime.php:68 mod/profiles.php:698
-msgid "Miscellaneous"
-msgstr "Varie"
-
-#: include/datetime.php:196 include/identity.php:644
-msgid "Birthday:"
-msgstr "Compleanno:"
-
-#: include/datetime.php:198 mod/profiles.php:721
-msgid "Age: "
-msgstr "Età : "
-
-#: include/datetime.php:200
-msgid "YYYY-MM-DD or MM-DD"
-msgstr "AAAA-MM-GG o MM-GG"
-
-#: include/datetime.php:370
-msgid "never"
-msgstr "mai"
-
-#: include/datetime.php:376
-msgid "less than a second ago"
-msgstr "meno di un secondo fa"
-
-#: include/datetime.php:379
-msgid "year"
-msgstr "anno"
-
-#: include/datetime.php:379
-msgid "years"
-msgstr "anni"
-
-#: include/datetime.php:380 include/event.php:519 mod/cal.php:279
-#: mod/events.php:384
-msgid "month"
-msgstr "mese"
-
-#: include/datetime.php:380
-msgid "months"
-msgstr "mesi"
-
-#: include/datetime.php:381 include/event.php:520 mod/cal.php:280
-#: mod/events.php:385
-msgid "week"
-msgstr "settimana"
-
-#: include/datetime.php:381
-msgid "weeks"
-msgstr "settimane"
-
-#: include/datetime.php:382 include/event.php:521 mod/cal.php:281
-#: mod/events.php:386
-msgid "day"
-msgstr "giorno"
-
-#: include/datetime.php:382
-msgid "days"
-msgstr "giorni"
-
-#: include/datetime.php:383
-msgid "hour"
-msgstr "ora"
-
-#: include/datetime.php:383
-msgid "hours"
-msgstr "ore"
-
-#: include/datetime.php:384
-msgid "minute"
-msgstr "minuto"
-
-#: include/datetime.php:384
-msgid "minutes"
-msgstr "minuti"
-
-#: include/datetime.php:385
-msgid "second"
-msgstr "secondo"
-
-#: include/datetime.php:385
-msgid "seconds"
-msgstr "secondi"
-
-#: include/datetime.php:394
-#, php-format
-msgid "%1$d %2$s ago"
-msgstr "%1$d %2$s fa"
-
-#: include/datetime.php:620
-#, php-format
-msgid "%s's birthday"
-msgstr "Compleanno di %s"
-
-#: include/datetime.php:621 include/dfrn.php:1252
-#, php-format
-msgid "Happy Birthday %s"
-msgstr "Buon compleanno %s"
-
-#: include/dba_pdo.php:72 include/dba.php:47
+#: include/dba.php:57
 #, php-format
 msgid "Cannot locate DNS info for database server '%s'"
 msgstr "Non trovo le informazioni DNS per il database server '%s'"
 
-#: include/enotify.php:24
-msgid "Friendica Notification"
-msgstr "Notifica Friendica"
+#: include/dbstructure.php:24
+msgid "There are no tables on MyISAM."
+msgstr "Non ci sono tabelle MyISAM"
 
-#: include/enotify.php:27
-msgid "Thank You,"
-msgstr "Grazie,"
-
-#: include/enotify.php:30
-#, php-format
-msgid "%s Administrator"
-msgstr "Amministratore %s"
-
-#: include/enotify.php:32
-#, php-format
-msgid "%1$s, %2$s Administrator"
-msgstr "%1$s,  amministratore di %2$s"
-
-#: include/enotify.php:70
-#, php-format
-msgid "%s "
-msgstr "%s "
-
-#: include/enotify.php:83
-#, php-format
-msgid "[Friendica:Notify] New mail received at %s"
-msgstr "[Friendica:Notifica] Nuovo messaggio privato ricevuto su %s"
-
-#: include/enotify.php:85
-#, php-format
-msgid "%1$s sent you a new private message at %2$s."
-msgstr "%1$s ti ha inviato un nuovo messaggio privato su %2$s."
-
-#: include/enotify.php:86
-#, php-format
-msgid "%1$s sent you %2$s."
-msgstr "%1$s ti ha inviato %2$s"
-
-#: include/enotify.php:86
-msgid "a private message"
-msgstr "un messaggio privato"
-
-#: include/enotify.php:88
-#, php-format
-msgid "Please visit %s to view and/or reply to your private messages."
-msgstr "Visita %s per vedere e/o rispondere ai tuoi messaggi privati."
-
-#: include/enotify.php:134
-#, php-format
-msgid "%1$s commented on [url=%2$s]a %3$s[/url]"
-msgstr "%1$s ha commentato [url=%2$s]%3$s[/url]"
-
-#: include/enotify.php:141
-#, php-format
-msgid "%1$s commented on [url=%2$s]%3$s's %4$s[/url]"
-msgstr "%1$s ha commentato [url=%2$s]%4$s di %3$s[/url]"
-
-#: include/enotify.php:149
-#, php-format
-msgid "%1$s commented on [url=%2$s]your %3$s[/url]"
-msgstr "%1$s ha commentato un [url=%2$s]tuo %3$s[/url]"
-
-#: include/enotify.php:159
-#, php-format
-msgid "[Friendica:Notify] Comment to conversation #%1$d by %2$s"
-msgstr "[Friendica:Notifica] Commento di %2$s alla conversazione #%1$d"
-
-#: include/enotify.php:161
-#, php-format
-msgid "%s commented on an item/conversation you have been following."
-msgstr "%s ha commentato un elemento che stavi seguendo."
-
-#: include/enotify.php:164 include/enotify.php:178 include/enotify.php:192
-#: include/enotify.php:206 include/enotify.php:224 include/enotify.php:238
-#, php-format
-msgid "Please visit %s to view and/or reply to the conversation."
-msgstr "Visita %s per vedere e/o commentare la conversazione"
-
-#: include/enotify.php:171
-#, php-format
-msgid "[Friendica:Notify] %s posted to your profile wall"
-msgstr "[Friendica:Notifica] %s ha scritto sulla tua bacheca"
-
-#: include/enotify.php:173
-#, php-format
-msgid "%1$s posted to your profile wall at %2$s"
-msgstr "%1$s ha scritto sulla tua bacheca su %2$s"
-
-#: include/enotify.php:174
-#, php-format
-msgid "%1$s posted to [url=%2$s]your wall[/url]"
-msgstr "%1$s ha inviato un messaggio sulla [url=%2$s]tua bacheca[/url]"
-
-#: include/enotify.php:185
-#, php-format
-msgid "[Friendica:Notify] %s tagged you"
-msgstr "[Friendica:Notifica] %s ti ha taggato"
-
-#: include/enotify.php:187
-#, php-format
-msgid "%1$s tagged you at %2$s"
-msgstr "%1$s ti ha taggato su %2$s"
-
-#: include/enotify.php:188
-#, php-format
-msgid "%1$s [url=%2$s]tagged you[/url]."
-msgstr "%1$s [url=%2$s]ti ha taggato[/url]."
-
-#: include/enotify.php:199
-#, php-format
-msgid "[Friendica:Notify] %s shared a new post"
-msgstr "[Friendica:Notifica] %s ha condiviso un nuovo messaggio"
-
-#: include/enotify.php:201
-#, php-format
-msgid "%1$s shared a new post at %2$s"
-msgstr "%1$s ha condiviso un nuovo messaggio su %2$s"
-
-#: include/enotify.php:202
-#, php-format
-msgid "%1$s [url=%2$s]shared a post[/url]."
-msgstr "%1$s [url=%2$s]ha condiviso un messaggio[/url]."
-
-#: include/enotify.php:213
-#, php-format
-msgid "[Friendica:Notify] %1$s poked you"
-msgstr "[Friendica:Notifica] %1$s ti ha stuzzicato"
-
-#: include/enotify.php:215
-#, php-format
-msgid "%1$s poked you at %2$s"
-msgstr "%1$s ti ha stuzzicato su %2$s"
-
-#: include/enotify.php:216
-#, php-format
-msgid "%1$s [url=%2$s]poked you[/url]."
-msgstr "%1$s [url=%2$s]ti ha stuzzicato[/url]."
-
-#: include/enotify.php:231
-#, php-format
-msgid "[Friendica:Notify] %s tagged your post"
-msgstr "[Friendica:Notifica] %s ha taggato un tuo messaggio"
-
-#: include/enotify.php:233
-#, php-format
-msgid "%1$s tagged your post at %2$s"
-msgstr "%1$s ha taggato il tuo post su %2$s"
-
-#: include/enotify.php:234
-#, php-format
-msgid "%1$s tagged [url=%2$s]your post[/url]"
-msgstr "%1$s ha taggato [url=%2$s]il tuo post[/url]"
-
-#: include/enotify.php:245
-msgid "[Friendica:Notify] Introduction received"
-msgstr "[Friendica:Notifica] Hai ricevuto una presentazione"
-
-#: include/enotify.php:247
-#, php-format
-msgid "You've received an introduction from '%1$s' at %2$s"
-msgstr "Hai ricevuto un'introduzione da '%1$s' su %2$s"
-
-#: include/enotify.php:248
-#, php-format
-msgid "You've received [url=%1$s]an introduction[/url] from %2$s."
-msgstr "Hai ricevuto [url=%1$s]un'introduzione[/url] da %2$s."
-
-#: include/enotify.php:252 include/enotify.php:295
-#, php-format
-msgid "You may visit their profile at %s"
-msgstr "Puoi visitare il suo profilo presso %s"
-
-#: include/enotify.php:254
-#, php-format
-msgid "Please visit %s to approve or reject the introduction."
-msgstr "Visita %s per approvare o rifiutare la presentazione."
-
-#: include/enotify.php:262
-msgid "[Friendica:Notify] A new person is sharing with you"
-msgstr "[Friendica:Notifica] Una nuova persona sta condividendo con te"
-
-#: include/enotify.php:264 include/enotify.php:265
-#, php-format
-msgid "%1$s is sharing with you at %2$s"
-msgstr "%1$s sta condividendo con te su %2$s"
-
-#: include/enotify.php:271
-msgid "[Friendica:Notify] You have a new follower"
-msgstr "[Friendica:Notifica] Una nuova persona ti segue"
-
-#: include/enotify.php:273 include/enotify.php:274
-#, php-format
-msgid "You have a new follower at %2$s : %1$s"
-msgstr "Un nuovo utente ha iniziato a seguirti su %2$s : %1$s"
-
-#: include/enotify.php:285
-msgid "[Friendica:Notify] Friend suggestion received"
-msgstr "[Friendica:Notifica] Hai ricevuto un suggerimento di amicizia"
-
-#: include/enotify.php:287
-#, php-format
-msgid "You've received a friend suggestion from '%1$s' at %2$s"
-msgstr "Hai ricevuto un suggerimento di amicizia da '%1$s' su %2$s"
-
-#: include/enotify.php:288
+#: include/dbstructure.php:65
 #, php-format
 msgid ""
-"You've received [url=%1$s]a friend suggestion[/url] for %2$s from %3$s."
-msgstr "Hai ricevuto [url=%1$s]un suggerimento di amicizia[/url] per %2$s su %3$s"
+"\n"
+"\t\t\tThe friendica developers released update %s recently,\n"
+"\t\t\tbut when I tried to install it, something went terribly wrong.\n"
+"\t\t\tThis needs to be fixed soon and I can't do it alone. Please contact a\n"
+"\t\t\tfriendica developer if you can not help me on your own. My database might be invalid."
+msgstr "\nGli sviluppatori di Friendica hanno rilasciato l'aggiornamento %s\nrecentemente, ma quando ho provato a installarlo, qualcosa è \nandato terribilmente storto.\nBisogna sistemare le cose e non posso farlo da solo.\nContatta uno sviluppatore se non puoi aiutarmi da solo. Il mio database potrebbe essere invalido."
 
-#: include/enotify.php:293
-msgid "Name:"
-msgstr "Nome:"
-
-#: include/enotify.php:294
-msgid "Photo:"
-msgstr "Foto:"
-
-#: include/enotify.php:297
-#, php-format
-msgid "Please visit %s to approve or reject the suggestion."
-msgstr "Visita %s per approvare o rifiutare il suggerimento."
-
-#: include/enotify.php:305 include/enotify.php:319
-msgid "[Friendica:Notify] Connection accepted"
-msgstr "[Friendica:Notifica] Connessione accettata"
-
-#: include/enotify.php:307 include/enotify.php:321
-#, php-format
-msgid "'%1$s' has accepted your connection request at %2$s"
-msgstr "'%1$s' ha accettato la tua richiesta di connessione su %2$s"
-
-#: include/enotify.php:308 include/enotify.php:322
-#, php-format
-msgid "%2$s has accepted your [url=%1$s]connection request[/url]."
-msgstr "%2$s ha accettato la tua [url=%1$s]richiesta di connessione[/url]"
-
-#: include/enotify.php:312
-msgid ""
-"You are now mutual friends and may exchange status updates, photos, and "
-"email without restriction."
-msgstr "Ora siete amici reciproci e potete scambiarvi aggiornamenti di stato, foto e messaggi privati senza restrizioni."
-
-#: include/enotify.php:314
-#, php-format
-msgid "Please visit %s if you wish to make any changes to this relationship."
-msgstr "Visita %s se vuoi modificare questa relazione."
-
-#: include/enotify.php:326
+#: include/dbstructure.php:70
 #, php-format
 msgid ""
-"'%1$s' has chosen to accept you a \"fan\", which restricts some forms of "
-"communication - such as private messaging and some profile interactions. If "
-"this is a celebrity or community page, these settings were applied "
-"automatically."
-msgstr "'%1$s' ha scelto di accettarti come \"fan\", il che limita alcune forme di comunicazione, come i messaggi privati, e alcune possibilità di interazione col profilo. Se è una pagina di una comunità o di una celebrità, queste impostazioni sono state applicate automaticamente."
+"The error message is\n"
+"[pre]%s[/pre]"
+msgstr "Il messaggio di errore è\n[pre]%s[/pre]"
 
-#: include/enotify.php:328
+#: include/dbstructure.php:192
 #, php-format
 msgid ""
-"'%1$s' may choose to extend this into a two-way or more permissive "
-"relationship in the future."
-msgstr "'%1$s' può scegliere di estendere questa relazione in una relazione più permissiva in futuro."
+"\n"
+"Error %d occurred during database update:\n"
+"%s\n"
+msgstr "\nErrore %d durante l'aggiornamento del database:\n%s\n"
 
-#: include/enotify.php:330
+#: include/dbstructure.php:195
+msgid "Errors encountered performing database changes: "
+msgstr "Errori riscontrati eseguendo le modifiche al database:"
+
+#: include/dbstructure.php:203
+msgid ": Database update"
+msgstr ": Aggiornamento database"
+
+#: include/dbstructure.php:436
 #, php-format
-msgid "Please visit %s  if you wish to make any changes to this relationship."
-msgstr "Visita %s se desideri modificare questo collegamento."
+msgid "%s: updating %s table."
+msgstr "%s: aggiornando la tabella %s."
 
-#: include/enotify.php:340
-msgid "[Friendica System:Notify] registration request"
-msgstr "[Friendica System:Notifica] richiesta di registrazione"
+#: include/delivery.php:429
+msgid "(no subject)"
+msgstr "(nessun oggetto)"
 
-#: include/enotify.php:342
+#: include/dfrn.php:1360
 #, php-format
-msgid "You've received a registration request from '%1$s' at %2$s"
-msgstr "Hai ricevuto una richiesta di registrazione da '%1$s' su %2$s"
+msgid "%s\\'s birthday"
+msgstr "compleanno di %s"
 
-#: include/enotify.php:343
-#, php-format
-msgid "You've received a [url=%1$s]registration request[/url] from %2$s."
-msgstr "Hai ricevuto una [url=%1$s]richiesta di registrazione[/url] da %2$s."
+#: include/diaspora.php:2351
+msgid "Sharing notification from Diaspora network"
+msgstr "Notifica di condivisione dal network Diaspora*"
 
-#: include/enotify.php:347
-#, php-format
-msgid "Full Name:\t%1$s\\nSite Location:\t%2$s\\nLogin Name:\t%3$s (%4$s)"
-msgstr "Nome completo: %1$s\nIndirizzo del sito: %2$s\nNome utente: %3$s (%4$s)"
+#: include/diaspora.php:3344
+msgid "Attachments:"
+msgstr "Allegati:"
 
-#: include/enotify.php:350
-#, php-format
-msgid "Please visit %s to approve or reject the request."
-msgstr "Visita %s per approvare o rifiutare la richiesta."
-
-#: include/event.php:474
+#: include/event.php:445
 msgid "all-day"
 msgstr "tutto il giorno"
 
-#: include/event.php:476
+#: include/event.php:447
 msgid "Sun"
 msgstr "Dom"
 
-#: include/event.php:477
+#: include/event.php:448 include/text.php:1220
 msgid "Mon"
 msgstr "Lun"
 
-#: include/event.php:478
+#: include/event.php:449 include/text.php:1220
 msgid "Tue"
 msgstr "Mar"
 
-#: include/event.php:479
+#: include/event.php:450 include/text.php:1220
 msgid "Wed"
 msgstr "Mer"
 
-#: include/event.php:480
+#: include/event.php:451 include/text.php:1220
 msgid "Thu"
 msgstr "Gio"
 
-#: include/event.php:481
+#: include/event.php:452 include/text.php:1220
 msgid "Fri"
 msgstr "Ven"
 
-#: include/event.php:482
+#: include/event.php:453 include/text.php:1220
 msgid "Sat"
 msgstr "Sab"
 
-#: include/event.php:484 include/text.php:1198 mod/settings.php:981
+#: include/event.php:455 include/text.php:1202 mod/settings.php:986
 msgid "Sunday"
 msgstr "Domenica"
 
-#: include/event.php:485 include/text.php:1198 mod/settings.php:981
+#: include/event.php:456 include/text.php:1202 mod/settings.php:986
 msgid "Monday"
 msgstr "Lunedì"
 
-#: include/event.php:486 include/text.php:1198
+#: include/event.php:457 include/text.php:1202
 msgid "Tuesday"
 msgstr "Martedì"
 
-#: include/event.php:487 include/text.php:1198
+#: include/event.php:458 include/text.php:1202
 msgid "Wednesday"
 msgstr "Mercoledì"
 
-#: include/event.php:488 include/text.php:1198
+#: include/event.php:459 include/text.php:1202
 msgid "Thursday"
 msgstr "Giovedì"
 
-#: include/event.php:489 include/text.php:1198
+#: include/event.php:460 include/text.php:1202
 msgid "Friday"
 msgstr "Venerdì"
 
-#: include/event.php:490 include/text.php:1198
+#: include/event.php:461 include/text.php:1202
 msgid "Saturday"
 msgstr "Sabato"
 
-#: include/event.php:492
+#: include/event.php:463 include/text.php:1223
 msgid "Jan"
 msgstr "Gen"
 
-#: include/event.php:493
+#: include/event.php:464 include/text.php:1223
 msgid "Feb"
 msgstr "Feb"
 
-#: include/event.php:494
+#: include/event.php:465 include/text.php:1223
 msgid "Mar"
 msgstr "Mar"
 
-#: include/event.php:495
+#: include/event.php:466 include/text.php:1223
 msgid "Apr"
 msgstr "Apr"
 
-#: include/event.php:496 include/event.php:509 include/text.php:1202
+#: include/event.php:467 include/event.php:480 include/text.php:1206
+#: include/text.php:1223
 msgid "May"
 msgstr "Maggio"
 
-#: include/event.php:497
+#: include/event.php:468
 msgid "Jun"
 msgstr "Giu"
 
-#: include/event.php:498
+#: include/event.php:469 include/text.php:1223
 msgid "Jul"
 msgstr "Lug"
 
-#: include/event.php:499
+#: include/event.php:470 include/text.php:1223
 msgid "Aug"
 msgstr "Ago"
 
-#: include/event.php:500
+#: include/event.php:471
 msgid "Sept"
 msgstr "Set"
 
-#: include/event.php:501
+#: include/event.php:472 include/text.php:1223
 msgid "Oct"
 msgstr "Ott"
 
-#: include/event.php:502
+#: include/event.php:473 include/text.php:1223
 msgid "Nov"
 msgstr "Nov"
 
-#: include/event.php:503
+#: include/event.php:474 include/text.php:1223
 msgid "Dec"
 msgstr "Dic"
 
-#: include/event.php:505 include/text.php:1202
+#: include/event.php:476 include/text.php:1206
 msgid "January"
 msgstr "Gennaio"
 
-#: include/event.php:506 include/text.php:1202
+#: include/event.php:477 include/text.php:1206
 msgid "February"
 msgstr "Febbraio"
 
-#: include/event.php:507 include/text.php:1202
+#: include/event.php:478 include/text.php:1206
 msgid "March"
 msgstr "Marzo"
 
-#: include/event.php:508 include/text.php:1202
+#: include/event.php:479 include/text.php:1206
 msgid "April"
 msgstr "Aprile"
 
-#: include/event.php:510 include/text.php:1202
+#: include/event.php:481 include/text.php:1206
 msgid "June"
 msgstr "Giugno"
 
-#: include/event.php:511 include/text.php:1202
+#: include/event.php:482 include/text.php:1206
 msgid "July"
 msgstr "Luglio"
 
-#: include/event.php:512 include/text.php:1202
+#: include/event.php:483 include/text.php:1206
 msgid "August"
 msgstr "Agosto"
 
-#: include/event.php:513 include/text.php:1202
+#: include/event.php:484 include/text.php:1206
 msgid "September"
 msgstr "Settembre"
 
-#: include/event.php:514 include/text.php:1202
+#: include/event.php:485 include/text.php:1206
 msgid "October"
 msgstr "Ottobre"
 
-#: include/event.php:515 include/text.php:1202
+#: include/event.php:486 include/text.php:1206
 msgid "November"
 msgstr "Novembre"
 
-#: include/event.php:516 include/text.php:1202
+#: include/event.php:487 include/text.php:1206
 msgid "December"
 msgstr "Dicembre"
 
-#: include/event.php:518 mod/cal.php:278 mod/events.php:383
+#: include/event.php:489 mod/cal.php:281 mod/events.php:392
 msgid "today"
 msgstr "oggi"
 
-#: include/event.php:523
+#: include/event.php:494
 msgid "No events to display"
 msgstr "Nessun evento da mostrare"
 
-#: include/event.php:636
+#: include/event.php:608
 msgid "l, F j"
 msgstr "l j F"
 
-#: include/event.php:658
+#: include/event.php:629
 msgid "Edit event"
 msgstr "Modifica l'evento"
 
-#: include/event.php:659
+#: include/event.php:630
+msgid "Duplicate event"
+msgstr "Duplica evento"
+
+#: include/event.php:631
 msgid "Delete event"
 msgstr "Elimina evento"
 
-#: include/event.php:685 include/text.php:1600 include/text.php:1607
+#: include/event.php:658 include/text.php:1618 include/text.php:1625
 msgid "link to source"
 msgstr "Collegamento all'originale"
 
-#: include/event.php:939
+#: include/event.php:915
 msgid "Export"
 msgstr "Esporta"
 
-#: include/event.php:940
+#: include/event.php:916
 msgid "Export calendar as ical"
 msgstr "Esporta il calendario in formato ical"
 
-#: include/event.php:941
+#: include/event.php:917
 msgid "Export calendar as csv"
 msgstr "Esporta il calendario in formato csv"
 
-#: include/features.php:65
-msgid "General Features"
-msgstr "Funzionalità generali"
+#: include/event.php:934
+msgid "D g:i A"
+msgstr ""
 
-#: include/features.php:67
-msgid "Multiple Profiles"
-msgstr "Profili multipli"
+#: include/event.php:935
+msgid "g:i A"
+msgstr ""
 
-#: include/features.php:67
-msgid "Ability to create multiple profiles"
-msgstr "Possibilità di creare profili multipli"
+#: include/event.php:1004 include/event.php:1006
+msgid "Show map"
+msgstr "Mostra mappa"
 
-#: include/features.php:68
-msgid "Photo Location"
-msgstr "Località Foto"
+#: include/event.php:1005
+msgid "Hide map"
+msgstr "Nascondi mappa"
 
-#: include/features.php:68
-msgid ""
-"Photo metadata is normally stripped. This extracts the location (if present)"
-" prior to stripping metadata and links it to a map."
-msgstr "I metadati delle foto vengono rimossi. Questa opzione estrae la località (se presenta) prima di rimuovere i metadati e la collega a una mappa."
-
-#: include/features.php:69
-msgid "Export Public Calendar"
-msgstr "Esporta calendario pubblico"
-
-#: include/features.php:69
-msgid "Ability for visitors to download the public calendar"
-msgstr "Permesso ai visitatori di scaricare il calendario pubblico"
-
-#: include/features.php:74
-msgid "Post Composition Features"
-msgstr "Funzionalità di composizione dei post"
-
-#: include/features.php:75
-msgid "Post Preview"
-msgstr "Anteprima dei post"
-
-#: include/features.php:75
-msgid "Allow previewing posts and comments before publishing them"
-msgstr "Permetti di avere un'anteprima di messaggi e commenti prima di pubblicarli"
-
-#: include/features.php:76
-msgid "Auto-mention Forums"
-msgstr "Auto-cita i Forum"
-
-#: include/features.php:76
-msgid ""
-"Add/remove mention when a forum page is selected/deselected in ACL window."
-msgstr "Aggiunge/rimuove una menzione quando una pagina forum è selezionata/deselezionata nella finestra dei permessi."
-
-#: include/features.php:81
-msgid "Network Sidebar Widgets"
-msgstr "Widget della barra laterale nella pagina Rete"
-
-#: include/features.php:82
-msgid "Search by Date"
-msgstr "Cerca per data"
-
-#: include/features.php:82
-msgid "Ability to select posts by date ranges"
-msgstr "Permette di filtrare i post per data"
-
-#: include/features.php:83 include/features.php:113
-msgid "List Forums"
-msgstr "Elenco forum"
-
-#: include/features.php:83
-msgid "Enable widget to display the forums your are connected with"
-msgstr "Abilita il widget che mostra i forum ai quali sei connesso"
-
-#: include/features.php:84
-msgid "Group Filter"
-msgstr "Filtra gruppi"
-
-#: include/features.php:84
-msgid "Enable widget to display Network posts only from selected group"
-msgstr "Abilita il widget per filtrare i post solo per il gruppo selezionato"
-
-#: include/features.php:85
-msgid "Network Filter"
-msgstr "Filtro reti"
-
-#: include/features.php:85
-msgid "Enable widget to display Network posts only from selected network"
-msgstr "Abilita il widget per mostrare i post solo per la rete selezionata"
-
-#: include/features.php:86 mod/network.php:206 mod/search.php:34
-msgid "Saved Searches"
-msgstr "Ricerche salvate"
-
-#: include/features.php:86
-msgid "Save search terms for re-use"
-msgstr "Salva i termini cercati per riutilizzarli"
-
-#: include/features.php:91
-msgid "Network Tabs"
-msgstr "Schede pagina Rete"
-
-#: include/features.php:92
-msgid "Network Personal Tab"
-msgstr "Scheda Personali"
-
-#: include/features.php:92
-msgid "Enable tab to display only Network posts that you've interacted on"
-msgstr "Abilita la scheda per mostrare solo i post a cui hai partecipato"
-
-#: include/features.php:93
-msgid "Network New Tab"
-msgstr "Scheda Nuovi"
-
-#: include/features.php:93
-msgid "Enable tab to display only new Network posts (from the last 12 hours)"
-msgstr "Abilita la scheda per mostrare solo i post nuovi (nelle ultime 12 ore)"
-
-#: include/features.php:94
-msgid "Network Shared Links Tab"
-msgstr "Scheda Link Condivisi"
-
-#: include/features.php:94
-msgid "Enable tab to display only Network posts with links in them"
-msgstr "Abilita la scheda per mostrare solo i post che contengono link"
-
-#: include/features.php:99
-msgid "Post/Comment Tools"
-msgstr "Strumenti per messaggi/commenti"
-
-#: include/features.php:100
-msgid "Multiple Deletion"
-msgstr "Eliminazione multipla"
-
-#: include/features.php:100
-msgid "Select and delete multiple posts/comments at once"
-msgstr "Seleziona ed elimina vari messaggi e commenti in una volta sola"
-
-#: include/features.php:101
-msgid "Edit Sent Posts"
-msgstr "Modifica i post inviati"
-
-#: include/features.php:101
-msgid "Edit and correct posts and comments after sending"
-msgstr "Modifica e correggi messaggi e commenti dopo averli inviati"
-
-#: include/features.php:102
-msgid "Tagging"
-msgstr "Aggiunta tag"
-
-#: include/features.php:102
-msgid "Ability to tag existing posts"
-msgstr "Permette di aggiungere tag ai post già esistenti"
-
-#: include/features.php:103
-msgid "Post Categories"
-msgstr "Categorie post"
-
-#: include/features.php:103
-msgid "Add categories to your posts"
-msgstr "Aggiungi categorie ai tuoi post"
-
-#: include/features.php:104
-msgid "Ability to file posts under folders"
-msgstr "Permette di archiviare i post in cartelle"
-
-#: include/features.php:105
-msgid "Dislike Posts"
-msgstr "Non mi piace"
-
-#: include/features.php:105
-msgid "Ability to dislike posts/comments"
-msgstr "Permetti di inviare \"non mi piace\" ai messaggi"
-
-#: include/features.php:106
-msgid "Star Posts"
-msgstr "Post preferiti"
-
-#: include/features.php:106
-msgid "Ability to mark special posts with a star indicator"
-msgstr "Permette di segnare i post preferiti con una stella"
-
-#: include/features.php:107
-msgid "Mute Post Notifications"
-msgstr "Silenzia le notifiche di nuovi post"
-
-#: include/features.php:107
-msgid "Ability to mute notifications for a thread"
-msgstr "Permette di silenziare le notifiche di nuovi post in una discussione"
-
-#: include/features.php:112
-msgid "Advanced Profile Settings"
-msgstr "Impostazioni Avanzate Profilo"
-
-#: include/features.php:113
-msgid "Show visitors public community forums at the Advanced Profile Page"
-msgstr "Mostra ai visitatori i forum nella pagina Profilo Avanzato"
-
-#: include/follow.php:81 mod/dfrn_request.php:512
+#: include/follow.php:87 mod/dfrn_request.php:515
 msgid "Disallowed profile URL."
 msgstr "Indirizzo profilo non permesso."
 
-#: include/follow.php:86 mod/dfrn_request.php:518 mod/friendica.php:114
-#: mod/admin.php:279 mod/admin.php:297
+#: include/follow.php:92 mod/dfrn_request.php:521 mod/friendica.php:116
+#: mod/admin.php:290 mod/admin.php:308
 msgid "Blocked domain"
 msgstr "Dominio bloccato"
 
-#: include/follow.php:91
+#: include/follow.php:97
 msgid "Connect URL missing."
 msgstr "URL di connessione mancante."
 
-#: include/follow.php:119
+#: include/follow.php:129
 msgid ""
 "This site is not configured to allow communications with other networks."
 msgstr "Questo sito non è configurato per permettere la comunicazione con altri network."
 
-#: include/follow.php:120 include/follow.php:134
+#: include/follow.php:130 include/follow.php:144
 msgid "No compatible communication protocols or feeds were discovered."
 msgstr "Non sono stati trovati protocolli di comunicazione o feed compatibili."
 
-#: include/follow.php:132
+#: include/follow.php:142
 msgid "The profile address specified does not provide adequate information."
 msgstr "L'indirizzo del profilo specificato non fornisce adeguate informazioni."
 
-#: include/follow.php:137
+#: include/follow.php:147
 msgid "An author or name was not found."
 msgstr "Non è stato trovato un nome o un autore"
 
-#: include/follow.php:140
+#: include/follow.php:150
 msgid "No browser URL could be matched to this address."
 msgstr "Nessun URL può essere associato a questo indirizzo."
 
-#: include/follow.php:143
+#: include/follow.php:153
 msgid ""
 "Unable to match @-style Identity Address with a known protocol or email "
 "contact."
 msgstr "Impossibile l'indirizzo identità con un protocollo conosciuto o con un contatto email."
 
-#: include/follow.php:144
+#: include/follow.php:154
 msgid "Use mailto: in front of address to force email check."
 msgstr "Usa \"mailto:\" davanti all'indirizzo per forzare un controllo nelle email."
 
-#: include/follow.php:150
+#: include/follow.php:160
 msgid ""
 "The profile address specified belongs to a network which has been disabled "
 "on this site."
 msgstr "L'indirizzo del profilo specificato appartiene a un network che è stato disabilitato su questo sito."
 
-#: include/follow.php:155
+#: include/follow.php:165
 msgid ""
 "Limited profile. This person will be unable to receive direct/personal "
 "notifications from you."
 msgstr "Profilo limitato. Questa persona non sarà in grado di ricevere notifiche personali da te."
 
-#: include/follow.php:256
+#: include/follow.php:236
 msgid "Unable to retrieve contact information."
 msgstr "Impossibile recuperare informazioni sul contatto."
 
-#: include/group.php:25
-msgid ""
-"A deleted group with this name was revived. Existing item permissions "
-"may apply to this group and any future members. If this is "
-"not what you intended, please create another group with a different name."
-msgstr "Un gruppo eliminato con questo nome è stato ricreato. I permessi  esistenti su un elemento possono essere applicati a questo gruppo e tutti i membri futuri. Se questo non è ciò che si intende, si prega di creare un altro gruppo con un nome diverso."
-
-#: include/group.php:210
-msgid "Default privacy group for new contacts"
-msgstr "Gruppo predefinito per i nuovi contatti"
-
-#: include/group.php:243
-msgid "Everybody"
-msgstr "Tutti"
-
-#: include/group.php:266
-msgid "edit"
-msgstr "modifica"
-
-#: include/group.php:287 mod/newmember.php:61
-msgid "Groups"
-msgstr "Gruppi"
-
-#: include/group.php:289
-msgid "Edit groups"
-msgstr "Modifica gruppi"
-
-#: include/group.php:291
-msgid "Edit group"
-msgstr "Modifica gruppo"
-
-#: include/group.php:292
-msgid "Create a new group"
-msgstr "Crea un nuovo gruppo"
-
-#: include/group.php:293 mod/group.php:99 mod/group.php:196
-msgid "Group Name: "
-msgstr "Nome del gruppo:"
-
-#: include/group.php:295
-msgid "Contacts not in any group"
-msgstr "Contatti in nessun gruppo."
-
-#: include/group.php:297 mod/network.php:207
-msgid "add"
-msgstr "aggiungi"
-
-#: include/identity.php:43
+#: include/identity.php:47
 msgid "Requested account is not available."
 msgstr "L'account richiesto non è disponibile."
 
-#: include/identity.php:52 mod/profile.php:21
+#: include/identity.php:56 mod/profile.php:23
 msgid "Requested profile is not available."
 msgstr "Profilo richiesto non disponibile."
 
-#: include/identity.php:96 include/identity.php:319 include/identity.php:740
+#: include/identity.php:100 include/identity.php:323 include/identity.php:756
 msgid "Edit profile"
 msgstr "Modifica il profilo"
 
-#: include/identity.php:259
+#: include/identity.php:263
 msgid "Atom feed"
 msgstr "Feed Atom"
 
-#: include/identity.php:290
+#: include/identity.php:294
 msgid "Manage/edit profiles"
 msgstr "Gestisci/modifica i profili"
 
-#: include/identity.php:295 include/identity.php:321 mod/profiles.php:787
+#: include/identity.php:299 include/identity.php:325 mod/profiles.php:786
 msgid "Change profile photo"
 msgstr "Cambia la foto del profilo"
 
-#: include/identity.php:296 mod/profiles.php:788
+#: include/identity.php:300 mod/profiles.php:787
 msgid "Create New Profile"
 msgstr "Crea un nuovo profilo"
 
-#: include/identity.php:306 mod/profiles.php:777
+#: include/identity.php:310 mod/profiles.php:776
 msgid "Profile Image"
 msgstr "Immagine del Profilo"
 
-#: include/identity.php:309 mod/profiles.php:779
+#: include/identity.php:313 mod/profiles.php:778
 msgid "visible to everybody"
 msgstr "visibile a tutti"
 
-#: include/identity.php:310 mod/profiles.php:684 mod/profiles.php:780
+#: include/identity.php:314 mod/profiles.php:683 mod/profiles.php:779
 msgid "Edit visibility"
 msgstr "Modifica visibilità"
 
-#: include/identity.php:338 include/identity.php:633 mod/directory.php:141
-#: mod/notifications.php:250
+#: include/identity.php:342 include/identity.php:643 mod/notifications.php:253
+#: mod/directory.php:135
 msgid "Gender:"
 msgstr "Genere:"
 
-#: include/identity.php:341 include/identity.php:651 mod/directory.php:143
+#: include/identity.php:345 include/identity.php:666 mod/directory.php:137
 msgid "Status:"
 msgstr "Stato:"
 
-#: include/identity.php:343 include/identity.php:667 mod/directory.php:145
+#: include/identity.php:347 include/identity.php:683 mod/directory.php:139
 msgid "Homepage:"
 msgstr "Homepage:"
 
-#: include/identity.php:345 include/identity.php:687 mod/contacts.php:640
-#: mod/directory.php:147 mod/notifications.php:246
+#: include/identity.php:349 include/identity.php:703 mod/notifications.php:249
+#: mod/directory.php:141 mod/contacts.php:662
 msgid "About:"
 msgstr "Informazioni:"
 
-#: include/identity.php:347 mod/contacts.php:638
+#: include/identity.php:351 mod/contacts.php:660
 msgid "XMPP:"
 msgstr "XMPP:"
 
-#: include/identity.php:433 mod/contacts.php:55 mod/notifications.php:258
+#: include/identity.php:437 mod/notifications.php:261 mod/contacts.php:60
 msgid "Network:"
 msgstr "Rete:"
 
-#: include/identity.php:462 include/identity.php:552
+#: include/identity.php:466 include/identity.php:557
 msgid "g A l F d"
 msgstr "g A l d F"
 
-#: include/identity.php:463 include/identity.php:553
+#: include/identity.php:467 include/identity.php:558
 msgid "F d"
 msgstr "d F"
 
-#: include/identity.php:514 include/identity.php:599
+#: include/identity.php:519 include/identity.php:605
 msgid "[today]"
 msgstr "[oggi]"
 
-#: include/identity.php:526
+#: include/identity.php:531
 msgid "Birthday Reminders"
 msgstr "Promemoria compleanni"
 
-#: include/identity.php:527
+#: include/identity.php:532
 msgid "Birthdays this week:"
 msgstr "Compleanni questa settimana:"
 
-#: include/identity.php:586
+#: include/identity.php:592
 msgid "[No description]"
 msgstr "[Nessuna descrizione]"
 
-#: include/identity.php:610
+#: include/identity.php:619
 msgid "Event Reminders"
 msgstr "Promemoria"
 
-#: include/identity.php:611
+#: include/identity.php:620
 msgid "Events this week:"
 msgstr "Eventi di questa settimana:"
 
-#: include/identity.php:631 mod/settings.php:1286
+#: include/identity.php:640 mod/settings.php:1273
 msgid "Full Name:"
 msgstr "Nome completo:"
 
-#: include/identity.php:636
+#: include/identity.php:647
 msgid "j F, Y"
 msgstr "j F Y"
 
-#: include/identity.php:637
+#: include/identity.php:648
 msgid "j F"
 msgstr "j F"
 
-#: include/identity.php:648
+#: include/identity.php:662
 msgid "Age:"
 msgstr "Età:"
 
-#: include/identity.php:659
+#: include/identity.php:675
 #, php-format
 msgid "for %1$d %2$s"
 msgstr "per %1$d %2$s"
 
-#: include/identity.php:663 mod/profiles.php:703
+#: include/identity.php:679 mod/profiles.php:702
 msgid "Sexual Preference:"
 msgstr "Preferenze sessuali:"
 
-#: include/identity.php:671 mod/profiles.php:730
+#: include/identity.php:687 mod/profiles.php:729
 msgid "Hometown:"
 msgstr "Paese natale:"
 
-#: include/identity.php:675 mod/contacts.php:642 mod/follow.php:137
-#: mod/notifications.php:248
+#: include/identity.php:691 mod/follow.php:174 mod/notifications.php:251
+#: mod/contacts.php:664
 msgid "Tags:"
 msgstr "Tag:"
 
-#: include/identity.php:679 mod/profiles.php:731
+#: include/identity.php:695 mod/profiles.php:730
 msgid "Political Views:"
 msgstr "Orientamento politico:"
 
-#: include/identity.php:683
+#: include/identity.php:699
 msgid "Religion:"
 msgstr "Religione:"
 
-#: include/identity.php:691
+#: include/identity.php:707
 msgid "Hobbies/Interests:"
 msgstr "Hobby/Interessi:"
 
-#: include/identity.php:695 mod/profiles.php:735
+#: include/identity.php:711 mod/profiles.php:734
 msgid "Likes:"
 msgstr "Mi piace:"
 
-#: include/identity.php:699 mod/profiles.php:736
+#: include/identity.php:715 mod/profiles.php:735
 msgid "Dislikes:"
 msgstr "Non mi piace:"
 
-#: include/identity.php:703
+#: include/identity.php:719
 msgid "Contact information and Social Networks:"
 msgstr "Informazioni su contatti e social network:"
 
-#: include/identity.php:707
+#: include/identity.php:723
 msgid "Musical interests:"
 msgstr "Interessi musicali:"
 
-#: include/identity.php:711
+#: include/identity.php:727
 msgid "Books, literature:"
 msgstr "Libri, letteratura:"
 
-#: include/identity.php:715
+#: include/identity.php:731
 msgid "Television:"
 msgstr "Televisione:"
 
-#: include/identity.php:719
+#: include/identity.php:735
 msgid "Film/dance/culture/entertainment:"
 msgstr "Film/danza/cultura/intrattenimento:"
 
-#: include/identity.php:723
+#: include/identity.php:739
 msgid "Love/Romance:"
 msgstr "Amore:"
 
-#: include/identity.php:727
+#: include/identity.php:743
 msgid "Work/employment:"
 msgstr "Lavoro:"
 
-#: include/identity.php:731
+#: include/identity.php:747
 msgid "School/education:"
 msgstr "Scuola:"
 
-#: include/identity.php:736
+#: include/identity.php:752
 msgid "Forums:"
 msgstr "Forum:"
 
-#: include/identity.php:745 mod/events.php:506
+#: include/identity.php:761 mod/events.php:530
 msgid "Basic"
 msgstr "Base"
 
-#: include/identity.php:746 mod/contacts.php:878 mod/events.php:507
-#: mod/admin.php:1059
+#: include/identity.php:762 mod/admin.php:1181 mod/contacts.php:900
+#: mod/events.php:531
 msgid "Advanced"
 msgstr "Avanzate"
 
-#: include/identity.php:772 mod/contacts.php:844 mod/follow.php:145
+#: include/identity.php:788 mod/follow.php:182 mod/unfollow.php:133
+#: mod/contacts.php:866
 msgid "Status Messages and Posts"
 msgstr "Messaggi di stato e post"
 
-#: include/identity.php:780 mod/contacts.php:852
+#: include/identity.php:796 mod/contacts.php:874
 msgid "Profile Details"
 msgstr "Dettagli del profilo"
 
-#: include/identity.php:788 mod/photos.php:93
+#: include/identity.php:804 mod/photos.php:97
 msgid "Photo Albums"
 msgstr "Album foto"
 
-#: include/identity.php:827 mod/notes.php:47
+#: include/identity.php:843 mod/notes.php:49
 msgid "Personal Notes"
 msgstr "Note personali"
 
-#: include/identity.php:830
+#: include/identity.php:846
 msgid "Only You Can See This"
 msgstr "Solo tu puoi vedere questo"
 
-#: include/network.php:687
+#: include/items.php:1731 mod/dfrn_request.php:760 mod/dfrn_confirm.php:739
+msgid "[Name Withheld]"
+msgstr "[Nome Nascosto]"
+
+#: include/items.php:2106 mod/viewsrc.php:16 mod/notice.php:18
+#: mod/admin.php:258 mod/admin.php:1687 mod/admin.php:1938 mod/display.php:106
+#: mod/display.php:279 mod/display.php:487
+msgid "Item not found."
+msgstr "Elemento non trovato."
+
+#: include/items.php:2149
+msgid "Do you really want to delete this item?"
+msgstr "Vuoi veramente cancellare questo elemento?"
+
+#: include/items.php:2151 mod/api.php:107 mod/dfrn_request.php:881
+#: mod/follow.php:150 mod/message.php:207 mod/suggest.php:32
+#: mod/contacts.php:466 mod/profiles.php:639 mod/profiles.php:642
+#: mod/profiles.php:669 mod/register.php:250 mod/settings.php:1158
+#: mod/settings.php:1164 mod/settings.php:1171 mod/settings.php:1175
+#: mod/settings.php:1180 mod/settings.php:1185 mod/settings.php:1190
+#: mod/settings.php:1195 mod/settings.php:1221 mod/settings.php:1222
+#: mod/settings.php:1223 mod/settings.php:1224 mod/settings.php:1225
+msgid "Yes"
+msgstr "Si"
+
+#: include/items.php:2290 mod/api.php:28 mod/api.php:33 mod/attach.php:35
+#: mod/common.php:20 mod/crepair.php:105 mod/nogroup.php:29
+#: mod/viewcontacts.php:49 mod/uimport.php:26 mod/allfriends.php:15
+#: mod/cal.php:302 mod/editpost.php:13 mod/follow.php:14 mod/follow.php:55
+#: mod/follow.php:118 mod/group.php:21 mod/invite.php:18 mod/invite.php:106
+#: mod/manage.php:104 mod/message.php:49 mod/message.php:172
+#: mod/notifications.php:74 mod/repair_ostatus.php:12 mod/wallmessage.php:12
+#: mod/wallmessage.php:36 mod/wallmessage.php:76 mod/wallmessage.php:100
+#: mod/delegate.php:15 mod/suggest.php:58 mod/unfollow.php:14
+#: mod/unfollow.php:57 mod/unfollow.php:90 mod/contacts.php:374
+#: mod/dfrn_confirm.php:65 mod/dirfind.php:17 mod/display.php:484
+#: mod/events.php:190 mod/fsuggest.php:81 mod/item.php:199 mod/item.php:211
+#: mod/mood.php:118 mod/network.php:17 mod/notes.php:25
+#: mod/ostatus_subscribe.php:12 mod/photos.php:170 mod/photos.php:1095
+#: mod/poke.php:157 mod/profile_photo.php:21 mod/profile_photo.php:181
+#: mod/profile_photo.php:192 mod/profile_photo.php:205 mod/profiles.php:168
+#: mod/profiles.php:606 mod/register.php:47 mod/regmod.php:108
+#: mod/settings.php:28 mod/settings.php:130 mod/settings.php:678
+#: mod/wall_attach.php:69 mod/wall_attach.php:72 mod/wall_upload.php:102
+#: mod/wall_upload.php:105 index.php:412
+msgid "Permission denied."
+msgstr "Permesso negato."
+
+#: include/items.php:2407
+msgid "Archives"
+msgstr "Archivi"
+
+#: include/like.php:46
+#, php-format
+msgid "%1$s is attending %2$s's %3$s"
+msgstr "%1$s parteciperà a %3$s di %2$s"
+
+#: include/like.php:51
+#, php-format
+msgid "%1$s is not attending %2$s's %3$s"
+msgstr "%1$s non parteciperà a %3$s di %2$s"
+
+#: include/like.php:56
+#, php-format
+msgid "%1$s may attend %2$s's %3$s"
+msgstr "%1$s forse parteciperà a %3$s di %2$s"
+
+#: include/message.php:16 include/message.php:162
+msgid "[no subject]"
+msgstr "[nessun oggetto]"
+
+#: include/network.php:714
 msgid "view full size"
 msgstr "vedi a schermo intero"
 
-#: include/oembed.php:255
-msgid "Embedded content"
-msgstr "Contenuto incorporato"
+#: include/ostatus.php:1713
+#, php-format
+msgid "%s is now following %s."
+msgstr "%s sta seguendo %s"
 
-#: include/oembed.php:263
-msgid "Embedding disabled"
-msgstr "Embed disabilitato"
+#: include/ostatus.php:1714
+msgid "following"
+msgstr "segue"
 
-#: include/photos.php:57 include/photos.php:66 mod/fbrowser.php:40
-#: mod/fbrowser.php:61 mod/photos.php:187 mod/photos.php:1123
-#: mod/photos.php:1256 mod/photos.php:1277 mod/photos.php:1839
-#: mod/photos.php:1853
-msgid "Contact Photos"
-msgstr "Foto dei contatti"
+#: include/ostatus.php:1717
+#, php-format
+msgid "%s stopped following %s."
+msgstr "%s ha smesso di seguire %s"
 
-#: include/user.php:39 mod/settings.php:375
+#: include/ostatus.php:1718
+msgid "stopped following"
+msgstr "tolto dai seguiti"
+
+#: include/text.php:315
+msgid "newer"
+msgstr "nuovi"
+
+#: include/text.php:316
+msgid "older"
+msgstr "vecchi"
+
+#: include/text.php:321
+msgid "first"
+msgstr "primo"
+
+#: include/text.php:322
+msgid "prev"
+msgstr "prec"
+
+#: include/text.php:356
+msgid "next"
+msgstr "succ"
+
+#: include/text.php:357
+msgid "last"
+msgstr "ultimo"
+
+#: include/text.php:411
+msgid "Loading more entries..."
+msgstr "Carico più elementi..."
+
+#: include/text.php:412
+msgid "The end"
+msgstr "Fine"
+
+#: include/text.php:961
+msgid "No contacts"
+msgstr "Nessun contatto"
+
+#: include/text.php:985
+#, php-format
+msgid "%d Contact"
+msgid_plural "%d Contacts"
+msgstr[0] "%d contatto"
+msgstr[1] "%d contatti"
+
+#: include/text.php:998
+msgid "View Contacts"
+msgstr "Visualizza i contatti"
+
+#: include/text.php:1088 mod/filer.php:32 mod/editpost.php:102
+#: mod/notes.php:64
+msgid "Save"
+msgstr "Salva"
+
+#: include/text.php:1149
+msgid "poke"
+msgstr "stuzzica"
+
+#: include/text.php:1149
+msgid "poked"
+msgstr "ha stuzzicato"
+
+#: include/text.php:1150
+msgid "ping"
+msgstr "invia un ping"
+
+#: include/text.php:1150
+msgid "pinged"
+msgstr "ha inviato un ping"
+
+#: include/text.php:1151
+msgid "prod"
+msgstr "pungola"
+
+#: include/text.php:1151
+msgid "prodded"
+msgstr "ha pungolato"
+
+#: include/text.php:1152
+msgid "slap"
+msgstr "schiaffeggia"
+
+#: include/text.php:1152
+msgid "slapped"
+msgstr "ha schiaffeggiato"
+
+#: include/text.php:1153
+msgid "finger"
+msgstr "tocca"
+
+#: include/text.php:1153
+msgid "fingered"
+msgstr "ha toccato"
+
+#: include/text.php:1154
+msgid "rebuff"
+msgstr "respingi"
+
+#: include/text.php:1154
+msgid "rebuffed"
+msgstr "ha respinto"
+
+#: include/text.php:1168
+msgid "happy"
+msgstr "felice"
+
+#: include/text.php:1169
+msgid "sad"
+msgstr "triste"
+
+#: include/text.php:1170
+msgid "mellow"
+msgstr "rilassato"
+
+#: include/text.php:1171
+msgid "tired"
+msgstr "stanco"
+
+#: include/text.php:1172
+msgid "perky"
+msgstr "vivace"
+
+#: include/text.php:1173
+msgid "angry"
+msgstr "arrabbiato"
+
+#: include/text.php:1174
+msgid "stupified"
+msgstr "stupefatto"
+
+#: include/text.php:1175
+msgid "puzzled"
+msgstr "confuso"
+
+#: include/text.php:1176
+msgid "interested"
+msgstr "interessato"
+
+#: include/text.php:1177
+msgid "bitter"
+msgstr "risentito"
+
+#: include/text.php:1178
+msgid "cheerful"
+msgstr "giocoso"
+
+#: include/text.php:1179
+msgid "alive"
+msgstr "vivo"
+
+#: include/text.php:1180
+msgid "annoyed"
+msgstr "annoiato"
+
+#: include/text.php:1181
+msgid "anxious"
+msgstr "ansioso"
+
+#: include/text.php:1182
+msgid "cranky"
+msgstr "irritabile"
+
+#: include/text.php:1183
+msgid "disturbed"
+msgstr "disturbato"
+
+#: include/text.php:1184
+msgid "frustrated"
+msgstr "frustato"
+
+#: include/text.php:1185
+msgid "motivated"
+msgstr "motivato"
+
+#: include/text.php:1186
+msgid "relaxed"
+msgstr "rilassato"
+
+#: include/text.php:1187
+msgid "surprised"
+msgstr "sorpreso"
+
+#: include/text.php:1220
+msgid "Sund"
+msgstr "Dom"
+
+#: include/text.php:1223
+msgid "Sep"
+msgstr "Set"
+
+#: include/text.php:1421 mod/videos.php:390
+msgid "View Video"
+msgstr "Guarda Video"
+
+#: include/text.php:1438
+msgid "bytes"
+msgstr "bytes"
+
+#: include/text.php:1473 include/text.php:1484
+msgid "Click to open/close"
+msgstr "Clicca per aprire/chiudere"
+
+#: include/text.php:1612
+msgid "View on separate page"
+msgstr "Vedi in una pagina separata"
+
+#: include/text.php:1613
+msgid "view on separate page"
+msgstr "vedi in una pagina separata"
+
+#: include/text.php:1898
+msgid "activity"
+msgstr "attività"
+
+#: include/text.php:1900 object/Item.php:416 object/Item.php:428
+msgid "comment"
+msgid_plural "comments"
+msgstr[0] "commento "
+msgstr[1] "commenti"
+
+#: include/text.php:1903
+msgid "post"
+msgstr "messaggio"
+
+#: include/text.php:2069
+msgid "Item filed"
+msgstr "Messaggio salvato"
+
+#: include/uimport.php:81
+msgid "Error decoding account file"
+msgstr "Errore decodificando il file account"
+
+#: include/uimport.php:87
+msgid "Error! No version data in file! This is not a Friendica account file?"
+msgstr "Errore! Nessuna informazione di versione nel file! Potrebbe non essere un file account di Friendica?"
+
+#: include/uimport.php:104 include/uimport.php:115
+msgid "Error! Cannot check nickname"
+msgstr "Errore! Non posso controllare il nickname"
+
+#: include/uimport.php:108 include/uimport.php:119
+#, php-format
+msgid "User '%s' already exists on this server!"
+msgstr "L'utente '%s' esiste già su questo server!"
+
+#: include/uimport.php:151
+msgid "User creation error"
+msgstr "Errore creando l'utente"
+
+#: include/uimport.php:174
+msgid "User profile creation error"
+msgstr "Errore creando il profilo dell'utente"
+
+#: include/uimport.php:224
+#, php-format
+msgid "%d contact not imported"
+msgid_plural "%d contacts not imported"
+msgstr[0] "%d contatto non importato"
+msgstr[1] "%d contatti non importati"
+
+#: include/uimport.php:290
+msgid "Done. You can now login with your username and password"
+msgstr "Fatto. Ora puoi entrare con il tuo nome utente e la tua password"
+
+#: include/user.php:41 mod/settings.php:373
 msgid "Passwords do not match. Password unchanged."
 msgstr "Le password non corrispondono. Password non cambiata."
 
-#: include/user.php:48
+#: include/user.php:50
 msgid "An invitation is required."
 msgstr "E' richiesto un invito."
 
-#: include/user.php:53
+#: include/user.php:55
 msgid "Invitation could not be verified."
 msgstr "L'invito non puo' essere verificato."
 
-#: include/user.php:61
+#: include/user.php:63
 msgid "Invalid OpenID url"
 msgstr "Url OpenID non valido"
 
-#: include/user.php:82
+#: include/user.php:84
 msgid "Please enter the required information."
 msgstr "Inserisci le informazioni richieste."
 
-#: include/user.php:96
+#: include/user.php:98
 msgid "Please use a shorter name."
 msgstr "Usa un nome più corto."
 
-#: include/user.php:98
+#: include/user.php:100
 msgid "Name too short."
 msgstr "Il nome è troppo corto."
 
-#: include/user.php:106
+#: include/user.php:108
 msgid "That doesn't appear to be your full (First Last) name."
 msgstr "Questo non sembra essere il tuo nome completo (Nome Cognome)."
 
-#: include/user.php:111
+#: include/user.php:113
 msgid "Your email domain is not among those allowed on this site."
 msgstr "Il dominio della tua email non è tra quelli autorizzati su questo sito."
 
-#: include/user.php:114
+#: include/user.php:116
 msgid "Not a valid email address."
 msgstr "L'indirizzo email non è valido."
 
-#: include/user.php:127
+#: include/user.php:129
 msgid "Cannot use that email."
 msgstr "Non puoi usare quell'email."
 
-#: include/user.php:133
+#: include/user.php:135
 msgid "Your \"nickname\" can only contain \"a-z\", \"0-9\" and \"_\"."
 msgstr "Il tuo nome utente può contenere solo \"a-z\", \"0-9\",  e \"_\"."
 
-#: include/user.php:140 include/user.php:228
+#: include/user.php:142 include/user.php:224
 msgid "Nickname is already registered. Please choose another."
 msgstr "Nome utente già registrato. Scegline un altro."
 
-#: include/user.php:150
+#: include/user.php:152
 msgid ""
 "Nickname was once registered here and may not be re-used. Please choose "
 "another."
 msgstr "Questo nome utente stato già registrato. Per favore, sceglierne uno nuovo."
 
-#: include/user.php:166
+#: include/user.php:168
 msgid "SERIOUS ERROR: Generation of security keys failed."
 msgstr "ERRORE GRAVE: La generazione delle chiavi di sicurezza è fallita."
 
-#: include/user.php:214
+#: include/user.php:210
 msgid "An error occurred during registration. Please try again."
 msgstr "C'è stato un errore durante la registrazione. Prova ancora."
 
-#: include/user.php:239 view/theme/duepuntozero/config.php:43
+#: include/user.php:233 view/theme/duepuntozero/config.php:47
 msgid "default"
 msgstr "default"
 
-#: include/user.php:249
+#: include/user.php:243
 msgid "An error occurred creating your default profile. Please try again."
 msgstr "C'è stato un errore nella creazione del tuo profilo. Prova ancora."
 
-#: include/user.php:309 include/user.php:317 include/user.php:325
-#: mod/profile_photo.php:74 mod/profile_photo.php:82 mod/profile_photo.php:90
-#: mod/profile_photo.php:215 mod/profile_photo.php:310
-#: mod/profile_photo.php:320 mod/photos.php:71 mod/photos.php:187
-#: mod/photos.php:774 mod/photos.php:1256 mod/photos.php:1277
-#: mod/photos.php:1863
-msgid "Profile Photos"
-msgstr "Foto del profilo"
-
-#: include/user.php:400
+#: include/user.php:393
 #, php-format
 msgid ""
 "\n"
@@ -2718,12 +3081,12 @@ msgid ""
 "\t"
 msgstr "\nCaro %1$s,\n   Grazie per la tua registrazione su %2$s. Il tuo account è in attesa di approvazione da parte di un amministratore.\n    "
 
-#: include/user.php:410
+#: include/user.php:403
 #, php-format
 msgid "Registration at %s"
 msgstr "Registrazione su %s"
 
-#: include/user.php:420
+#: include/user.php:413
 #, php-format
 msgid ""
 "\n"
@@ -2732,7 +3095,7 @@ msgid ""
 "\t"
 msgstr "\nGentile %1$s,\nGrazie per esserti registrato su %2$s. Il tuo account è stato creato."
 
-#: include/user.php:424
+#: include/user.php:417
 #, php-format
 msgid ""
 "\n"
@@ -2762,1232 +3125,904 @@ msgid ""
 "\t\tThank you and welcome to %2$s."
 msgstr "\nI dettagli del tuo utente sono:\n    Indirizzo del sito: %3$s\n    Nome utente: %1$s\n    Password: %5$s\n\nPuoi cambiare la tua password dalla pagina delle impostazioni del tuo account dopo esserti autenticato.\n\nPer favore, prenditi qualche momento per esaminare tutte le impostazioni presenti.\n\nPotresti voler aggiungere qualche informazione di base al tuo profilo predefinito (nella pagina \"Profili\"), così che le altre persone possano trovarti più facilmente.\n\nTi raccomandiamo di inserire il tuo nome completo, aggiungere una foto, aggiungere qualche parola chiave del profilo (molto utili per trovare nuovi contatti), e magari in quale nazione vivi, se non vuoi essere più specifico di così.\n\nNoi rispettiamo appieno la tua privacy, e nessuna di queste informazioni è necessaria o obbligatoria.\nSe sei nuovo e non conosci nessuno qui, possono aiutarti a trovare qualche nuovo e interessante contatto.\n\nGrazie e benvenuto su %2$s"
 
-#: include/user.php:456 mod/admin.php:1308
+#: include/user.php:449 mod/admin.php:1430
 #, php-format
 msgid "Registration details for %s"
 msgstr "Dettagli della registrazione di %s"
 
-#: include/dbstructure.php:20
-msgid "There are no tables on MyISAM."
-msgstr "Non ci sono tabelle MyISAM"
-
-#: include/dbstructure.php:61
-#, php-format
-msgid ""
-"\n"
-"\t\t\tThe friendica developers released update %s recently,\n"
-"\t\t\tbut when I tried to install it, something went terribly wrong.\n"
-"\t\t\tThis needs to be fixed soon and I can't do it alone. Please contact a\n"
-"\t\t\tfriendica developer if you can not help me on your own. My database might be invalid."
-msgstr "\nGli sviluppatori di Friendica hanno rilasciato l'aggiornamento %s\nrecentemente, ma quando ho provato a installarlo, qualcosa è \nandato terribilmente storto.\nBisogna sistemare le cose e non posso farlo da solo.\nContatta uno sviluppatore se non puoi aiutarmi da solo. Il mio database potrebbe essere invalido."
-
-#: include/dbstructure.php:66
-#, php-format
-msgid ""
-"The error message is\n"
-"[pre]%s[/pre]"
-msgstr "Il messaggio di errore è\n[pre]%s[/pre]"
-
-#: include/dbstructure.php:190
-#, php-format
-msgid ""
-"\n"
-"Error %d occurred during database update:\n"
-"%s\n"
-msgstr "\nErrore %d durante l'aggiornamento del database:\n%s\n"
-
-#: include/dbstructure.php:193
-msgid "Errors encountered performing database changes: "
-msgstr "Errori riscontrati eseguendo le modifiche al database:"
-
-#: include/dbstructure.php:201
-msgid ": Database update"
-msgstr ": Aggiornamento database"
-
-#: include/dbstructure.php:425
-#, php-format
-msgid "%s: updating %s table."
-msgstr "%s: aggiornando la tabella %s."
-
-#: include/dfrn.php:1251
-#, php-format
-msgid "%s\\'s birthday"
-msgstr "compleanno di %s"
-
-#: include/diaspora.php:2137
-msgid "Sharing notification from Diaspora network"
-msgstr "Notifica di condivisione dal network Diaspora*"
-
-#: include/diaspora.php:3146
-msgid "Attachments:"
-msgstr "Allegati:"
-
-#: include/items.php:1738 mod/dfrn_confirm.php:736 mod/dfrn_request.php:759
-msgid "[Name Withheld]"
-msgstr "[Nome Nascosto]"
-
-#: include/items.php:2123 mod/display.php:103 mod/display.php:279
-#: mod/display.php:484 mod/notice.php:15 mod/viewsrc.php:15 mod/admin.php:247
-#: mod/admin.php:1565 mod/admin.php:1816
-msgid "Item not found."
-msgstr "Elemento non trovato."
-
-#: include/items.php:2162
-msgid "Do you really want to delete this item?"
-msgstr "Vuoi veramente cancellare questo elemento?"
-
-#: include/items.php:2164 mod/api.php:105 mod/contacts.php:452
-#: mod/suggest.php:29 mod/dfrn_request.php:880 mod/follow.php:113
-#: mod/message.php:206 mod/profiles.php:640 mod/profiles.php:643
-#: mod/profiles.php:670 mod/register.php:245 mod/settings.php:1171
-#: mod/settings.php:1177 mod/settings.php:1184 mod/settings.php:1188
-#: mod/settings.php:1193 mod/settings.php:1198 mod/settings.php:1203
-#: mod/settings.php:1208 mod/settings.php:1234 mod/settings.php:1235
-#: mod/settings.php:1236 mod/settings.php:1237 mod/settings.php:1238
-msgid "Yes"
-msgstr "Si"
-
-#: include/items.php:2327 mod/allfriends.php:12 mod/api.php:26 mod/api.php:31
-#: mod/attach.php:33 mod/common.php:18 mod/contacts.php:360
-#: mod/crepair.php:102 mod/delegate.php:12 mod/display.php:481
-#: mod/editpost.php:10 mod/fsuggest.php:79 mod/invite.php:15
-#: mod/invite.php:103 mod/mood.php:115 mod/nogroup.php:27 mod/notes.php:23
-#: mod/ostatus_subscribe.php:9 mod/poke.php:154 mod/profile_photo.php:19
-#: mod/profile_photo.php:180 mod/profile_photo.php:191
-#: mod/profile_photo.php:204 mod/regmod.php:113 mod/repair_ostatus.php:9
-#: mod/suggest.php:58 mod/uimport.php:24 mod/viewcontacts.php:46
-#: mod/wall_attach.php:67 mod/wall_attach.php:70 mod/wallmessage.php:9
-#: mod/wallmessage.php:33 mod/wallmessage.php:73 mod/wallmessage.php:97
-#: mod/cal.php:299 mod/dfrn_confirm.php:61 mod/dirfind.php:11
-#: mod/events.php:185 mod/follow.php:11 mod/follow.php:74 mod/follow.php:158
-#: mod/group.php:19 mod/manage.php:102 mod/message.php:46 mod/message.php:171
-#: mod/network.php:4 mod/photos.php:166 mod/photos.php:1109
-#: mod/profiles.php:168 mod/profiles.php:607 mod/register.php:42
-#: mod/settings.php:22 mod/settings.php:130 mod/settings.php:668
-#: mod/wall_upload.php:101 mod/wall_upload.php:104 mod/item.php:196
-#: mod/item.php:208 mod/notifications.php:71 index.php:407
-msgid "Permission denied."
-msgstr "Permesso negato."
-
-#: include/items.php:2444
-msgid "Archives"
-msgstr "Archivi"
-
-#: include/ostatus.php:1947
-#, php-format
-msgid "%s is now following %s."
-msgstr "%s sta seguendo %s"
-
-#: include/ostatus.php:1948
-msgid "following"
-msgstr "segue"
-
-#: include/ostatus.php:1951
-#, php-format
-msgid "%s stopped following %s."
-msgstr "%s ha smesso di seguire %s"
-
-#: include/ostatus.php:1952
-msgid "stopped following"
-msgstr "tolto dai seguiti"
-
-#: include/text.php:307
-msgid "newer"
-msgstr "nuovi"
-
-#: include/text.php:308
-msgid "older"
-msgstr "vecchi"
-
-#: include/text.php:313
-msgid "first"
-msgstr "primo"
-
-#: include/text.php:314
-msgid "prev"
-msgstr "prec"
-
-#: include/text.php:348
-msgid "next"
-msgstr "succ"
-
-#: include/text.php:349
-msgid "last"
-msgstr "ultimo"
-
-#: include/text.php:403
-msgid "Loading more entries..."
-msgstr "Carico più elementi..."
-
-#: include/text.php:404
-msgid "The end"
-msgstr "Fine"
-
-#: include/text.php:955
-msgid "No contacts"
-msgstr "Nessun contatto"
-
-#: include/text.php:980
-#, php-format
-msgid "%d Contact"
-msgid_plural "%d Contacts"
-msgstr[0] "%d contatto"
-msgstr[1] "%d contatti"
-
-#: include/text.php:993
-msgid "View Contacts"
-msgstr "Visualizza i contatti"
-
-#: include/text.php:1081 mod/editpost.php:99 mod/filer.php:31 mod/notes.php:62
-msgid "Save"
-msgstr "Salva"
-
-#: include/text.php:1144
-msgid "poke"
-msgstr "stuzzica"
-
-#: include/text.php:1144
-msgid "poked"
-msgstr "ha stuzzicato"
-
-#: include/text.php:1145
-msgid "ping"
-msgstr "invia un ping"
-
-#: include/text.php:1145
-msgid "pinged"
-msgstr "ha inviato un ping"
-
-#: include/text.php:1146
-msgid "prod"
-msgstr "pungola"
-
-#: include/text.php:1146
-msgid "prodded"
-msgstr "ha pungolato"
-
-#: include/text.php:1147
-msgid "slap"
-msgstr "schiaffeggia"
-
-#: include/text.php:1147
-msgid "slapped"
-msgstr "ha schiaffeggiato"
-
-#: include/text.php:1148
-msgid "finger"
-msgstr "tocca"
-
-#: include/text.php:1148
-msgid "fingered"
-msgstr "ha toccato"
-
-#: include/text.php:1149
-msgid "rebuff"
-msgstr "respingi"
-
-#: include/text.php:1149
-msgid "rebuffed"
-msgstr "ha respinto"
-
-#: include/text.php:1163
-msgid "happy"
-msgstr "felice"
-
-#: include/text.php:1164
-msgid "sad"
-msgstr "triste"
-
-#: include/text.php:1165
-msgid "mellow"
-msgstr "rilassato"
-
-#: include/text.php:1166
-msgid "tired"
-msgstr "stanco"
-
-#: include/text.php:1167
-msgid "perky"
-msgstr "vivace"
-
-#: include/text.php:1168
-msgid "angry"
-msgstr "arrabbiato"
-
-#: include/text.php:1169
-msgid "stupified"
-msgstr "stupefatto"
-
-#: include/text.php:1170
-msgid "puzzled"
-msgstr "confuso"
-
-#: include/text.php:1171
-msgid "interested"
-msgstr "interessato"
-
-#: include/text.php:1172
-msgid "bitter"
-msgstr "risentito"
-
-#: include/text.php:1173
-msgid "cheerful"
-msgstr "giocoso"
-
-#: include/text.php:1174
-msgid "alive"
-msgstr "vivo"
-
-#: include/text.php:1175
-msgid "annoyed"
-msgstr "annoiato"
-
-#: include/text.php:1176
-msgid "anxious"
-msgstr "ansioso"
-
-#: include/text.php:1177
-msgid "cranky"
-msgstr "irritabile"
-
-#: include/text.php:1178
-msgid "disturbed"
-msgstr "disturbato"
-
-#: include/text.php:1179
-msgid "frustrated"
-msgstr "frustato"
-
-#: include/text.php:1180
-msgid "motivated"
-msgstr "motivato"
-
-#: include/text.php:1181
-msgid "relaxed"
-msgstr "rilassato"
-
-#: include/text.php:1182
-msgid "surprised"
-msgstr "sorpreso"
-
-#: include/text.php:1392 mod/videos.php:386
-msgid "View Video"
-msgstr "Guarda Video"
-
-#: include/text.php:1424
-msgid "bytes"
-msgstr "bytes"
-
-#: include/text.php:1456 include/text.php:1468
-msgid "Click to open/close"
-msgstr "Clicca per aprire/chiudere"
-
-#: include/text.php:1594
-msgid "View on separate page"
-msgstr "Vedi in una pagina separata"
-
-#: include/text.php:1595
-msgid "view on separate page"
-msgstr "vedi in una pagina separata"
-
-#: include/text.php:1874
-msgid "activity"
-msgstr "attività"
-
-#: include/text.php:1876 mod/content.php:623 object/Item.php:419
-#: object/Item.php:431
-msgid "comment"
-msgid_plural "comments"
-msgstr[0] ""
-msgstr[1] "commento"
-
-#: include/text.php:1877
-msgid "post"
-msgstr "messaggio"
-
-#: include/text.php:2045
-msgid "Item filed"
-msgstr "Messaggio salvato"
-
-#: mod/allfriends.php:46
-msgid "No friends to display."
-msgstr "Nessun amico da visualizzare."
-
-#: mod/api.php:76 mod/api.php:102
+#: mod/api.php:78 mod/api.php:104
 msgid "Authorize application connection"
 msgstr "Autorizza la connessione dell'applicazione"
 
-#: mod/api.php:77
+#: mod/api.php:79
 msgid "Return to your app and insert this Securty Code:"
 msgstr "Torna alla tua applicazione e inserisci questo codice di sicurezza:"
 
-#: mod/api.php:89
+#: mod/api.php:91
 msgid "Please login to continue."
 msgstr "Effettua il login per continuare."
 
-#: mod/api.php:104
+#: mod/api.php:106
 msgid ""
 "Do you want to authorize this application to access your posts and contacts,"
 " and/or create new posts for you?"
 msgstr "Vuoi autorizzare questa applicazione per accedere ai messaggi e ai contatti, e / o creare nuovi messaggi per te?"
 
-#: mod/api.php:106 mod/dfrn_request.php:880 mod/follow.php:113
-#: mod/profiles.php:640 mod/profiles.php:644 mod/profiles.php:670
-#: mod/register.php:246 mod/settings.php:1171 mod/settings.php:1177
-#: mod/settings.php:1184 mod/settings.php:1188 mod/settings.php:1193
-#: mod/settings.php:1198 mod/settings.php:1203 mod/settings.php:1208
-#: mod/settings.php:1234 mod/settings.php:1235 mod/settings.php:1236
-#: mod/settings.php:1237 mod/settings.php:1238
+#: mod/api.php:108 mod/dfrn_request.php:881 mod/follow.php:150
+#: mod/profiles.php:639 mod/profiles.php:643 mod/profiles.php:669
+#: mod/register.php:251 mod/settings.php:1158 mod/settings.php:1164
+#: mod/settings.php:1171 mod/settings.php:1175 mod/settings.php:1180
+#: mod/settings.php:1185 mod/settings.php:1190 mod/settings.php:1195
+#: mod/settings.php:1221 mod/settings.php:1222 mod/settings.php:1223
+#: mod/settings.php:1224 mod/settings.php:1225
 msgid "No"
 msgstr "No"
 
-#: mod/apps.php:7 index.php:254
+#: mod/apps.php:9 index.php:259
 msgid "You must be logged in to use addons. "
 msgstr "Devi aver effettuato il login per usare i componenti aggiuntivi."
 
-#: mod/apps.php:11
+#: mod/apps.php:14
 msgid "Applications"
 msgstr "Applicazioni"
 
-#: mod/apps.php:14
+#: mod/apps.php:17
 msgid "No installed applications."
 msgstr "Nessuna applicazione installata."
 
-#: mod/attach.php:8
+#: mod/attach.php:10
 msgid "Item not available."
 msgstr "Oggetto non disponibile."
 
-#: mod/attach.php:20
+#: mod/attach.php:22
 msgid "Item was not found."
 msgstr "Oggetto non trovato."
 
-#: mod/bookmarklet.php:41
-msgid "The post was created"
-msgstr "Il messaggio è stato creato"
+#: mod/babel.php:18
+msgid "Source (bbcode) text:"
+msgstr "Testo sorgente (bbcode):"
 
-#: mod/common.php:91
+#: mod/babel.php:25
+msgid "Source (Diaspora) text to convert to BBcode:"
+msgstr "Testo sorgente (da Diaspora) da convertire in BBcode:"
+
+#: mod/babel.php:33
+msgid "Source input: "
+msgstr "Sorgente:"
+
+#: mod/babel.php:37
+msgid "bb2html (raw HTML): "
+msgstr "bb2html (HTML grezzo):"
+
+#: mod/babel.php:41
+msgid "bb2html: "
+msgstr "bb2html:"
+
+#: mod/babel.php:45
+msgid "bb2html2bb: "
+msgstr "bb2html2bb: "
+
+#: mod/babel.php:49
+msgid "bb2md: "
+msgstr "bb2md: "
+
+#: mod/babel.php:53
+msgid "bb2md2html: "
+msgstr "bb2md2html: "
+
+#: mod/babel.php:57
+msgid "bb2dia2bb: "
+msgstr "bb2dia2bb: "
+
+#: mod/babel.php:61
+msgid "bb2md2html2bb: "
+msgstr "bb2md2html2bb: "
+
+#: mod/babel.php:67
+msgid "Source input (Diaspora format): "
+msgstr "Sorgente (formato Diaspora):"
+
+#: mod/babel.php:71
+msgid "diaspora2bb: "
+msgstr "diaspora2bb: "
+
+#: mod/common.php:93
 msgid "No contacts in common."
 msgstr "Nessun contatto in comune."
 
-#: mod/common.php:141 mod/contacts.php:871
+#: mod/common.php:143 mod/contacts.php:893
 msgid "Common Friends"
 msgstr "Amici in comune"
 
-#: mod/contacts.php:134
-#, php-format
-msgid "%d contact edited."
-msgid_plural "%d contacts edited."
-msgstr[0] "%d contatto modificato."
-msgstr[1] "%d contatti modificati"
-
-#: mod/contacts.php:169 mod/contacts.php:378
-msgid "Could not access contact record."
-msgstr "Non è possibile accedere al contatto."
-
-#: mod/contacts.php:183
-msgid "Could not locate selected profile."
-msgstr "Non riesco a trovare il profilo selezionato."
-
-#: mod/contacts.php:216
-msgid "Contact updated."
-msgstr "Contatto aggiornato."
-
-#: mod/contacts.php:218 mod/dfrn_request.php:593
-msgid "Failed to update contact record."
-msgstr "Errore nell'aggiornamento del contatto."
-
-#: mod/contacts.php:399
-msgid "Contact has been blocked"
-msgstr "Il contatto è stato bloccato"
-
-#: mod/contacts.php:399
-msgid "Contact has been unblocked"
-msgstr "Il contatto è stato sbloccato"
-
-#: mod/contacts.php:410
-msgid "Contact has been ignored"
-msgstr "Il contatto è ignorato"
-
-#: mod/contacts.php:410
-msgid "Contact has been unignored"
-msgstr "Il contatto non è più ignorato"
-
-#: mod/contacts.php:422
-msgid "Contact has been archived"
-msgstr "Il contatto è stato archiviato"
-
-#: mod/contacts.php:422
-msgid "Contact has been unarchived"
-msgstr "Il contatto è stato dearchiviato"
-
-#: mod/contacts.php:447
-msgid "Drop contact"
-msgstr "Cancella contatto"
-
-#: mod/contacts.php:450 mod/contacts.php:809
-msgid "Do you really want to delete this contact?"
-msgstr "Vuoi veramente cancellare questo contatto?"
-
-#: mod/contacts.php:469
-msgid "Contact has been removed."
-msgstr "Il contatto è stato rimosso."
-
-#: mod/contacts.php:506
-#, php-format
-msgid "You are mutual friends with %s"
-msgstr "Sei amico reciproco con %s"
-
-#: mod/contacts.php:510
-#, php-format
-msgid "You are sharing with %s"
-msgstr "Stai condividendo con %s"
-
-#: mod/contacts.php:515
-#, php-format
-msgid "%s is sharing with you"
-msgstr "%s sta condividendo con te"
-
-#: mod/contacts.php:535
-msgid "Private communications are not available for this contact."
-msgstr "Le comunicazioni private non sono disponibili per questo contatto."
-
-#: mod/contacts.php:538 mod/admin.php:978
-msgid "Never"
-msgstr "Mai"
-
-#: mod/contacts.php:542
-msgid "(Update was successful)"
-msgstr "(L'aggiornamento è stato completato)"
-
-#: mod/contacts.php:542
-msgid "(Update was not successful)"
-msgstr "(L'aggiornamento non è stato completato)"
-
-#: mod/contacts.php:544 mod/contacts.php:972
-msgid "Suggest friends"
-msgstr "Suggerisci amici"
-
-#: mod/contacts.php:548
-#, php-format
-msgid "Network type: %s"
-msgstr "Tipo di rete: %s"
-
-#: mod/contacts.php:561
-msgid "Communications lost with this contact!"
-msgstr "Comunicazione con questo contatto persa!"
-
-#: mod/contacts.php:564
-msgid "Fetch further information for feeds"
-msgstr "Recupera maggiori informazioni per i feed"
-
-#: mod/contacts.php:565 mod/admin.php:987
-msgid "Disabled"
-msgstr "Disabilitato"
-
-#: mod/contacts.php:565
-msgid "Fetch information"
-msgstr "Recupera informazioni"
-
-#: mod/contacts.php:565
-msgid "Fetch information and keywords"
-msgstr "Recupera informazioni e parole chiave"
-
-#: mod/contacts.php:583
-msgid "Contact"
-msgstr "Contatto"
-
-#: mod/contacts.php:585 mod/content.php:728 mod/crepair.php:156
-#: mod/fsuggest.php:108 mod/invite.php:142 mod/localtime.php:45
-#: mod/mood.php:138 mod/poke.php:203 mod/events.php:505 mod/manage.php:155
-#: mod/message.php:338 mod/message.php:521 mod/photos.php:1141
-#: mod/photos.php:1271 mod/photos.php:1597 mod/photos.php:1646
-#: mod/photos.php:1688 mod/photos.php:1768 mod/profiles.php:681
-#: mod/install.php:242 mod/install.php:282 object/Item.php:705
-#: view/theme/duepuntozero/config.php:61 view/theme/frio/config.php:64
-#: view/theme/quattro/config.php:67 view/theme/vier/config.php:112
-msgid "Submit"
-msgstr "Invia"
-
-#: mod/contacts.php:586
-msgid "Profile Visibility"
-msgstr "Visibilità del profilo"
-
-#: mod/contacts.php:587
-#, php-format
-msgid ""
-"Please choose the profile you would like to display to %s when viewing your "
-"profile securely."
-msgstr "Seleziona il profilo che vuoi mostrare a %s quando visita il tuo profilo in modo sicuro."
-
-#: mod/contacts.php:588
-msgid "Contact Information / Notes"
-msgstr "Informazioni / Note sul contatto"
-
-#: mod/contacts.php:589
-msgid "Edit contact notes"
-msgstr "Modifica note contatto"
-
-#: mod/contacts.php:594 mod/contacts.php:938 mod/nogroup.php:43
-#: mod/viewcontacts.php:102
-#, php-format
-msgid "Visit %s's profile [%s]"
-msgstr "Visita il profilo di %s [%s]"
-
-#: mod/contacts.php:595
-msgid "Block/Unblock contact"
-msgstr "Blocca/Sblocca contatto"
-
-#: mod/contacts.php:596
-msgid "Ignore contact"
-msgstr "Ignora il contatto"
-
-#: mod/contacts.php:597
-msgid "Repair URL settings"
-msgstr "Impostazioni riparazione URL"
-
-#: mod/contacts.php:598
-msgid "View conversations"
-msgstr "Vedi conversazioni"
-
-#: mod/contacts.php:604
-msgid "Last update:"
-msgstr "Ultimo aggiornamento:"
-
-#: mod/contacts.php:606
-msgid "Update public posts"
-msgstr "Aggiorna messaggi pubblici"
-
-#: mod/contacts.php:608 mod/contacts.php:982
-msgid "Update now"
-msgstr "Aggiorna adesso"
-
-#: mod/contacts.php:613 mod/contacts.php:813 mod/contacts.php:991
-#: mod/admin.php:1510
-msgid "Unblock"
-msgstr "Sblocca"
-
-#: mod/contacts.php:613 mod/contacts.php:813 mod/contacts.php:991
-#: mod/admin.php:1509
-msgid "Block"
-msgstr "Blocca"
-
-#: mod/contacts.php:614 mod/contacts.php:814 mod/contacts.php:999
-msgid "Unignore"
-msgstr "Non ignorare"
-
-#: mod/contacts.php:614 mod/contacts.php:814 mod/contacts.php:999
-#: mod/notifications.php:60 mod/notifications.php:179
-#: mod/notifications.php:263
-msgid "Ignore"
-msgstr "Ignora"
-
-#: mod/contacts.php:618
-msgid "Currently blocked"
-msgstr "Bloccato"
-
-#: mod/contacts.php:619
-msgid "Currently ignored"
-msgstr "Ignorato"
-
-#: mod/contacts.php:620
-msgid "Currently archived"
-msgstr "Al momento archiviato"
-
-#: mod/contacts.php:621 mod/notifications.php:172 mod/notifications.php:251
-msgid "Hide this contact from others"
-msgstr "Nascondi questo contatto agli altri"
-
-#: mod/contacts.php:621
-msgid ""
-"Replies/likes to your public posts may still be visible"
-msgstr "Risposte ai tuoi post pubblici possono essere comunque visibili"
-
-#: mod/contacts.php:622
-msgid "Notification for new posts"
-msgstr "Notifica per i nuovi messaggi"
-
-#: mod/contacts.php:622
-msgid "Send a notification of every new post of this contact"
-msgstr "Invia una notifica per ogni nuovo messaggio di questo contatto"
-
-#: mod/contacts.php:625
-msgid "Blacklisted keywords"
-msgstr "Parole chiave in blacklist"
-
-#: mod/contacts.php:625
-msgid ""
-"Comma separated list of keywords that should not be converted to hashtags, "
-"when \"Fetch information and keywords\" is selected"
-msgstr "Lista separata da virgola di parole chiave che non dovranno essere convertite in hashtag, quando \"Recupera informazioni e parole chiave\" è selezionato"
-
-#: mod/contacts.php:632 mod/follow.php:129 mod/notifications.php:255
-msgid "Profile URL"
-msgstr "URL Profilo"
-
-#: mod/contacts.php:643
-msgid "Actions"
-msgstr "Azioni"
-
-#: mod/contacts.php:646
-msgid "Contact Settings"
-msgstr "Impostazioni Contatto"
-
-#: mod/contacts.php:692
-msgid "Suggestions"
-msgstr "Suggerimenti"
-
-#: mod/contacts.php:695
-msgid "Suggest potential friends"
-msgstr "Suggerisci potenziali amici"
-
-#: mod/contacts.php:700 mod/group.php:212
-msgid "All Contacts"
-msgstr "Tutti i contatti"
-
-#: mod/contacts.php:703
-msgid "Show all contacts"
-msgstr "Mostra tutti i contatti"
-
-#: mod/contacts.php:708
-msgid "Unblocked"
-msgstr "Sbloccato"
-
-#: mod/contacts.php:711
-msgid "Only show unblocked contacts"
-msgstr "Mostra solo contatti non bloccati"
-
-#: mod/contacts.php:717
-msgid "Blocked"
-msgstr "Bloccato"
-
-#: mod/contacts.php:720
-msgid "Only show blocked contacts"
-msgstr "Mostra solo contatti bloccati"
-
-#: mod/contacts.php:726
-msgid "Ignored"
-msgstr "Ignorato"
-
-#: mod/contacts.php:729
-msgid "Only show ignored contacts"
-msgstr "Mostra solo contatti ignorati"
-
-#: mod/contacts.php:735
-msgid "Archived"
-msgstr "Archiviato"
-
-#: mod/contacts.php:738
-msgid "Only show archived contacts"
-msgstr "Mostra solo contatti archiviati"
-
-#: mod/contacts.php:744
-msgid "Hidden"
-msgstr "Nascosto"
-
-#: mod/contacts.php:747
-msgid "Only show hidden contacts"
-msgstr "Mostra solo contatti nascosti"
-
-#: mod/contacts.php:804
-msgid "Search your contacts"
-msgstr "Cerca nei tuoi contatti"
-
-#: mod/contacts.php:805 mod/network.php:151 mod/search.php:227
-#, php-format
-msgid "Results for: %s"
-msgstr "Risultati per: %s"
-
-#: mod/contacts.php:812 mod/settings.php:160 mod/settings.php:707
-msgid "Update"
-msgstr "Aggiorna"
-
-#: mod/contacts.php:815 mod/contacts.php:1007
-msgid "Archive"
-msgstr "Archivia"
-
-#: mod/contacts.php:815 mod/contacts.php:1007
-msgid "Unarchive"
-msgstr "Dearchivia"
-
-#: mod/contacts.php:818
-msgid "Batch Actions"
-msgstr "Azioni Batch"
-
-#: mod/contacts.php:864
-msgid "View all contacts"
-msgstr "Vedi tutti i contatti"
-
-#: mod/contacts.php:874
-msgid "View all common friends"
-msgstr "Vedi tutti gli amici in comune"
-
-#: mod/contacts.php:881
-msgid "Advanced Contact Settings"
-msgstr "Impostazioni avanzate Contatto"
-
-#: mod/contacts.php:915
-msgid "Mutual Friendship"
-msgstr "Amicizia reciproca"
-
-#: mod/contacts.php:919
-msgid "is a fan of yours"
-msgstr "è un tuo fan"
-
-#: mod/contacts.php:923
-msgid "you are a fan of"
-msgstr "sei un fan di"
-
-#: mod/contacts.php:939 mod/nogroup.php:44
-msgid "Edit contact"
-msgstr "Modifica contatto"
-
-#: mod/contacts.php:993
-msgid "Toggle Blocked status"
-msgstr "Inverti stato \"Blocca\""
-
-#: mod/contacts.php:1001
-msgid "Toggle Ignored status"
-msgstr "Inverti stato \"Ignora\""
-
-#: mod/contacts.php:1009
-msgid "Toggle Archive status"
-msgstr "Inverti stato \"Archiviato\""
-
-#: mod/contacts.php:1017
-msgid "Delete contact"
-msgstr "Rimuovi contatto"
-
-#: mod/content.php:119 mod/network.php:475
-msgid "No such group"
-msgstr "Nessun gruppo"
-
-#: mod/content.php:130 mod/group.php:213 mod/network.php:502
-msgid "Group is empty"
-msgstr "Il gruppo è vuoto"
-
-#: mod/content.php:135 mod/network.php:506
-#, php-format
-msgid "Group: %s"
-msgstr "Gruppo: %s"
-
-#: mod/content.php:325 object/Item.php:96
-msgid "This entry was edited"
-msgstr "Questa voce è stata modificata"
-
-#: mod/content.php:621 object/Item.php:417
-#, php-format
-msgid "%d comment"
-msgid_plural "%d comments"
-msgstr[0] "%d commento"
-msgstr[1] "%d commenti"
-
-#: mod/content.php:638 mod/photos.php:1429 object/Item.php:117
-msgid "Private Message"
-msgstr "Messaggio privato"
-
-#: mod/content.php:702 mod/photos.php:1625 object/Item.php:274
-msgid "I like this (toggle)"
-msgstr "Mi piace (clic per cambiare)"
-
-#: mod/content.php:702 object/Item.php:274
-msgid "like"
-msgstr "mi piace"
-
-#: mod/content.php:703 mod/photos.php:1626 object/Item.php:275
-msgid "I don't like this (toggle)"
-msgstr "Non mi piace (clic per cambiare)"
-
-#: mod/content.php:703 object/Item.php:275
-msgid "dislike"
-msgstr "non mi piace"
-
-#: mod/content.php:705 object/Item.php:278
-msgid "Share this"
-msgstr "Condividi questo"
-
-#: mod/content.php:705 object/Item.php:278
-msgid "share"
-msgstr "condividi"
-
-#: mod/content.php:725 mod/photos.php:1643 mod/photos.php:1685
-#: mod/photos.php:1765 object/Item.php:702
-msgid "This is you"
-msgstr "Questo sei tu"
-
-#: mod/content.php:727 mod/content.php:950 mod/photos.php:1645
-#: mod/photos.php:1687 mod/photos.php:1767 object/Item.php:392
-#: object/Item.php:704
-msgid "Comment"
-msgstr "Commento"
-
-#: mod/content.php:729 object/Item.php:706
-msgid "Bold"
-msgstr "Grassetto"
-
-#: mod/content.php:730 object/Item.php:707
-msgid "Italic"
-msgstr "Corsivo"
-
-#: mod/content.php:731 object/Item.php:708
-msgid "Underline"
-msgstr "Sottolineato"
-
-#: mod/content.php:732 object/Item.php:709
-msgid "Quote"
-msgstr "Citazione"
-
-#: mod/content.php:733 object/Item.php:710
-msgid "Code"
-msgstr "Codice"
-
-#: mod/content.php:734 object/Item.php:711
-msgid "Image"
-msgstr "Immagine"
-
-#: mod/content.php:735 object/Item.php:712
-msgid "Link"
-msgstr "Link"
-
-#: mod/content.php:736 object/Item.php:713
-msgid "Video"
-msgstr "Video"
-
-#: mod/content.php:746 mod/settings.php:743 object/Item.php:122
-#: object/Item.php:124
-msgid "Edit"
-msgstr "Modifica"
-
-#: mod/content.php:772 object/Item.php:238
-msgid "add star"
-msgstr "aggiungi a speciali"
-
-#: mod/content.php:773 object/Item.php:239
-msgid "remove star"
-msgstr "rimuovi da speciali"
-
-#: mod/content.php:774 object/Item.php:240
-msgid "toggle star status"
-msgstr "Inverti stato preferito"
-
-#: mod/content.php:777 object/Item.php:243
-msgid "starred"
-msgstr "preferito"
-
-#: mod/content.php:778 mod/content.php:800 object/Item.php:263
-msgid "add tag"
-msgstr "aggiungi tag"
-
-#: mod/content.php:789 object/Item.php:251
-msgid "ignore thread"
-msgstr "ignora la discussione"
-
-#: mod/content.php:790 object/Item.php:252
-msgid "unignore thread"
-msgstr "non ignorare la discussione"
-
-#: mod/content.php:791 object/Item.php:253
-msgid "toggle ignore status"
-msgstr "inverti stato \"Ignora\""
-
-#: mod/content.php:794 mod/ostatus_subscribe.php:73 object/Item.php:256
-msgid "ignored"
-msgstr "ignorato"
-
-#: mod/content.php:805 object/Item.php:141
-msgid "save to folder"
-msgstr "salva nella cartella"
-
-#: mod/content.php:853 object/Item.php:212
-msgid "I will attend"
-msgstr "Parteciperò"
-
-#: mod/content.php:853 object/Item.php:212
-msgid "I will not attend"
-msgstr "Non parteciperò"
-
-#: mod/content.php:853 object/Item.php:212
-msgid "I might attend"
-msgstr "Forse parteciperò"
-
-#: mod/content.php:917 object/Item.php:358
-msgid "to"
-msgstr "a"
-
-#: mod/content.php:918 object/Item.php:360
-msgid "Wall-to-Wall"
-msgstr "Da bacheca a bacheca"
-
-#: mod/content.php:919 object/Item.php:361
-msgid "via Wall-To-Wall:"
-msgstr "da bacheca a bacheca"
-
-#: mod/credits.php:16
+#: mod/credits.php:19
 msgid "Credits"
 msgstr "Crediti"
 
-#: mod/credits.php:17
+#: mod/credits.php:20
 msgid ""
 "Friendica is a community project, that would not be possible without the "
 "help of many people. Here is a list of those who have contributed to the "
 "code or the translation of Friendica. Thank you all!"
 msgstr "Friendica è un progetto comunitario, che non sarebbe stato possibile realizzare senza l'aiuto di molte persone.\nQuesta è una lista di chi ha contribuito al codice o alle traduzioni di Friendica. Grazie a tutti!"
 
-#: mod/crepair.php:89
+#: mod/crepair.php:92
 msgid "Contact settings applied."
 msgstr "Contatto modificato."
 
-#: mod/crepair.php:91
+#: mod/crepair.php:94
 msgid "Contact update failed."
 msgstr "Le modifiche al contatto non sono state salvate."
 
-#: mod/crepair.php:116 mod/fsuggest.php:21 mod/fsuggest.php:93
-#: mod/dfrn_confirm.php:126
+#: mod/crepair.php:119 mod/dfrn_confirm.php:130 mod/fsuggest.php:23
+#: mod/fsuggest.php:95
 msgid "Contact not found."
 msgstr "Contatto non trovato."
 
-#: mod/crepair.php:122
+#: mod/crepair.php:125
 msgid ""
 "WARNING: This is highly advanced and if you enter incorrect"
 " information your communications with this contact may stop working."
 msgstr "ATTENZIONE: Queste sono impostazioni avanzate e se inserisci informazioni errate le tue comunicazioni con questo contatto potrebbero non funzionare più"
 
-#: mod/crepair.php:123
+#: mod/crepair.php:126
 msgid ""
 "Please use your browser 'Back' button now if you are "
 "uncertain what to do on this page."
 msgstr "Usa ora il tasto 'Indietro' del tuo browser se non sei sicuro di cosa fare in questa pagina."
 
-#: mod/crepair.php:136 mod/crepair.php:138
+#: mod/crepair.php:139 mod/crepair.php:141
 msgid "No mirroring"
 msgstr "Non duplicare"
 
-#: mod/crepair.php:136
+#: mod/crepair.php:139
 msgid "Mirror as forwarded posting"
 msgstr "Duplica come messaggi ricondivisi"
 
-#: mod/crepair.php:136 mod/crepair.php:138
+#: mod/crepair.php:139 mod/crepair.php:141
 msgid "Mirror as my own posting"
 msgstr "Duplica come miei messaggi"
 
-#: mod/crepair.php:152
+#: mod/crepair.php:155
 msgid "Return to contact editor"
 msgstr "Ritorna alla modifica contatto"
 
-#: mod/crepair.php:154
+#: mod/crepair.php:157
 msgid "Refetch contact data"
 msgstr "Ricarica dati contatto"
 
-#: mod/crepair.php:158
+#: mod/crepair.php:159 mod/invite.php:150 mod/localtime.php:47
+#: mod/manage.php:157 mod/message.php:338 mod/message.php:521
+#: mod/install.php:243 mod/install.php:283 mod/contacts.php:605
+#: mod/events.php:529 mod/fsuggest.php:110 mod/mood.php:141
+#: mod/photos.php:1127 mod/photos.php:1248 mod/photos.php:1574
+#: mod/photos.php:1623 mod/photos.php:1665 mod/photos.php:1745
+#: mod/poke.php:206 mod/profiles.php:680 object/Item.php:702
+#: view/theme/duepuntozero/config.php:65 view/theme/frio/config.php:108
+#: view/theme/quattro/config.php:71 view/theme/vier/config.php:114
+msgid "Submit"
+msgstr "Invia"
+
+#: mod/crepair.php:161
 msgid "Remote Self"
 msgstr "Io remoto"
 
-#: mod/crepair.php:161
+#: mod/crepair.php:164
 msgid "Mirror postings from this contact"
 msgstr "Ripeti i messaggi di questo contatto"
 
-#: mod/crepair.php:163
+#: mod/crepair.php:166
 msgid ""
 "Mark this contact as remote_self, this will cause friendica to repost new "
 "entries from this contact."
 msgstr "Imposta questo contatto come 'io remoto', questo farà si che friendica re invii i nuovi messaggi da questo contatto."
 
-#: mod/crepair.php:167 mod/settings.php:683 mod/settings.php:709
-#: mod/admin.php:1490 mod/admin.php:1503 mod/admin.php:1516 mod/admin.php:1532
+#: mod/crepair.php:170 mod/admin.php:1612 mod/admin.php:1625
+#: mod/admin.php:1638 mod/admin.php:1654 mod/settings.php:693
+#: mod/settings.php:719
 msgid "Name"
 msgstr "Nome"
 
-#: mod/crepair.php:168
+#: mod/crepair.php:171
 msgid "Account Nickname"
 msgstr "Nome utente"
 
-#: mod/crepair.php:169
+#: mod/crepair.php:172
 msgid "@Tagname - overrides Name/Nickname"
 msgstr "@TagName - al posto del nome utente"
 
-#: mod/crepair.php:170
+#: mod/crepair.php:173
 msgid "Account URL"
 msgstr "URL dell'utente"
 
-#: mod/crepair.php:171
+#: mod/crepair.php:174
 msgid "Friend Request URL"
 msgstr "URL Richiesta Amicizia"
 
-#: mod/crepair.php:172
+#: mod/crepair.php:175
 msgid "Friend Confirm URL"
 msgstr "URL Conferma Amicizia"
 
-#: mod/crepair.php:173
+#: mod/crepair.php:176
 msgid "Notification Endpoint URL"
 msgstr "URL Notifiche"
 
-#: mod/crepair.php:174
+#: mod/crepair.php:177
 msgid "Poll/Feed URL"
 msgstr "URL Feed"
 
-#: mod/crepair.php:175
+#: mod/crepair.php:178
 msgid "New photo from this URL"
 msgstr "Nuova foto da questo URL"
 
-#: mod/delegate.php:101
-msgid "No potential page delegates located."
-msgstr "Nessun potenziale delegato per la pagina è stato trovato."
+#: mod/filer.php:31
+msgid "- select -"
+msgstr "- seleziona -"
 
-#: mod/delegate.php:132
+#: mod/lockview.php:33 mod/lockview.php:41
+msgid "Remote privacy information not available."
+msgstr "Informazioni remote sulla privacy non disponibili."
+
+#: mod/lockview.php:50
+msgid "Visible to:"
+msgstr "Visibile a:"
+
+#: mod/maintenance.php:21
+msgid "System down for maintenance"
+msgstr "Sistema in manutenzione"
+
+#: mod/newmember.php:7
+msgid "Welcome to Friendica"
+msgstr "Benvenuto su Friendica"
+
+#: mod/newmember.php:8
+msgid "New Member Checklist"
+msgstr "Cose da fare per i Nuovi Utenti"
+
+#: mod/newmember.php:10
 msgid ""
-"Delegates are able to manage all aspects of this account/page except for "
-"basic account settings. Please do not delegate your personal account to "
-"anybody that you do not trust completely."
-msgstr "I Delegati sono in grado di gestire tutti gli aspetti di questa pagina, tranne per le impostazioni di base dell'account. Non delegare il tuo account personale a nessuno di cui non ti fidi ciecamente."
+"We would like to offer some tips and links to help make your experience "
+"enjoyable. Click any item to visit the relevant page. A link to this page "
+"will be visible from your home page for two weeks after your initial "
+"registration and then will quietly disappear."
+msgstr "Vorremmo offrirti qualche trucco e dei link alla guida per aiutarti ad avere un'esperienza divertente. Clicca su un qualsiasi elemento per visitare la relativa pagina. Un link a questa pagina sarà visibile nella tua home per due settimane dopo la tua registrazione."
 
-#: mod/delegate.php:133
-msgid "Existing Page Managers"
-msgstr "Gestori Pagina Esistenti"
+#: mod/newmember.php:11
+msgid "Getting Started"
+msgstr "Come Iniziare"
 
-#: mod/delegate.php:135
-msgid "Existing Page Delegates"
-msgstr "Delegati Pagina Esistenti"
+#: mod/newmember.php:13
+msgid "Friendica Walk-Through"
+msgstr "Friendica Passo-Passo"
 
-#: mod/delegate.php:137
-msgid "Potential Delegates"
-msgstr "Delegati Potenziali"
+#: mod/newmember.php:13
+msgid ""
+"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."
+msgstr "Sulla tua pagina Quick Start - veloce introduzione alla tua pagina profilo e alla pagina Rete, fai qualche nuova amicizia, e trova qualche gruppo a cui unirti."
 
-#: mod/delegate.php:139 mod/tagrm.php:95
-msgid "Remove"
-msgstr "Rimuovi"
+#: mod/newmember.php:17
+msgid "Go to Your Settings"
+msgstr "Vai alle tue Impostazioni"
 
-#: mod/delegate.php:140
-msgid "Add"
-msgstr "Aggiungi"
+#: mod/newmember.php:17
+msgid ""
+"On your Settings page -  change your initial password. Also make a "
+"note of your Identity Address. This looks just like an email address - and "
+"will be useful in making friends on the free social web."
+msgstr "Nella tua pagina Impostazioni - cambia la tua password iniziale. Prendi anche nota del tuo Indirizzo Identità. Assomiglia a un indirizzo email e sarà utile per stringere amicizie nel web sociale libero."
 
-#: mod/delegate.php:141
-msgid "No entries."
-msgstr "Nessuna voce."
+#: mod/newmember.php:18
+msgid ""
+"Review the other settings, particularly the privacy settings. An unpublished"
+" directory listing is like having an unlisted phone number. In general, you "
+"should probably publish your listing - unless all of your friends and "
+"potential friends know exactly how to find you."
+msgstr "Guarda le altre impostazioni, in particolare le impostazioni della privacy. Un profilo non pubblicato è come un numero di telefono non in elenco. In genere, dovresti pubblicare il tuo profilo - a meno che tutti i tuoi amici e potenziali tali sappiano esattamente come trovarti."
 
-#: mod/dfrn_poll.php:104 mod/dfrn_poll.php:539
+#: mod/newmember.php:22 mod/profile_photo.php:257 mod/profiles.php:699
+msgid "Upload Profile Photo"
+msgstr "Carica la foto del profilo"
+
+#: mod/newmember.php:22
+msgid ""
+"Upload a profile photo if you have not done so already. Studies have shown "
+"that people with real photos of themselves are ten times more likely to make"
+" friends than people who do not."
+msgstr "Carica una foto del profilo se non l'hai ancora fatto. Studi hanno mostrato che persone che hanno vere foto di se stessi hanno dieci volte più probabilità di fare amicizie rispetto alle persone che non ce l'hanno."
+
+#: mod/newmember.php:23
+msgid "Edit Your Profile"
+msgstr "Modifica il tuo Profilo"
+
+#: mod/newmember.php:23
+msgid ""
+"Edit your default profile to your liking. Review the "
+"settings for hiding your list of friends and hiding the profile from unknown"
+" visitors."
+msgstr "Modifica il tuo profilo predefinito a piacimento. Rivedi le impostazioni per nascondere la tua lista di amici e nascondere il profilo ai visitatori sconosciuti."
+
+#: mod/newmember.php:24
+msgid "Profile Keywords"
+msgstr "Parole chiave del profilo"
+
+#: mod/newmember.php:24
+msgid ""
+"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."
+msgstr "Inserisci qualche parola chiave pubblica nel tuo profilo predefinito che descriva i tuoi interessi. Potremmo essere in grado di trovare altre persone con interessi similari e suggerirti delle amicizie."
+
+#: mod/newmember.php:26
+msgid "Connecting"
+msgstr "Collegarsi"
+
+#: mod/newmember.php:32
+msgid "Importing Emails"
+msgstr "Importare le Email"
+
+#: mod/newmember.php:32
+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 "Inserisci i tuoi dati di accesso all'email nella tua pagina Impostazioni Connettori se vuoi importare e interagire con amici o mailing list dalla tua casella di posta in arrivo"
+
+#: mod/newmember.php:35
+msgid "Go to Your Contacts Page"
+msgstr "Vai alla tua pagina Contatti"
+
+#: mod/newmember.php:35
+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 "La tua pagina Contatti è il mezzo per gestire le amicizie e collegarsi con amici su altre reti. Di solito, basta inserire l'indirizzo nel campo Aggiungi Nuovo Contatto"
+
+#: mod/newmember.php:36
+msgid "Go to Your Site's Directory"
+msgstr "Vai all'Elenco del tuo sito"
+
+#: mod/newmember.php:36
+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 "La pagina Elenco ti permette di trovare altre persone in questa rete o in altri siti. Cerca un link Connetti o Segui nella loro pagina del profilo. Inserisci il tuo Indirizzo Identità, se richiesto."
+
+#: mod/newmember.php:37
+msgid "Finding New People"
+msgstr "Trova nuove persone"
+
+#: mod/newmember.php:37
+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 "
+"interest, and provide suggestions based on network relationships. On a brand"
+" new site, friend suggestions will usually begin to be populated within 24 "
+"hours."
+msgstr "Nel pannello laterale nella pagina \"Contatti\", ci sono diversi strumenti per trovare nuovi amici. Possiamo confrontare le persone per interessi, cercare le persone per nome e fornire suggerimenti basati sui tuoi contatti esistenti. Su un sito nuovo, i suggerimenti sono di solito presenti dopo 24 ore."
+
+#: mod/newmember.php:41
+msgid "Group Your Contacts"
+msgstr "Raggruppa i tuoi contatti"
+
+#: mod/newmember.php:41
+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 "Quando avrai alcuni amici, organizzali in gruppi di conversazioni private dalla barra laterale della tua pagina Contatti. Potrai interagire privatamente con ogni gruppo nella tua pagina Rete"
+
+#: mod/newmember.php:44
+msgid "Why Aren't My Posts Public?"
+msgstr "Perché i miei post non sono pubblici?"
+
+#: mod/newmember.php:44
+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 rispetta la tua privacy. Per impostazione predefinita, i tuoi post sono mostrati solo alle persone che hai aggiunto come amici. Per maggiori informazioni guarda la sezione della guida dal link qui sopra."
+
+#: mod/newmember.php:48
+msgid "Getting Help"
+msgstr "Ottenere Aiuto"
+
+#: mod/newmember.php:50
+msgid "Go to the Help Section"
+msgstr "Vai alla sezione Guida"
+
+#: mod/newmember.php:50
+msgid ""
+"Our help pages may be consulted for detail on other program"
+" features and resources."
+msgstr "Le nostre pagine della guida possono essere consultate per avere dettagli su altre caratteristiche del programma e altre risorse."
+
+#: mod/nogroup.php:45 mod/viewcontacts.php:105 mod/contacts.php:616
+#: mod/contacts.php:960
+#, php-format
+msgid "Visit %s's profile [%s]"
+msgstr "Visita il profilo di %s [%s]"
+
+#: mod/nogroup.php:46 mod/contacts.php:961
+msgid "Edit contact"
+msgstr "Modifica contatto"
+
+#: mod/nogroup.php:67
+msgid "Contacts who are not members of a group"
+msgstr "Contatti che non sono membri di un gruppo"
+
+#: mod/profperm.php:22 mod/group.php:78 index.php:411
+msgid "Permission denied"
+msgstr "Permesso negato"
+
+#: mod/profperm.php:28 mod/profperm.php:59
+msgid "Invalid profile identifier."
+msgstr "Identificativo del profilo non valido."
+
+#: mod/profperm.php:105
+msgid "Profile Visibility Editor"
+msgstr "Modifica visibilità del profilo"
+
+#: mod/profperm.php:109 mod/group.php:264
+msgid "Click on a contact to add or remove."
+msgstr "Clicca su un contatto per aggiungerlo o rimuoverlo."
+
+#: mod/profperm.php:118
+msgid "Visible To"
+msgstr "Visibile a"
+
+#: mod/profperm.php:134
+msgid "All Contacts (with secure profile access)"
+msgstr "Tutti i contatti (con profilo ad accesso sicuro)"
+
+#: mod/update_community.php:21 mod/update_display.php:25
+#: mod/update_notes.php:38 mod/update_profile.php:37 mod/update_network.php:29
+msgid "[Embedded content - reload page to view]"
+msgstr "[Contenuto incorporato - ricarica la pagina per visualizzarlo correttamente]"
+
+#: mod/viewcontacts.php:39 mod/webfinger.php:10 mod/probe.php:9
+#: mod/community.php:17 mod/dfrn_request.php:805 mod/directory.php:31
+#: mod/search.php:89 mod/search.php:95 mod/display.php:202 mod/photos.php:965
+#: mod/videos.php:202
+msgid "Public access denied."
+msgstr "Accesso negato."
+
+#: mod/viewcontacts.php:78
+msgid "No contacts."
+msgstr "Nessun contatto."
+
+#: mod/viewsrc.php:8
+msgid "Access denied."
+msgstr "Accesso negato."
+
+#: mod/webfinger.php:11 mod/probe.php:10
+msgid "Only logged in users are permitted to perform a probing."
+msgstr "Solo agli utenti loggati è permesso effettuare un probe."
+
+#: mod/uimport.php:53 mod/register.php:203
+msgid ""
+"This site has exceeded the number of allowed daily account registrations. "
+"Please try again tomorrow."
+msgstr "Questo sito ha superato il numero di registrazioni giornaliere consentite. Prova di nuovo domani."
+
+#: mod/uimport.php:68 mod/register.php:300
+msgid "Import"
+msgstr "Importa"
+
+#: mod/uimport.php:70
+msgid "Move account"
+msgstr "Muovi account"
+
+#: mod/uimport.php:71
+msgid "You can import an account from another Friendica server."
+msgstr "Puoi importare un account da un altro server Friendica."
+
+#: mod/uimport.php:72
+msgid ""
+"You need to export your account from the old server and upload it here. We "
+"will recreate your old account here with all your contacts. We will try also"
+" to inform your friends that you moved here."
+msgstr "Devi esportare il tuo account dal vecchio server e caricarlo qui. Noi ricreeremo il tuo vecchio account qui, con tutti i tuoi contatti. Proveremo anche a informare i tuoi amici che ti sei spostato qui."
+
+#: mod/uimport.php:73
+msgid ""
+"This feature is experimental. We can't import contacts from the OStatus "
+"network (GNU Social/Statusnet) or from Diaspora"
+msgstr "Questa funzione è sperimentale. Non possiamo importare i contatti dalla rete OStatus (GNU Social/Statusnet) o da Diaspora"
+
+#: mod/uimport.php:74
+msgid "Account file"
+msgstr "File account"
+
+#: mod/uimport.php:74
+msgid ""
+"To export your account, go to \"Settings->Export your personal data\" and "
+"select \"Export account\""
+msgstr "Per esportare il tuo account, vai su \"Impostazioni -> Esporta i tuoi dati personali\" e seleziona \"Esporta account\""
+
+#: mod/community.php:22
+msgid "Not available."
+msgstr "Non disponibile."
+
+#: mod/community.php:49 mod/search.php:215
+msgid "No results."
+msgstr "Nessun risultato."
+
+#: mod/allfriends.php:49
+msgid "No friends to display."
+msgstr "Nessun amico da visualizzare."
+
+#: mod/bookmarklet.php:44
+msgid "The post was created"
+msgstr "Il messaggio è stato creato"
+
+#: mod/cal.php:146 mod/profile.php:157 mod/display.php:339
+msgid "Access to this profile has been restricted."
+msgstr "L'accesso a questo profilo è stato limitato."
+
+#: mod/cal.php:274 mod/events.php:384
+msgid "View"
+msgstr "Mostra"
+
+#: mod/cal.php:275 mod/events.php:386
+msgid "Previous"
+msgstr "Precedente"
+
+#: mod/cal.php:276 mod/install.php:202 mod/events.php:387
+msgid "Next"
+msgstr "Successivo"
+
+#: mod/cal.php:285 mod/events.php:396
+msgid "list"
+msgstr "lista"
+
+#: mod/cal.php:295
+msgid "User not found"
+msgstr "Utente non trovato"
+
+#: mod/cal.php:311
+msgid "This calendar format is not supported"
+msgstr "Questo formato di calendario non è supportato"
+
+#: mod/cal.php:313
+msgid "No exportable data found"
+msgstr "Nessun dato esportabile trovato"
+
+#: mod/cal.php:328
+msgid "calendar"
+msgstr "calendario"
+
+#: mod/dfrn_poll.php:114 mod/dfrn_poll.php:550
 #, php-format
 msgid "%1$s welcomes %2$s"
 msgstr "%s dà il benvenuto a %s"
 
-#: mod/directory.php:37 mod/display.php:200 mod/viewcontacts.php:36
-#: mod/community.php:18 mod/dfrn_request.php:804 mod/photos.php:979
-#: mod/probe.php:9 mod/search.php:93 mod/search.php:99 mod/videos.php:198
-#: mod/webfinger.php:8
-msgid "Public access denied."
-msgstr "Accesso negato."
+#: mod/dfrn_request.php:104
+msgid "This introduction has already been accepted."
+msgstr "Questa presentazione è già stata accettata."
 
-#: mod/directory.php:199 view/theme/vier/theme.php:199
-msgid "Global Directory"
-msgstr "Elenco globale"
+#: mod/dfrn_request.php:127 mod/dfrn_request.php:529
+msgid "Profile location is not valid or does not contain profile information."
+msgstr "L'indirizzo del profilo non è valido o non contiene un profilo."
 
-#: mod/directory.php:201
-msgid "Find on this site"
-msgstr "Cerca nel sito"
+#: mod/dfrn_request.php:132 mod/dfrn_request.php:534
+msgid "Warning: profile location has no identifiable owner name."
+msgstr "Attenzione: l'indirizzo del profilo non riporta il nome del proprietario."
 
-#: mod/directory.php:203
-msgid "Results for:"
-msgstr "Risultati per:"
+#: mod/dfrn_request.php:135 mod/dfrn_request.php:537
+msgid "Warning: profile location has no profile photo."
+msgstr "Attenzione: l'indirizzo del profilo non ha una foto."
 
-#: mod/directory.php:205
-msgid "Site Directory"
-msgstr "Elenco del sito"
+#: mod/dfrn_request.php:139 mod/dfrn_request.php:541
+#, 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 parametro richiesto non è stato trovato all'indirizzo dato"
+msgstr[1] "%d parametri richiesti non sono stati trovati all'indirizzo dato"
 
-#: mod/directory.php:212
-msgid "No entries (some entries may be hidden)."
-msgstr "Nessuna voce (qualche voce potrebbe essere nascosta)."
+#: mod/dfrn_request.php:183
+msgid "Introduction complete."
+msgstr "Presentazione completa."
 
-#: mod/display.php:328 mod/cal.php:143 mod/profile.php:155
-msgid "Access to this profile has been restricted."
-msgstr "L'accesso a questo profilo è stato limitato."
+#: mod/dfrn_request.php:228
+msgid "Unrecoverable protocol error."
+msgstr "Errore di comunicazione."
 
-#: mod/display.php:479
-msgid "Item has been removed."
-msgstr "L'oggetto è stato rimosso."
+#: mod/dfrn_request.php:256
+msgid "Profile unavailable."
+msgstr "Profilo non disponibile."
 
-#: mod/editpost.php:17 mod/editpost.php:27
+#: mod/dfrn_request.php:283
+#, php-format
+msgid "%s has received too many connection requests today."
+msgstr "%s ha ricevuto troppe richieste di connessione per oggi."
+
+#: mod/dfrn_request.php:284
+msgid "Spam protection measures have been invoked."
+msgstr "Sono state attivate le misure di protezione contro lo spam."
+
+#: mod/dfrn_request.php:285
+msgid "Friends are advised to please try again in 24 hours."
+msgstr "Gli amici sono pregati di riprovare tra 24 ore."
+
+#: mod/dfrn_request.php:347
+msgid "Invalid locator"
+msgstr "Indirizzo non valido"
+
+#: mod/dfrn_request.php:356
+msgid "Invalid email address."
+msgstr "Indirizzo email non valido."
+
+#: mod/dfrn_request.php:381
+msgid "This account has not been configured for email. Request failed."
+msgstr "Questo account non è stato configurato per l'email. Richiesta fallita."
+
+#: mod/dfrn_request.php:484
+msgid "You have already introduced yourself here."
+msgstr "Ti sei già presentato qui."
+
+#: mod/dfrn_request.php:488
+#, php-format
+msgid "Apparently you are already friends with %s."
+msgstr "Pare che tu e %s siate già amici."
+
+#: mod/dfrn_request.php:509
+msgid "Invalid profile URL."
+msgstr "Indirizzo profilo non valido."
+
+#: mod/dfrn_request.php:594 mod/contacts.php:223
+msgid "Failed to update contact record."
+msgstr "Errore nell'aggiornamento del contatto."
+
+#: mod/dfrn_request.php:615
+msgid "Your introduction has been sent."
+msgstr "La tua presentazione è stata inviata."
+
+#: mod/dfrn_request.php:657
+msgid ""
+"Remote subscription can't be done for your network. Please subscribe "
+"directly on your system."
+msgstr "La richiesta di connessione remota non può essere effettuata per la tua rete. Invia la richiesta direttamente sul nostro sistema."
+
+#: mod/dfrn_request.php:678
+msgid "Please login to confirm introduction."
+msgstr "Accedi per confermare la presentazione."
+
+#: mod/dfrn_request.php:688
+msgid ""
+"Incorrect identity currently logged in. Please login to "
+"this profile."
+msgstr "Non hai fatto accesso con l'identità corretta. Accedi a questo profilo."
+
+#: mod/dfrn_request.php:702 mod/dfrn_request.php:719
+msgid "Confirm"
+msgstr "Conferma"
+
+#: mod/dfrn_request.php:714
+msgid "Hide this contact"
+msgstr "Nascondi questo contatto"
+
+#: mod/dfrn_request.php:717
+#, php-format
+msgid "Welcome home %s."
+msgstr "Bentornato a casa %s."
+
+#: mod/dfrn_request.php:718
+#, php-format
+msgid "Please confirm your introduction/connection request to %s."
+msgstr "Conferma la tua richiesta di connessione con %s."
+
+#: mod/dfrn_request.php:849
+msgid ""
+"Please enter your 'Identity Address' from one of the following supported "
+"communications networks:"
+msgstr "Inserisci il tuo 'Indirizzo Identità' da uno dei seguenti network supportati:"
+
+#: mod/dfrn_request.php:873
+#, php-format
+msgid ""
+"If you are not yet a member of the free social web, follow this link to find a public Friendica site and "
+"join us today."
+msgstr "Se non sei un membro del web sociale libero,  segui questo link per trovare un sito Friendica pubblico e unisciti a noi oggi"
+
+#: mod/dfrn_request.php:878
+msgid "Friend/Connection Request"
+msgstr "Richieste di amicizia/connessione"
+
+#: mod/dfrn_request.php:879
+msgid ""
+"Examples: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, "
+"testuser@identi.ca"
+msgstr "Esempi: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, testuser@identi.ca"
+
+#: mod/dfrn_request.php:880 mod/follow.php:149
+msgid "Please answer the following:"
+msgstr "Rispondi:"
+
+#: mod/dfrn_request.php:881 mod/follow.php:150
+#, php-format
+msgid "Does %s know you?"
+msgstr "%s ti conosce?"
+
+#: mod/dfrn_request.php:885 mod/follow.php:151
+msgid "Add a personal note:"
+msgstr "Aggiungi una nota personale:"
+
+#: mod/dfrn_request.php:888
+msgid "StatusNet/Federated Social Web"
+msgstr "StatusNet/Federated Social Web"
+
+#: mod/dfrn_request.php:890
+#, php-format
+msgid ""
+" - please do not use this form.  Instead, enter %s into your Diaspora search"
+" bar."
+msgstr " - per favore non usare questa form. Invece, inserisci %s nella tua barra di ricerca su Diaspora."
+
+#: mod/dfrn_request.php:891 mod/follow.php:157 mod/unfollow.php:113
+msgid "Your Identity Address:"
+msgstr "L'indirizzo della tua identità:"
+
+#: mod/dfrn_request.php:894 mod/follow.php:63 mod/unfollow.php:65
+msgid "Submit Request"
+msgstr "Invia richiesta"
+
+#: mod/editpost.php:20 mod/editpost.php:30
 msgid "Item not found"
 msgstr "Oggetto non trovato"
 
-#: mod/editpost.php:32
+#: mod/editpost.php:35
 msgid "Edit post"
 msgstr "Modifica messaggio"
 
-#: mod/fbrowser.php:132
-msgid "Files"
-msgstr "File"
-
-#: mod/fetch.php:12 mod/fetch.php:39 mod/fetch.php:48 mod/help.php:53
-#: mod/p.php:16 mod/p.php:43 mod/p.php:52 index.php:298
+#: mod/fetch.php:16 mod/fetch.php:43 mod/fetch.php:52 mod/help.php:57
+#: mod/p.php:20 mod/p.php:47 mod/p.php:56 index.php:303
 msgid "Not Found"
 msgstr "Non trovato"
 
-#: mod/filer.php:30
-msgid "- select -"
-msgstr "- seleziona -"
+#: mod/follow.php:42
+msgid "Contact added"
+msgstr "Contatto aggiunto"
 
-#: mod/fsuggest.php:64
-msgid "Friend suggestion sent."
-msgstr "Suggerimento di amicizia inviato."
+#: mod/follow.php:74
+msgid "You already added this contact."
+msgstr "Hai già aggiunto questo contatto."
 
-#: mod/fsuggest.php:98
-msgid "Suggest Friends"
-msgstr "Suggerisci amici"
+#: mod/follow.php:83
+msgid "Diaspora support isn't enabled. Contact can't be added."
+msgstr "Il supporto Diaspora non è abilitato. Il contatto non può essere aggiunto."
 
-#: mod/fsuggest.php:100
-#, php-format
-msgid "Suggest a friend for %s"
-msgstr "Suggerisci un amico a %s"
+#: mod/follow.php:90
+msgid "OStatus support is disabled. Contact can't be added."
+msgstr "Il supporto OStatus non è abilitato. Il contatto non può essere aggiunto."
 
-#: mod/hcard.php:11
+#: mod/follow.php:97
+msgid "The network type couldn't be detected. Contact can't be added."
+msgstr "Non è possibile rilevare il tipo di rete. Il contatto non può essere aggiunto."
+
+#: mod/follow.php:166 mod/notifications.php:258 mod/unfollow.php:122
+#: mod/contacts.php:654
+msgid "Profile URL"
+msgstr "URL Profilo"
+
+#: mod/group.php:31
+msgid "Group created."
+msgstr "Gruppo creato."
+
+#: mod/group.php:37
+msgid "Could not create group."
+msgstr "Impossibile creare il gruppo."
+
+#: mod/group.php:51 mod/group.php:156
+msgid "Group not found."
+msgstr "Gruppo non trovato."
+
+#: mod/group.php:65
+msgid "Group name changed."
+msgstr "Il nome del gruppo è cambiato."
+
+#: mod/group.php:95
+msgid "Save Group"
+msgstr "Salva gruppo"
+
+#: mod/group.php:100
+msgid "Create a group of contacts/friends."
+msgstr "Crea un gruppo di amici/contatti."
+
+#: mod/group.php:125
+msgid "Group removed."
+msgstr "Gruppo rimosso."
+
+#: mod/group.php:127
+msgid "Unable to remove group."
+msgstr "Impossibile rimuovere il gruppo."
+
+#: mod/group.php:191
+msgid "Delete Group"
+msgstr "Elimina Gruppo"
+
+#: mod/group.php:197
+msgid "Group Editor"
+msgstr "Modifica gruppo"
+
+#: mod/group.php:202
+msgid "Edit Group Name"
+msgstr "Modifica Nome Gruppo"
+
+#: mod/group.php:212
+msgid "Members"
+msgstr "Membri"
+
+#: mod/group.php:214 mod/contacts.php:722
+msgid "All Contacts"
+msgstr "Tutti i contatti"
+
+#: mod/group.php:215 mod/network.php:655
+msgid "Group is empty"
+msgstr "Il gruppo è vuoto"
+
+#: mod/group.php:228
+msgid "Remove Contact"
+msgstr "Rimuovi Contatto"
+
+#: mod/group.php:252
+msgid "Add Contact"
+msgstr "Aggiungi Contatto"
+
+#: mod/hcard.php:14
 msgid "No profile"
 msgstr "Nessun profilo"
 
-#: mod/help.php:41
+#: mod/help.php:45
 msgid "Help:"
 msgstr "Guida:"
 
-#: mod/help.php:56 index.php:301
+#: mod/help.php:60 index.php:306
 msgid "Page not found."
 msgstr "Pagina non trovata."
 
-#: mod/home.php:39
+#: mod/home.php:42
 #, php-format
 msgid "Welcome to %s"
 msgstr "Benvenuto su %s"
 
-#: mod/invite.php:28
+#: mod/invite.php:31
 msgid "Total invitation limit exceeded."
 msgstr "Limite totale degli inviti superato."
 
-#: mod/invite.php:51
+#: mod/invite.php:54
 #, php-format
 msgid "%s : Not a valid email address."
 msgstr "%s: non è un indirizzo email valido."
 
-#: mod/invite.php:76
+#: mod/invite.php:79
 msgid "Please join us on Friendica"
 msgstr "Unisciti a noi su Friendica"
 
-#: mod/invite.php:87
+#: mod/invite.php:90
 msgid "Invitation limit exceeded. Please contact your site administrator."
 msgstr "Limite degli inviti superato. Contatta l'amministratore del tuo sito."
 
-#: mod/invite.php:91
+#: mod/invite.php:94
 #, php-format
 msgid "%s : Message delivery failed."
 msgstr "%s: la consegna del messaggio fallita."
 
-#: mod/invite.php:95
+#: mod/invite.php:98
 #, php-format
 msgid "%d message sent."
 msgid_plural "%d messages sent."
 msgstr[0] "%d messaggio inviato."
 msgstr[1] "%d messaggi inviati."
 
-#: mod/invite.php:114
+#: mod/invite.php:117
 msgid "You have no more invitations available"
 msgstr "Non hai altri inviti disponibili"
 
-#: mod/invite.php:122
+#: mod/invite.php:125
 #, php-format
 msgid ""
 "Visit %s for a list of public sites that you can join. Friendica members on "
@@ -3995,14 +4030,14 @@ msgid ""
 " other social networks."
 msgstr "Visita %s per una lista di siti pubblici a cui puoi iscriverti. I membri Friendica su altri siti possono collegarsi uno con l'altro, come con membri di molti altri social network."
 
-#: mod/invite.php:124
+#: mod/invite.php:127
 #, php-format
 msgid ""
 "To accept this invitation, please visit and register at %s or any other "
 "public Friendica website."
 msgstr "Per accettare questo invito, visita e registrati su %s o su un'altro sito web Friendica aperto al pubblico."
 
-#: mod/invite.php:125
+#: mod/invite.php:128
 #, php-format
 msgid ""
 "Friendica sites all inter-connect to create a huge privacy-enhanced social "
@@ -4011,92 +4046,96 @@ msgid ""
 "sites you can join."
 msgstr "I siti Friendica son tutti collegati tra loro per creare una grossa rete sociale rispettosa della privacy, posseduta e controllata dai suoi membri. I siti Friendica possono anche collegarsi a molti altri social network tradizionali. Vai su %s per una lista di siti Friendica alternativi a cui puoi iscriverti."
 
-#: mod/invite.php:128
+#: mod/invite.php:132
 msgid ""
 "Our apologies. This system is not currently configured to connect with other"
 " public sites or invite members."
 msgstr "Ci scusiamo, questo sistema non è configurato per collegarsi con altri siti pubblici o per invitare membri."
 
-#: mod/invite.php:134
+#: mod/invite.php:135
+#, php-format
+msgid "To accept this invitation, please visit and register at %s."
+msgstr "Per accettare questo invito, visita e registrati su %s"
+
+#: mod/invite.php:136
+msgid ""
+"Friendica sites all inter-connect to create a huge privacy-enhanced social "
+"web that is owned and controlled by its members. They can also connect with "
+"many traditional social networks."
+msgstr ""
+
+#: mod/invite.php:142
 msgid "Send invitations"
 msgstr "Invia inviti"
 
-#: mod/invite.php:135
+#: mod/invite.php:143
 msgid "Enter email addresses, one per line:"
 msgstr "Inserisci gli indirizzi email, uno per riga:"
 
-#: mod/invite.php:136 mod/wallmessage.php:135 mod/message.php:332
-#: mod/message.php:515
+#: mod/invite.php:144 mod/message.php:332 mod/message.php:515
+#: mod/wallmessage.php:138
 msgid "Your message:"
 msgstr "Il tuo messaggio:"
 
-#: mod/invite.php:137
+#: mod/invite.php:145
 msgid ""
 "You are cordially invited to join me and other close friends on Friendica - "
 "and help us to create a better social web."
 msgstr "Sei cordialmente invitato/a ad unirti a me e ad altri amici su Friendica, e ad aiutarci a creare una rete sociale migliore."
 
-#: mod/invite.php:139
+#: mod/invite.php:147
 msgid "You will need to supply this invitation code: $invite_code"
 msgstr "Sarà necessario fornire questo codice invito: $invite_code"
 
-#: mod/invite.php:139
+#: mod/invite.php:147
 msgid ""
 "Once you have registered, please connect with me via my profile page at:"
 msgstr "Una volta registrato, connettiti con me dal mio profilo:"
 
-#: mod/invite.php:141
+#: mod/invite.php:149
 msgid ""
 "For more information about the Friendica project and why we feel it is "
-"important, please visit http://friendica.com"
-msgstr "Per maggiori informazioni sul progetto Friendica e perché pensiamo sia importante, visita http://friendica.com"
+"important, please visit http://friendi.ca"
+msgstr "Per maggiori informazioni sul progetto Friendica e perchè pensiamo sia importante, visita http://friendi.ca "
 
-#: mod/localtime.php:24
+#: mod/localtime.php:26
 msgid "Time Conversion"
 msgstr "Conversione Ora"
 
-#: mod/localtime.php:26
+#: mod/localtime.php:28
 msgid ""
 "Friendica provides this service for sharing events with other networks and "
 "friends in unknown timezones."
 msgstr "Friendica fornisce questo servizio per la condivisione di eventi con altre reti e amici in fusi orari sconosciuti."
 
-#: mod/localtime.php:30
+#: mod/localtime.php:32
 #, php-format
 msgid "UTC time: %s"
 msgstr "Ora UTC: %s"
 
-#: mod/localtime.php:33
+#: mod/localtime.php:35
 #, php-format
 msgid "Current timezone: %s"
 msgstr "Fuso orario corrente: %s"
 
-#: mod/localtime.php:36
+#: mod/localtime.php:38
 #, php-format
 msgid "Converted localtime: %s"
 msgstr "Ora locale convertita: %s"
 
-#: mod/localtime.php:41
+#: mod/localtime.php:43
 msgid "Please select your timezone:"
 msgstr "Selezionare il tuo fuso orario:"
 
-#: mod/lockview.php:32 mod/lockview.php:40
-msgid "Remote privacy information not available."
-msgstr "Informazioni remote sulla privacy non disponibili."
-
-#: mod/lockview.php:49
-msgid "Visible to:"
-msgstr "Visibile a:"
-
-#: mod/lostpass.php:19
+#: mod/lostpass.php:22
 msgid "No valid account found."
 msgstr "Nessun account valido trovato."
 
-#: mod/lostpass.php:35
+#: mod/lostpass.php:38
 msgid "Password reset request issued. Check your email."
 msgstr "La richiesta per reimpostare la password è stata inviata. Controlla la tua email."
 
-#: mod/lostpass.php:41
+#: mod/lostpass.php:44
 #, php-format
 msgid ""
 "\n"
@@ -4112,7 +4151,7 @@ msgid ""
 "\t\tissued this request."
 msgstr "\nGentile %1$s,\n    abbiamo ricevuto su \"%2$s\" una richiesta di resettare la password del tuo account. Per confermare questa richiesta, selezionate il link di conferma qui sotto o incollatelo nella barra indirizzo del vostro browser.\n\nSe NON hai richiesto questa modifica, NON selezionare il link e ignora o cancella questa email.\n\nLa tua password non verrà modificata a meno che non possiamo verificare che tu abbia effettivamente richiesto la modifica."
 
-#: mod/lostpass.php:52
+#: mod/lostpass.php:55
 #, php-format
 msgid ""
 "\n"
@@ -4129,44 +4168,44 @@ msgid ""
 "\t\tLogin Name:\t%3$s"
 msgstr "\nSegui questo link per verificare la tua identità:\n\n%1$s\n\nRiceverai in un successivo messaggio la nuova password.\nPotrai cambiarla dalla pagina \"Impostazioni\" del tuo account dopo esserti autenticato.\n\nI dettagli del tuo account sono:\n    Indirizzo del sito: %2$s\n    Nome utente: %3$s"
 
-#: mod/lostpass.php:71
+#: mod/lostpass.php:74
 #, php-format
 msgid "Password reset requested at %s"
 msgstr "Richiesta reimpostazione password su %s"
 
-#: mod/lostpass.php:91
+#: mod/lostpass.php:94
 msgid ""
 "Request could not be verified. (You may have previously submitted it.) "
 "Password reset failed."
 msgstr "La richiesta non può essere verificata. (Puoi averla già richiesta precedentemente). Reimpostazione password fallita."
 
-#: mod/lostpass.php:110 boot.php:1882
+#: mod/lostpass.php:113 boot.php:889
 msgid "Password Reset"
 msgstr "Reimpostazione password"
 
-#: mod/lostpass.php:111
+#: mod/lostpass.php:114
 msgid "Your password has been reset as requested."
 msgstr "La tua password è stata reimpostata come richiesto."
 
-#: mod/lostpass.php:112
+#: mod/lostpass.php:115
 msgid "Your new password is"
 msgstr "La tua nuova password è"
 
-#: mod/lostpass.php:113
+#: mod/lostpass.php:116
 msgid "Save or copy your new password - and then"
 msgstr "Salva o copia la tua nuova password, quindi"
 
-#: mod/lostpass.php:114
+#: mod/lostpass.php:117
 msgid "click here to login"
 msgstr "clicca qui per entrare"
 
-#: mod/lostpass.php:115
+#: mod/lostpass.php:118
 msgid ""
 "Your password may be changed from the Settings page after "
 "successful login."
 msgstr "Puoi cambiare la tua password dalla pagina Impostazioni dopo aver effettuato l'accesso."
 
-#: mod/lostpass.php:125
+#: mod/lostpass.php:128
 #, php-format
 msgid ""
 "\n"
@@ -4177,7 +4216,7 @@ msgid ""
 "\t\t\t"
 msgstr "\nGentile %1$s,\n   La tua password è stata modificata come richiesto.\nSalva questa password, o sostituiscila immediatamente con qualcosa che puoi ricordare."
 
-#: mod/lostpass.php:131
+#: mod/lostpass.php:134
 #, php-format
 msgid ""
 "\n"
@@ -4191,1134 +4230,84 @@ msgid ""
 "\t\t\t"
 msgstr "\nI dettagli del tuo account sono:\n\n   Indirizzo del sito: %1$s\n   Nome utente: %2$s\n   Password: %3$s\n\nPuoi cambiare questa password dalla pagina \"Impostazioni\" del tuo account dopo esserti autenticato."
 
-#: mod/lostpass.php:147
+#: mod/lostpass.php:150
 #, php-format
 msgid "Your password has been changed at %s"
 msgstr "La tua password presso %s è stata cambiata"
 
-#: mod/lostpass.php:159
+#: mod/lostpass.php:162
 msgid "Forgot your Password?"
 msgstr "Hai dimenticato la password?"
 
-#: mod/lostpass.php:160
+#: mod/lostpass.php:163
 msgid ""
 "Enter your email address and submit to have your password reset. Then check "
 "your email for further instructions."
 msgstr "Inserisci il tuo indirizzo email per reimpostare la password."
 
-#: mod/lostpass.php:161 boot.php:1870
+#: mod/lostpass.php:164 boot.php:877
 msgid "Nickname or Email: "
 msgstr "Nome utente o email: "
 
-#: mod/lostpass.php:162
+#: mod/lostpass.php:165
 msgid "Reset"
 msgstr "Reimposta"
 
-#: mod/maintenance.php:20
-msgid "System down for maintenance"
-msgstr "Sistema in manutenzione"
-
-#: mod/match.php:35
-msgid "No keywords to match. Please add keywords to your default profile."
-msgstr "Nessuna parola chiave per l'abbinamento. Aggiungi parole chiave al tuo profilo predefinito."
-
-#: mod/match.php:88
-msgid "is interested in:"
-msgstr "è interessato a:"
-
-#: mod/match.php:102
-msgid "Profile Match"
-msgstr "Profili corrispondenti"
-
-#: mod/match.php:109 mod/dirfind.php:245
-msgid "No matches"
-msgstr "Nessun risultato"
-
-#: mod/mood.php:134
-msgid "Mood"
-msgstr "Umore"
-
-#: mod/mood.php:135
-msgid "Set your current mood and tell your friends"
-msgstr "Condividi il tuo umore con i tuoi amici"
-
-#: mod/newmember.php:6
-msgid "Welcome to Friendica"
-msgstr "Benvenuto su Friendica"
-
-#: mod/newmember.php:8
-msgid "New Member Checklist"
-msgstr "Cose da fare per i Nuovi Utenti"
-
-#: mod/newmember.php:12
-msgid ""
-"We would like to offer some tips and links to help make your experience "
-"enjoyable. Click any item to visit the relevant page. A link to this page "
-"will be visible from your home page for two weeks after your initial "
-"registration and then will quietly disappear."
-msgstr "Vorremmo offrirti qualche trucco e dei link alla guida per aiutarti ad avere un'esperienza divertente. Clicca su un qualsiasi elemento per visitare la relativa pagina. Un link a questa pagina sarà visibile nella tua home per due settimane dopo la tua registrazione."
-
-#: mod/newmember.php:14
-msgid "Getting Started"
-msgstr "Come Iniziare"
-
-#: mod/newmember.php:18
-msgid "Friendica Walk-Through"
-msgstr "Friendica Passo-Passo"
-
-#: mod/newmember.php:18
-msgid ""
-"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."
-msgstr "Sulla tua pagina Quick Start - veloce introduzione alla tua pagina profilo e alla pagina Rete, fai qualche nuova amicizia, e trova qualche gruppo a cui unirti."
-
-#: mod/newmember.php:26
-msgid "Go to Your Settings"
-msgstr "Vai alle tue Impostazioni"
-
-#: mod/newmember.php:26
-msgid ""
-"On your Settings page -  change your initial password. Also make a "
-"note of your Identity Address. This looks just like an email address - and "
-"will be useful in making friends on the free social web."
-msgstr "Nella tua pagina Impostazioni - cambia la tua password iniziale. Prendi anche nota del tuo Indirizzo Identità. Assomiglia a un indirizzo email e sarà utile per stringere amicizie nel web sociale libero."
-
-#: mod/newmember.php:28
-msgid ""
-"Review the other settings, particularly the privacy settings. An unpublished"
-" directory listing is like having an unlisted phone number. In general, you "
-"should probably publish your listing - unless all of your friends and "
-"potential friends know exactly how to find you."
-msgstr "Guarda le altre impostazioni, in particolare le impostazioni della privacy. Un profilo non pubblicato è come un numero di telefono non in elenco. In genere, dovresti pubblicare il tuo profilo - a meno che tutti i tuoi amici e potenziali tali sappiano esattamente come trovarti."
-
-#: mod/newmember.php:36 mod/profile_photo.php:256 mod/profiles.php:700
-msgid "Upload Profile Photo"
-msgstr "Carica la foto del profilo"
-
-#: mod/newmember.php:36
-msgid ""
-"Upload a profile photo if you have not done so already. Studies have shown "
-"that people with real photos of themselves are ten times more likely to make"
-" friends than people who do not."
-msgstr "Carica una foto del profilo se non l'hai ancora fatto. Studi hanno mostrato che persone che hanno vere foto di se stessi hanno dieci volte più probabilità di fare amicizie rispetto alle persone che non ce l'hanno."
-
-#: mod/newmember.php:38
-msgid "Edit Your Profile"
-msgstr "Modifica il tuo Profilo"
-
-#: mod/newmember.php:38
-msgid ""
-"Edit your default profile to your liking. Review the "
-"settings for hiding your list of friends and hiding the profile from unknown"
-" visitors."
-msgstr "Modifica il tuo profilo predefinito a piacimento. Rivedi le impostazioni per nascondere la tua lista di amici e nascondere il profilo ai visitatori sconosciuti."
-
-#: mod/newmember.php:40
-msgid "Profile Keywords"
-msgstr "Parole chiave del profilo"
-
-#: mod/newmember.php:40
-msgid ""
-"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."
-msgstr "Inserisci qualche parola chiave pubblica nel tuo profilo predefinito che descriva i tuoi interessi. Potremmo essere in grado di trovare altre persone con interessi similari e suggerirti delle amicizie."
-
-#: mod/newmember.php:44
-msgid "Connecting"
-msgstr "Collegarsi"
-
-#: mod/newmember.php:51
-msgid "Importing Emails"
-msgstr "Importare le Email"
-
-#: 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 "Inserisci i tuoi dati di accesso all'email nella tua pagina Impostazioni Connettori se vuoi importare e interagire con amici o mailing list dalla tua casella di posta in arrivo"
-
-#: mod/newmember.php:53
-msgid "Go to Your Contacts Page"
-msgstr "Vai alla tua pagina Contatti"
-
-#: 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 "La tua pagina Contatti è il mezzo per gestire le amicizie e collegarsi con amici su altre reti. Di solito, basta inserire l'indirizzo nel campo Aggiungi Nuovo Contatto"
-
-#: mod/newmember.php:55
-msgid "Go to Your Site's Directory"
-msgstr "Vai all'Elenco del tuo sito"
-
-#: 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 "La pagina Elenco ti permette di trovare altre persone in questa rete o in altri siti. Cerca un link Connetti o Segui nella loro pagina del profilo. Inserisci il tuo Indirizzo Identità, se richiesto."
-
-#: mod/newmember.php:57
-msgid "Finding New People"
-msgstr "Trova nuove persone"
-
-#: 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 "
-"interest, and provide suggestions based on network relationships. On a brand"
-" new site, friend suggestions will usually begin to be populated within 24 "
-"hours."
-msgstr "Nel pannello laterale nella pagina \"Contatti\", ci sono diversi strumenti per trovare nuovi amici. Possiamo confrontare le persone per interessi, cercare le persone per nome e fornire suggerimenti basati sui tuoi contatti esistenti. Su un sito nuovo, i suggerimenti sono di solito presenti dopo 24 ore."
-
-#: mod/newmember.php:65
-msgid "Group Your Contacts"
-msgstr "Raggruppa i tuoi contatti"
-
-#: 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 "Quando avrai alcuni amici, organizzali in gruppi di conversazioni private dalla barra laterale della tua pagina Contatti. Potrai interagire privatamente con ogni gruppo nella tua pagina Rete"
-
-#: mod/newmember.php:68
-msgid "Why Aren't My Posts Public?"
-msgstr "Perché i miei post non sono pubblici?"
-
-#: 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 rispetta la tua privacy. Per impostazione predefinita, i tuoi post sono mostrati solo alle persone che hai aggiunto come amici. Per maggiori informazioni guarda la sezione della guida dal link qui sopra."
-
-#: mod/newmember.php:73
-msgid "Getting Help"
-msgstr "Ottenere Aiuto"
-
-#: mod/newmember.php:77
-msgid "Go to the Help Section"
-msgstr "Vai alla sezione Guida"
-
-#: mod/newmember.php:77
-msgid ""
-"Our help pages may be consulted for detail on other program"
-" features and resources."
-msgstr "Le nostre pagine della guida possono essere consultate per avere dettagli su altre caratteristiche del programma e altre risorse."
-
-#: mod/nogroup.php:65
-msgid "Contacts who are not members of a group"
-msgstr "Contatti che non sono membri di un gruppo"
-
-#: mod/notify.php:65
-msgid "No more system notifications."
-msgstr "Nessuna nuova notifica di sistema."
-
-#: mod/notify.php:69 mod/notifications.php:111
-msgid "System Notifications"
-msgstr "Notifiche di sistema"
-
-#: mod/oexchange.php:21
-msgid "Post successful."
-msgstr "Inviato!"
-
-#: mod/ostatus_subscribe.php:14
-msgid "Subscribing to OStatus contacts"
-msgstr "Iscrizione a contatti OStatus"
-
-#: mod/ostatus_subscribe.php:25
-msgid "No contact provided."
-msgstr "Nessun contatto disponibile."
-
-#: mod/ostatus_subscribe.php:31
-msgid "Couldn't fetch information for contact."
-msgstr "Non è stato possibile recuperare le informazioni del contatto."
-
-#: mod/ostatus_subscribe.php:40
-msgid "Couldn't fetch friends for contact."
-msgstr "Non è stato possibile recuperare gli amici del contatto."
-
-#: mod/ostatus_subscribe.php:54 mod/repair_ostatus.php:44
-msgid "Done"
-msgstr "Fatto"
-
-#: mod/ostatus_subscribe.php:68
-msgid "success"
-msgstr "successo"
-
-#: mod/ostatus_subscribe.php:70
-msgid "failed"
-msgstr "fallito"
-
-#: mod/ostatus_subscribe.php:78 mod/repair_ostatus.php:50
-msgid "Keep this window open until done."
-msgstr "Tieni questa finestra aperta fino a che ha finito."
-
-#: mod/p.php:9
-msgid "Not Extended"
-msgstr "Not Extended"
-
-#: mod/poke.php:196
-msgid "Poke/Prod"
-msgstr "Tocca/Pungola"
-
-#: mod/poke.php:197
-msgid "poke, prod or do other things to somebody"
-msgstr "tocca, pungola o fai altre cose a qualcuno"
-
-#: mod/poke.php:198
-msgid "Recipient"
-msgstr "Destinatario"
-
-#: mod/poke.php:199
-msgid "Choose what you wish to do to recipient"
-msgstr "Scegli cosa vuoi fare al destinatario"
-
-#: mod/poke.php:202
-msgid "Make this post private"
-msgstr "Rendi questo post privato"
-
-#: mod/profile_photo.php:44
-msgid "Image uploaded but image cropping failed."
-msgstr "L'immagine è stata caricata, ma il non è stato possibile ritagliarla."
-
-#: mod/profile_photo.php:77 mod/profile_photo.php:85 mod/profile_photo.php:93
-#: mod/profile_photo.php:323
-#, php-format
-msgid "Image size reduction [%s] failed."
-msgstr "Il ridimensionamento dell'immagine [%s] è fallito."
-
-#: mod/profile_photo.php:127
-msgid ""
-"Shift-reload the page or clear browser cache if the new photo does not "
-"display immediately."
-msgstr "Ricarica la pagina con shift+F5 o cancella la cache del browser se la nuova foto non viene mostrata immediatamente."
-
-#: mod/profile_photo.php:137
-msgid "Unable to process image"
-msgstr "Impossibile elaborare l'immagine"
-
-#: mod/profile_photo.php:156 mod/photos.php:813 mod/wall_upload.php:181
-#, php-format
-msgid "Image exceeds size limit of %s"
-msgstr "La dimensione dell'immagine supera il limite di %s"
-
-#: mod/profile_photo.php:165 mod/photos.php:854 mod/wall_upload.php:218
-msgid "Unable to process image."
-msgstr "Impossibile caricare l'immagine."
-
-#: mod/profile_photo.php:254
-msgid "Upload File:"
-msgstr "Carica un file:"
-
-#: mod/profile_photo.php:255
-msgid "Select a profile:"
-msgstr "Seleziona un profilo:"
-
-#: mod/profile_photo.php:257
-msgid "Upload"
-msgstr "Carica"
-
-#: mod/profile_photo.php:260
-msgid "or"
-msgstr "o"
-
-#: mod/profile_photo.php:260
-msgid "skip this step"
-msgstr "salta questo passaggio"
-
-#: mod/profile_photo.php:260
-msgid "select a photo from your photo albums"
-msgstr "seleziona una foto dai tuoi album"
-
-#: mod/profile_photo.php:274
-msgid "Crop Image"
-msgstr "Ritaglia immagine"
-
-#: mod/profile_photo.php:275
-msgid "Please adjust the image cropping for optimum viewing."
-msgstr "Ritaglia l'immagine per una visualizzazione migliore."
-
-#: mod/profile_photo.php:277
-msgid "Done Editing"
-msgstr "Finito"
-
-#: mod/profile_photo.php:313
-msgid "Image uploaded successfully."
-msgstr "Immagine caricata con successo."
-
-#: mod/profile_photo.php:315 mod/photos.php:883 mod/wall_upload.php:257
-msgid "Image upload failed."
-msgstr "Caricamento immagine fallito."
-
-#: mod/profperm.php:20 mod/group.php:76 index.php:406
-msgid "Permission denied"
-msgstr "Permesso negato"
-
-#: mod/profperm.php:26 mod/profperm.php:57
-msgid "Invalid profile identifier."
-msgstr "Identificativo del profilo non valido."
-
-#: mod/profperm.php:103
-msgid "Profile Visibility Editor"
-msgstr "Modifica visibilità del profilo"
-
-#: mod/profperm.php:107 mod/group.php:262
-msgid "Click on a contact to add or remove."
-msgstr "Clicca su un contatto per aggiungerlo o rimuoverlo."
-
-#: mod/profperm.php:116
-msgid "Visible To"
-msgstr "Visibile a"
-
-#: mod/profperm.php:132
-msgid "All Contacts (with secure profile access)"
-msgstr "Tutti i contatti (con profilo ad accesso sicuro)"
-
-#: mod/regmod.php:58
-msgid "Account approved."
-msgstr "Account approvato."
-
-#: mod/regmod.php:95
-#, php-format
-msgid "Registration revoked for %s"
-msgstr "Registrazione revocata per %s"
-
-#: mod/regmod.php:107
-msgid "Please login."
-msgstr "Accedi."
-
-#: mod/removeme.php:52 mod/removeme.php:55
-msgid "Remove My Account"
-msgstr "Rimuovi il mio account"
-
-#: mod/removeme.php:53
-msgid ""
-"This will completely remove your account. Once this has been done it is not "
-"recoverable."
-msgstr "Questo comando rimuoverà completamente il tuo account. Una volta rimosso non potrai più recuperarlo."
-
-#: mod/removeme.php:54
-msgid "Please enter your password for verification:"
-msgstr "Inserisci la tua password per verifica:"
-
-#: mod/repair_ostatus.php:14
-msgid "Resubscribing to OStatus contacts"
-msgstr "Risottoscrivi i contatti OStatus"
-
-#: mod/repair_ostatus.php:30
-msgid "Error"
-msgstr "Errore"
-
-#: mod/subthread.php:104
-#, php-format
-msgid "%1$s is following %2$s's %3$s"
-msgstr "%1$s sta seguendo %3$s di %2$s"
-
-#: mod/suggest.php:27
-msgid "Do you really want to delete this suggestion?"
-msgstr "Vuoi veramente cancellare questo suggerimento?"
-
-#: mod/suggest.php:71
-msgid ""
-"No suggestions available. If this is a new site, please try again in 24 "
-"hours."
-msgstr "Nessun suggerimento disponibile. Se questo è un sito nuovo, riprova tra 24 ore."
-
-#: mod/suggest.php:84 mod/suggest.php:104
-msgid "Ignore/Hide"
-msgstr "Ignora / Nascondi"
-
-#: mod/tagrm.php:43
-msgid "Tag removed"
-msgstr "Tag rimosso"
-
-#: mod/tagrm.php:82
-msgid "Remove Item Tag"
-msgstr "Rimuovi il tag"
-
-#: mod/tagrm.php:84
-msgid "Select a tag to remove: "
-msgstr "Seleziona un tag da rimuovere: "
-
-#: mod/uimport.php:51 mod/register.php:198
-msgid ""
-"This site has exceeded the number of allowed daily account registrations. "
-"Please try again tomorrow."
-msgstr "Questo sito ha superato il numero di registrazioni giornaliere consentite. Prova di nuovo domani."
-
-#: mod/uimport.php:66 mod/register.php:295
-msgid "Import"
-msgstr "Importa"
-
-#: mod/uimport.php:68
-msgid "Move account"
-msgstr "Muovi account"
-
-#: mod/uimport.php:69
-msgid "You can import an account from another Friendica server."
-msgstr "Puoi importare un account da un altro server Friendica."
-
-#: mod/uimport.php:70
-msgid ""
-"You need to export your account from the old server and upload it here. We "
-"will recreate your old account here with all your contacts. We will try also"
-" to inform your friends that you moved here."
-msgstr "Devi esportare il tuo account dal vecchio server e caricarlo qui. Noi ricreeremo il tuo vecchio account qui, con tutti i tuoi contatti. Proveremo anche a informare i tuoi amici che ti sei spostato qui."
-
-#: mod/uimport.php:71
-msgid ""
-"This feature is experimental. We can't import contacts from the OStatus "
-"network (GNU Social/Statusnet) or from Diaspora"
-msgstr "Questa funzione è sperimentale. Non possiamo importare i contatti dalla rete OStatus (GNU Social/Statusnet) o da Diaspora"
-
-#: mod/uimport.php:72
-msgid "Account file"
-msgstr "File account"
-
-#: mod/uimport.php:72
-msgid ""
-"To export your account, go to \"Settings->Export your personal data\" and "
-"select \"Export account\""
-msgstr "Per esportare il tuo account, vai su \"Impostazioni -> Esporta i tuoi dati personali\" e seleziona \"Esporta account\""
-
-#: mod/update_community.php:19 mod/update_display.php:23
-#: mod/update_network.php:27 mod/update_notes.php:36 mod/update_profile.php:35
-msgid "[Embedded content - reload page to view]"
-msgstr "[Contenuto incorporato - ricarica la pagina per visualizzarlo correttamente]"
-
-#: mod/viewcontacts.php:75
-msgid "No contacts."
-msgstr "Nessun contatto."
-
-#: mod/viewsrc.php:7
-msgid "Access denied."
-msgstr "Accesso negato."
-
-#: mod/wall_attach.php:17 mod/wall_attach.php:25 mod/wall_attach.php:76
-#: mod/wall_upload.php:36 mod/wall_upload.php:52 mod/wall_upload.php:110
-#: mod/wall_upload.php:150 mod/wall_upload.php:153
-msgid "Invalid request."
-msgstr "Richiesta non valida."
-
-#: mod/wall_attach.php:94
-msgid "Sorry, maybe your upload is bigger than the PHP configuration allows"
-msgstr "Mi spiace, forse il file che stai caricando è più grosso di quanto la configurazione di PHP permetta"
-
-#: mod/wall_attach.php:94
-msgid "Or - did you try to upload an empty file?"
-msgstr "O.. non avrai provato a caricare un file vuoto?"
-
-#: mod/wall_attach.php:105
-#, php-format
-msgid "File exceeds size limit of %s"
-msgstr "Il file supera la dimensione massima di %s"
-
-#: mod/wall_attach.php:158 mod/wall_attach.php:174
-msgid "File upload failed."
-msgstr "Caricamento del file non riuscito."
-
-#: mod/wallmessage.php:42 mod/wallmessage.php:106
-#, php-format
-msgid "Number of daily wall messages for %s exceeded. Message failed."
-msgstr "Numero giornaliero di messaggi per %s superato. Invio fallito."
-
-#: mod/wallmessage.php:50 mod/message.php:60
-msgid "No recipient selected."
-msgstr "Nessun destinatario selezionato."
-
-#: mod/wallmessage.php:53
-msgid "Unable to check your home location."
-msgstr "Impossibile controllare la tua posizione di origine."
-
-#: mod/wallmessage.php:56 mod/message.php:67
-msgid "Message could not be sent."
-msgstr "Il messaggio non può essere inviato."
-
-#: mod/wallmessage.php:59 mod/message.php:70
-msgid "Message collection failure."
-msgstr "Errore recuperando il messaggio."
-
-#: mod/wallmessage.php:62 mod/message.php:73
-msgid "Message sent."
-msgstr "Messaggio inviato."
-
-#: mod/wallmessage.php:80 mod/wallmessage.php:89
-msgid "No recipient."
-msgstr "Nessun destinatario."
-
-#: mod/wallmessage.php:126 mod/message.php:322
-msgid "Send Private Message"
-msgstr "Invia un messaggio privato"
-
-#: mod/wallmessage.php:127
-#, php-format
-msgid ""
-"If you wish for %s to respond, please check that the privacy settings on "
-"your site allow private mail from unknown senders."
-msgstr "Se vuoi che %s ti risponda, controlla che le tue impostazioni di privacy permettano la ricezione di messaggi privati da mittenti sconosciuti."
-
-#: mod/wallmessage.php:128 mod/message.php:323 mod/message.php:510
-msgid "To:"
-msgstr "A:"
-
-#: mod/wallmessage.php:129 mod/message.php:328 mod/message.php:512
-msgid "Subject:"
-msgstr "Oggetto:"
-
-#: mod/babel.php:16
-msgid "Source (bbcode) text:"
-msgstr "Testo sorgente (bbcode):"
-
-#: mod/babel.php:23
-msgid "Source (Diaspora) text to convert to BBcode:"
-msgstr "Testo sorgente (da Diaspora) da convertire in BBcode:"
-
-#: mod/babel.php:31
-msgid "Source input: "
-msgstr "Sorgente:"
-
-#: mod/babel.php:35
-msgid "bb2html (raw HTML): "
-msgstr "bb2html (HTML grezzo):"
-
-#: mod/babel.php:39
-msgid "bb2html: "
-msgstr "bb2html:"
-
-#: mod/babel.php:43
-msgid "bb2html2bb: "
-msgstr "bb2html2bb: "
-
-#: mod/babel.php:47
-msgid "bb2md: "
-msgstr "bb2md: "
-
-#: mod/babel.php:51
-msgid "bb2md2html: "
-msgstr "bb2md2html: "
-
-#: mod/babel.php:55
-msgid "bb2dia2bb: "
-msgstr "bb2dia2bb: "
-
-#: mod/babel.php:59
-msgid "bb2md2html2bb: "
-msgstr "bb2md2html2bb: "
-
-#: mod/babel.php:65
-msgid "Source input (Diaspora format): "
-msgstr "Sorgente (formato Diaspora):"
-
-#: mod/babel.php:69
-msgid "diaspora2bb: "
-msgstr "diaspora2bb: "
-
-#: mod/cal.php:271 mod/events.php:375
-msgid "View"
-msgstr "Mostra"
-
-#: mod/cal.php:272 mod/events.php:377
-msgid "Previous"
-msgstr "Precedente"
-
-#: mod/cal.php:273 mod/events.php:378 mod/install.php:201
-msgid "Next"
-msgstr "Successivo"
-
-#: mod/cal.php:282 mod/events.php:387
-msgid "list"
-msgstr "lista"
-
-#: mod/cal.php:292
-msgid "User not found"
-msgstr "Utente non trovato"
-
-#: mod/cal.php:308
-msgid "This calendar format is not supported"
-msgstr "Questo formato di calendario non è supportato"
-
-#: mod/cal.php:310
-msgid "No exportable data found"
-msgstr "Nessun dato esportabile trovato"
-
-#: mod/cal.php:325
-msgid "calendar"
-msgstr "calendario"
-
-#: mod/community.php:23
-msgid "Not available."
-msgstr "Non disponibile."
-
-#: mod/community.php:50 mod/search.php:219
-msgid "No results."
-msgstr "Nessun risultato."
-
-#: mod/dfrn_confirm.php:70 mod/profiles.php:19 mod/profiles.php:135
-#: mod/profiles.php:182 mod/profiles.php:619
-msgid "Profile not found."
-msgstr "Profilo non trovato."
-
-#: mod/dfrn_confirm.php:127
-msgid ""
-"This may occasionally happen if contact was requested by both persons and it"
-" has already been approved."
-msgstr "Questo può accadere occasionalmente se la richiesta di contatto era stata inviata da entrambe le persone e  già approvata."
-
-#: mod/dfrn_confirm.php:244
-msgid "Response from remote site was not understood."
-msgstr "Errore di comunicazione con l'altro sito."
-
-#: mod/dfrn_confirm.php:253 mod/dfrn_confirm.php:258
-msgid "Unexpected response from remote site: "
-msgstr "La risposta dell'altro sito non può essere gestita: "
-
-#: mod/dfrn_confirm.php:267
-msgid "Confirmation completed successfully."
-msgstr "Conferma completata con successo."
-
-#: mod/dfrn_confirm.php:269 mod/dfrn_confirm.php:283 mod/dfrn_confirm.php:290
-msgid "Remote site reported: "
-msgstr "Il sito remoto riporta: "
-
-#: mod/dfrn_confirm.php:281
-msgid "Temporary failure. Please wait and try again."
-msgstr "Problema temporaneo. Attendi e riprova."
-
-#: mod/dfrn_confirm.php:288
-msgid "Introduction failed or was revoked."
-msgstr "La presentazione ha generato un errore o è stata revocata."
-
-#: mod/dfrn_confirm.php:418
-msgid "Unable to set contact photo."
-msgstr "Impossibile impostare la foto del contatto."
-
-#: mod/dfrn_confirm.php:559
-#, php-format
-msgid "No user record found for '%s' "
-msgstr "Nessun utente trovato '%s'"
-
-#: mod/dfrn_confirm.php:569
-msgid "Our site encryption key is apparently messed up."
-msgstr "La nostra chiave di criptazione del sito sembra essere corrotta."
-
-#: mod/dfrn_confirm.php:580
-msgid "Empty site URL was provided or URL could not be decrypted by us."
-msgstr "E' stato fornito un indirizzo vuoto o non possiamo decrittare l'indirizzo."
-
-#: mod/dfrn_confirm.php:602
-msgid "Contact record was not found for you on our site."
-msgstr "Il contatto non è stato trovato sul nostro sito."
-
-#: mod/dfrn_confirm.php:616
-#, php-format
-msgid "Site public key not available in contact record for URL %s."
-msgstr "La chiave pubblica del sito non è disponibile per l'URL %s"
-
-#: mod/dfrn_confirm.php:636
-msgid ""
-"The ID provided by your system is a duplicate on our system. It should work "
-"if you try again."
-msgstr "L'ID fornito dal tuo sistema è duplicato sul nostro sistema. Se riprovi dovrebbe funzionare."
-
-#: mod/dfrn_confirm.php:647
-msgid "Unable to set your contact credentials on our system."
-msgstr "Impossibile impostare le credenziali del tuo contatto sul nostro sistema."
-
-#: mod/dfrn_confirm.php:709
-msgid "Unable to update your contact profile details on our system"
-msgstr "Impossibile aggiornare i dettagli del tuo contatto sul nostro sistema"
-
-#: mod/dfrn_confirm.php:781
-#, php-format
-msgid "%1$s has joined %2$s"
-msgstr "%1$s si è unito a %2$s"
-
-#: mod/dfrn_request.php:101
-msgid "This introduction has already been accepted."
-msgstr "Questa presentazione è già stata accettata."
-
-#: mod/dfrn_request.php:124 mod/dfrn_request.php:528
-msgid "Profile location is not valid or does not contain profile information."
-msgstr "L'indirizzo del profilo non è valido o non contiene un profilo."
-
-#: mod/dfrn_request.php:129 mod/dfrn_request.php:533
-msgid "Warning: profile location has no identifiable owner name."
-msgstr "Attenzione: l'indirizzo del profilo non riporta il nome del proprietario."
-
-#: mod/dfrn_request.php:132 mod/dfrn_request.php:536
-msgid "Warning: profile location has no profile photo."
-msgstr "Attenzione: l'indirizzo del profilo non ha una foto."
-
-#: mod/dfrn_request.php:136 mod/dfrn_request.php:540
-#, 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 parametro richiesto non è stato trovato all'indirizzo dato"
-msgstr[1] "%d parametri richiesti non sono stati trovati all'indirizzo dato"
-
-#: mod/dfrn_request.php:180
-msgid "Introduction complete."
-msgstr "Presentazione completa."
-
-#: mod/dfrn_request.php:225
-msgid "Unrecoverable protocol error."
-msgstr "Errore di comunicazione."
-
-#: mod/dfrn_request.php:253
-msgid "Profile unavailable."
-msgstr "Profilo non disponibile."
-
-#: mod/dfrn_request.php:280
-#, php-format
-msgid "%s has received too many connection requests today."
-msgstr "%s ha ricevuto troppe richieste di connessione per oggi."
-
-#: mod/dfrn_request.php:281
-msgid "Spam protection measures have been invoked."
-msgstr "Sono state attivate le misure di protezione contro lo spam."
-
-#: mod/dfrn_request.php:282
-msgid "Friends are advised to please try again in 24 hours."
-msgstr "Gli amici sono pregati di riprovare tra 24 ore."
-
-#: mod/dfrn_request.php:344
-msgid "Invalid locator"
-msgstr "Indirizzo non valido"
-
-#: mod/dfrn_request.php:353
-msgid "Invalid email address."
-msgstr "Indirizzo email non valido."
-
-#: mod/dfrn_request.php:378
-msgid "This account has not been configured for email. Request failed."
-msgstr "Questo account non è stato configurato per l'email. Richiesta fallita."
-
-#: mod/dfrn_request.php:481
-msgid "You have already introduced yourself here."
-msgstr "Ti sei già presentato qui."
-
-#: mod/dfrn_request.php:485
-#, php-format
-msgid "Apparently you are already friends with %s."
-msgstr "Pare che tu e %s siate già amici."
-
-#: mod/dfrn_request.php:506
-msgid "Invalid profile URL."
-msgstr "Indirizzo profilo non valido."
-
-#: mod/dfrn_request.php:614
-msgid "Your introduction has been sent."
-msgstr "La tua presentazione è stata inviata."
-
-#: mod/dfrn_request.php:656
-msgid ""
-"Remote subscription can't be done for your network. Please subscribe "
-"directly on your system."
-msgstr "La richiesta di connessione remota non può essere effettuata per la tua rete. Invia la richiesta direttamente sul nostro sistema."
-
-#: mod/dfrn_request.php:677
-msgid "Please login to confirm introduction."
-msgstr "Accedi per confermare la presentazione."
-
-#: mod/dfrn_request.php:687
-msgid ""
-"Incorrect identity currently logged in. Please login to "
-"this profile."
-msgstr "Non hai fatto accesso con l'identità corretta. Accedi a questo profilo."
-
-#: mod/dfrn_request.php:701 mod/dfrn_request.php:718
-msgid "Confirm"
-msgstr "Conferma"
-
-#: mod/dfrn_request.php:713
-msgid "Hide this contact"
-msgstr "Nascondi questo contatto"
-
-#: mod/dfrn_request.php:716
-#, php-format
-msgid "Welcome home %s."
-msgstr "Bentornato a casa %s."
-
-#: mod/dfrn_request.php:717
-#, php-format
-msgid "Please confirm your introduction/connection request to %s."
-msgstr "Conferma la tua richiesta di connessione con %s."
-
-#: mod/dfrn_request.php:848
-msgid ""
-"Please enter your 'Identity Address' from one of the following supported "
-"communications networks:"
-msgstr "Inserisci il tuo 'Indirizzo Identità' da uno dei seguenti network supportati:"
-
-#: mod/dfrn_request.php:872
-#, php-format
-msgid ""
-"If you are not yet a member of the free social web, follow this link to find a public Friendica site and "
-"join us today."
-msgstr "Se non sei un membro del web sociale libero,  segui questo link per trovare un sito Friendica pubblico e unisciti a noi oggi"
-
-#: mod/dfrn_request.php:877
-msgid "Friend/Connection Request"
-msgstr "Richieste di amicizia/connessione"
-
-#: mod/dfrn_request.php:878
-msgid ""
-"Examples: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, "
-"testuser@identi.ca"
-msgstr "Esempi: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, testuser@identi.ca"
-
-#: mod/dfrn_request.php:879 mod/follow.php:112
-msgid "Please answer the following:"
-msgstr "Rispondi:"
-
-#: mod/dfrn_request.php:880 mod/follow.php:113
-#, php-format
-msgid "Does %s know you?"
-msgstr "%s ti conosce?"
-
-#: mod/dfrn_request.php:884 mod/follow.php:114
-msgid "Add a personal note:"
-msgstr "Aggiungi una nota personale:"
-
-#: mod/dfrn_request.php:887
-msgid "StatusNet/Federated Social Web"
-msgstr "StatusNet/Federated Social Web"
-
-#: mod/dfrn_request.php:889
-#, php-format
-msgid ""
-" - please do not use this form.  Instead, enter %s into your Diaspora search"
-" bar."
-msgstr " - per favore non usare questa form. Invece, inserisci %s nella tua barra di ricerca su Diaspora."
-
-#: mod/dfrn_request.php:890 mod/follow.php:120
-msgid "Your Identity Address:"
-msgstr "L'indirizzo della tua identità:"
-
-#: mod/dfrn_request.php:893 mod/follow.php:19
-msgid "Submit Request"
-msgstr "Invia richiesta"
-
-#: mod/dirfind.php:37
-#, php-format
-msgid "People Search - %s"
-msgstr "Cerca persone - %s"
-
-#: mod/dirfind.php:48
-#, php-format
-msgid "Forum Search - %s"
-msgstr "Ricerca Forum  - %s"
-
-#: mod/events.php:93 mod/events.php:95
-msgid "Event can not end before it has started."
-msgstr "Un evento non può finire prima di iniziare."
-
-#: mod/events.php:102 mod/events.php:104
-msgid "Event title and start time are required."
-msgstr "Titolo e ora di inizio dell'evento sono richiesti."
-
-#: mod/events.php:376
-msgid "Create New Event"
-msgstr "Crea un nuovo evento"
-
-#: mod/events.php:481
-msgid "Event details"
-msgstr "Dettagli dell'evento"
-
-#: mod/events.php:482
-msgid "Starting date and Title are required."
-msgstr "La data di inizio e il titolo sono richiesti."
-
-#: mod/events.php:483 mod/events.php:484
-msgid "Event Starts:"
-msgstr "L'evento inizia:"
-
-#: mod/events.php:483 mod/events.php:495 mod/profiles.php:709
-msgid "Required"
-msgstr "Richiesto"
-
-#: mod/events.php:485 mod/events.php:501
-msgid "Finish date/time is not known or not relevant"
-msgstr "La data/ora di fine non è definita"
-
-#: mod/events.php:487 mod/events.php:488
-msgid "Event Finishes:"
-msgstr "L'evento finisce:"
-
-#: mod/events.php:489 mod/events.php:502
-msgid "Adjust for viewer timezone"
-msgstr "Visualizza con il fuso orario di chi legge"
-
-#: mod/events.php:491
-msgid "Description:"
-msgstr "Descrizione:"
-
-#: mod/events.php:495 mod/events.php:497
-msgid "Title:"
-msgstr "Titolo:"
-
-#: mod/events.php:498 mod/events.php:499
-msgid "Share this event"
-msgstr "Condividi questo evento"
-
-#: mod/events.php:528
-msgid "Failed to remove event"
-msgstr "Rimozione evento fallita."
-
-#: mod/events.php:530
-msgid "Event removed"
-msgstr "Evento rimosso"
-
-#: mod/follow.php:30
-msgid "You already added this contact."
-msgstr "Hai già aggiunto questo contatto."
-
-#: mod/follow.php:39
-msgid "Diaspora support isn't enabled. Contact can't be added."
-msgstr "Il supporto Diaspora non è abilitato. Il contatto non può essere aggiunto."
-
-#: mod/follow.php:46
-msgid "OStatus support is disabled. Contact can't be added."
-msgstr "Il supporto OStatus non è abilitato. Il contatto non può essere aggiunto."
-
-#: mod/follow.php:53
-msgid "The network type couldn't be detected. Contact can't be added."
-msgstr "Non è possibile rilevare il tipo di rete. Il contatto non può essere aggiunto."
-
-#: mod/follow.php:186
-msgid "Contact added"
-msgstr "Contatto aggiunto"
-
-#: mod/friendica.php:68
-msgid "This is Friendica, version"
-msgstr "Questo è Friendica, versione"
-
-#: mod/friendica.php:69
-msgid "running at web location"
-msgstr "in esecuzione all'indirizzo web"
-
-#: mod/friendica.php:73
-msgid ""
-"Please visit Friendica.com to learn "
-"more about the Friendica project."
-msgstr "Visita Friendica.com per saperne di più sul progetto Friendica."
-
-#: mod/friendica.php:77
-msgid "Bug reports and issues: please visit"
-msgstr "Segnalazioni di bug e problemi: visita"
-
-#: mod/friendica.php:77
-msgid "the bugtracker at github"
-msgstr "il bugtracker su github"
-
-#: mod/friendica.php:80
-msgid ""
-"Suggestions, praise, donations, etc. - please email \"Info\" at Friendica - "
-"dot com"
-msgstr "Suggerimenti, lodi, donazioni, ecc -  e-mail a  \"Info\" at Friendica punto com"
-
-#: mod/friendica.php:94
-msgid "Installed plugins/addons/apps:"
-msgstr "Plugin/componenti aggiuntivi/applicazioni installate"
-
-#: mod/friendica.php:108
-msgid "No installed plugins/addons/apps"
-msgstr "Nessun plugin/componente aggiuntivo/applicazione installata"
-
-#: mod/friendica.php:113
-msgid "On this server the following remote servers are blocked."
-msgstr "In questo server i seguenti server remoti sono bloccati."
-
-#: mod/friendica.php:114 mod/admin.php:280 mod/admin.php:298
-msgid "Reason for the block"
-msgstr "Motivazione del blocco"
-
-#: mod/group.php:29
-msgid "Group created."
-msgstr "Gruppo creato."
-
-#: mod/group.php:35
-msgid "Could not create group."
-msgstr "Impossibile creare il gruppo."
-
-#: mod/group.php:49 mod/group.php:154
-msgid "Group not found."
-msgstr "Gruppo non trovato."
-
-#: mod/group.php:63
-msgid "Group name changed."
-msgstr "Il nome del gruppo è cambiato."
-
-#: mod/group.php:93
-msgid "Save Group"
-msgstr "Salva gruppo"
-
-#: mod/group.php:98
-msgid "Create a group of contacts/friends."
-msgstr "Crea un gruppo di amici/contatti."
-
-#: mod/group.php:123
-msgid "Group removed."
-msgstr "Gruppo rimosso."
-
-#: mod/group.php:125
-msgid "Unable to remove group."
-msgstr "Impossibile rimuovere il gruppo."
-
-#: mod/group.php:189
-msgid "Delete Group"
-msgstr "Elimina Gruppo"
-
-#: mod/group.php:195
-msgid "Group Editor"
-msgstr "Modifica gruppo"
-
-#: mod/group.php:200
-msgid "Edit Group Name"
-msgstr "Modifica Nome Gruppo"
-
-#: mod/group.php:210
-msgid "Members"
-msgstr "Membri"
-
-#: mod/group.php:226
-msgid "Remove Contact"
-msgstr "Rimuovi Contatto"
-
-#: mod/group.php:250
-msgid "Add Contact"
-msgstr "Aggiungi Contatto"
-
-#: mod/manage.php:151
+#: mod/manage.php:153
 msgid "Manage Identities and/or Pages"
 msgstr "Gestisci identità e/o pagine"
 
-#: mod/manage.php:152
+#: mod/manage.php:154
 msgid ""
 "Toggle between different identities or community/group pages which share "
 "your account details or which you have been granted \"manage\" permissions"
 msgstr "Cambia tra differenti identità o pagine comunità/gruppi che condividono il tuo account o per cui hai i permessi di gestione"
 
-#: mod/manage.php:153
+#: mod/manage.php:155
 msgid "Select an identity to manage: "
 msgstr "Seleziona un'identità da gestire:"
 
-#: mod/message.php:64
+#: mod/match.php:39
+msgid "No keywords to match. Please add keywords to your default profile."
+msgstr "Nessuna parola chiave per l'abbinamento. Aggiungi parole chiave al tuo profilo predefinito."
+
+#: mod/match.php:92
+msgid "is interested in:"
+msgstr "è interessato a:"
+
+#: mod/match.php:106
+msgid "Profile Match"
+msgstr "Profili corrispondenti"
+
+#: mod/match.php:113 mod/dirfind.php:249
+msgid "No matches"
+msgstr "Nessun risultato"
+
+#: mod/message.php:63 mod/wallmessage.php:53
+msgid "No recipient selected."
+msgstr "Nessun destinatario selezionato."
+
+#: mod/message.php:67
 msgid "Unable to locate contact information."
 msgstr "Impossibile trovare le informazioni del contatto."
 
-#: mod/message.php:204
+#: mod/message.php:70 mod/wallmessage.php:59
+msgid "Message could not be sent."
+msgstr "Il messaggio non può essere inviato."
+
+#: mod/message.php:73 mod/wallmessage.php:62
+msgid "Message collection failure."
+msgstr "Errore recuperando il messaggio."
+
+#: mod/message.php:76 mod/wallmessage.php:65
+msgid "Message sent."
+msgstr "Messaggio inviato."
+
+#: mod/message.php:205
 msgid "Do you really want to delete this message?"
 msgstr "Vuoi veramente cancellare questo messaggio?"
 
-#: mod/message.php:224
+#: mod/message.php:225
 msgid "Message deleted."
 msgstr "Messaggio eliminato."
 
@@ -5326,6 +4315,18 @@ msgstr "Messaggio eliminato."
 msgid "Conversation removed."
 msgstr "Conversazione rimossa."
 
+#: mod/message.php:322 mod/wallmessage.php:129
+msgid "Send Private Message"
+msgstr "Invia un messaggio privato"
+
+#: mod/message.php:323 mod/message.php:510 mod/wallmessage.php:131
+msgid "To:"
+msgstr "A:"
+
+#: mod/message.php:328 mod/message.php:512 mod/wallmessage.php:132
+msgid "Subject:"
+msgstr "Oggetto:"
+
 #: mod/message.php:364
 msgid "No messages."
 msgstr "Nessun messaggio."
@@ -5334,7 +4335,7 @@ msgstr "Nessun messaggio."
 msgid "Message not available."
 msgstr "Messaggio non disponibile."
 
-#: mod/message.php:477
+#: mod/message.php:478
 msgid "Delete message"
 msgstr "Elimina il messaggio"
 
@@ -5378,11 +4379,2767 @@ msgid_plural "%d messages"
 msgstr[0] "%d messaggio"
 msgstr[1] "%d messaggi"
 
-#: mod/network.php:197 mod/search.php:25
+#: mod/notifications.php:38
+msgid "Invalid request identifier."
+msgstr "L'identificativo della richiesta non è valido."
+
+#: mod/notifications.php:47 mod/notifications.php:183
+#: mod/notifications.php:230
+msgid "Discard"
+msgstr "Scarta"
+
+#: mod/notifications.php:63 mod/notifications.php:182
+#: mod/notifications.php:266 mod/contacts.php:636 mod/contacts.php:836
+#: mod/contacts.php:1021
+msgid "Ignore"
+msgstr "Ignora"
+
+#: mod/notifications.php:108
+msgid "Network Notifications"
+msgstr "Notifiche dalla rete"
+
+#: mod/notifications.php:114 mod/notify.php:73
+msgid "System Notifications"
+msgstr "Notifiche di sistema"
+
+#: mod/notifications.php:120
+msgid "Personal Notifications"
+msgstr "Notifiche personali"
+
+#: mod/notifications.php:126
+msgid "Home Notifications"
+msgstr "Notifiche bacheca"
+
+#: mod/notifications.php:155
+msgid "Show Ignored Requests"
+msgstr "Mostra richieste ignorate"
+
+#: mod/notifications.php:155
+msgid "Hide Ignored Requests"
+msgstr "Nascondi richieste ignorate"
+
+#: mod/notifications.php:167 mod/notifications.php:237
+msgid "Notification type: "
+msgstr "Tipo di notifica: "
+
+#: mod/notifications.php:170
+#, php-format
+msgid "suggested by %s"
+msgstr "suggerito da %s"
+
+#: mod/notifications.php:175 mod/notifications.php:254 mod/contacts.php:643
+msgid "Hide this contact from others"
+msgstr "Nascondi questo contatto agli altri"
+
+#: mod/notifications.php:176 mod/notifications.php:255
+msgid "Post a new friend activity"
+msgstr "Invia una attività \"è ora amico con\""
+
+#: mod/notifications.php:176 mod/notifications.php:255
+msgid "if applicable"
+msgstr "se applicabile"
+
+#: mod/notifications.php:179 mod/notifications.php:264 mod/admin.php:1628
+msgid "Approve"
+msgstr "Approva"
+
+#: mod/notifications.php:198
+msgid "Claims to be known to you: "
+msgstr "Dice di conoscerti: "
+
+#: mod/notifications.php:199
+msgid "yes"
+msgstr "si"
+
+#: mod/notifications.php:199
+msgid "no"
+msgstr "no"
+
+#: mod/notifications.php:200 mod/notifications.php:205
+msgid "Shall your connection be bidirectional or not?"
+msgstr "La connessione dovrà essere bidirezionale o no?"
+
+#: mod/notifications.php:201 mod/notifications.php:206
+#, php-format
+msgid ""
+"Accepting %s as a friend allows %s to subscribe to your posts, and you will "
+"also receive updates from them in your news feed."
+msgstr "Accettando %s come amico permette a %s di seguire i tuoi post, e a te di riceverne gli aggiornamenti."
+
+#: mod/notifications.php:202
+#, php-format
+msgid ""
+"Accepting %s as a subscriber allows them to subscribe to your posts, but you"
+" will not receive updates from them in your news feed."
+msgstr "Accentrando %s come  abbonato gli permette di abbonarsi ai tuoi messaggi, ma tu non riceverai aggiornamenti da lui."
+
+#: mod/notifications.php:207
+#, php-format
+msgid ""
+"Accepting %s as a sharer allows them to subscribe to your posts, but you "
+"will not receive updates from them in your news feed."
+msgstr "Accentando %s come condivisore, gli permetti di abbonarsi ai tuoi messaggi, ma tu non riceverai nessun aggiornamento da loro."
+
+#: mod/notifications.php:218
+msgid "Friend"
+msgstr "Amico"
+
+#: mod/notifications.php:219
+msgid "Sharer"
+msgstr "Condivisore"
+
+#: mod/notifications.php:219
+msgid "Subscriber"
+msgstr "Abbonato"
+
+#: mod/notifications.php:275
+msgid "No introductions."
+msgstr "Nessuna presentazione."
+
+#: mod/notifications.php:316
+msgid "Show unread"
+msgstr "Mostra non letti"
+
+#: mod/notifications.php:316
+msgid "Show all"
+msgstr "Mostra tutti"
+
+#: mod/notifications.php:322
+#, php-format
+msgid "No more %s notifications."
+msgstr "Nessun'altra notifica %s."
+
+#: mod/notify.php:69
+msgid "No more system notifications."
+msgstr "Nessuna nuova notifica di sistema."
+
+#: mod/oexchange.php:25
+msgid "Post successful."
+msgstr "Inviato!"
+
+#: mod/openid.php:25
+msgid "OpenID protocol error. No ID returned."
+msgstr "Errore protocollo OpenID. Nessun ID ricevuto."
+
+#: mod/openid.php:61
+msgid ""
+"Account not found and OpenID registration is not permitted on this site."
+msgstr "L'account non è stato trovato, e la registrazione via OpenID non è permessa su questo sito."
+
+#: mod/p.php:13
+msgid "Not Extended"
+msgstr "Not Extended"
+
+#: mod/profile.php:177
+msgid "Tips for New Members"
+msgstr "Consigli per i Nuovi Utenti"
+
+#: mod/removeme.php:55 mod/removeme.php:58
+msgid "Remove My Account"
+msgstr "Rimuovi il mio account"
+
+#: mod/removeme.php:56
+msgid ""
+"This will completely remove your account. Once this has been done it is not "
+"recoverable."
+msgstr "Questo comando rimuoverà completamente il tuo account. Una volta rimosso non potrai più recuperarlo."
+
+#: mod/removeme.php:57
+msgid "Please enter your password for verification:"
+msgstr "Inserisci la tua password per verifica:"
+
+#: mod/repair_ostatus.php:17
+msgid "Resubscribing to OStatus contacts"
+msgstr "Risottoscrivi i contatti OStatus"
+
+#: mod/repair_ostatus.php:33
+msgid "Error"
+msgstr "Errore"
+
+#: mod/repair_ostatus.php:47 mod/ostatus_subscribe.php:57
+msgid "Done"
+msgstr "Fatto"
+
+#: mod/repair_ostatus.php:53 mod/ostatus_subscribe.php:81
+msgid "Keep this window open until done."
+msgstr "Tieni questa finestra aperta fino a che ha finito."
+
+#: mod/subthread.php:106
+#, php-format
+msgid "%1$s is following %2$s's %3$s"
+msgstr "%1$s sta seguendo %3$s di %2$s"
+
+#: mod/tagrm.php:46
+msgid "Tag removed"
+msgstr "Tag rimosso"
+
+#: mod/tagrm.php:85
+msgid "Remove Item Tag"
+msgstr "Rimuovi il tag"
+
+#: mod/tagrm.php:87
+msgid "Select a tag to remove: "
+msgstr "Seleziona un tag da rimuovere: "
+
+#: mod/tagrm.php:98 mod/delegate.php:139
+msgid "Remove"
+msgstr "Rimuovi"
+
+#: mod/uexport.php:39
+msgid "Export account"
+msgstr "Esporta account"
+
+#: mod/uexport.php:39
+msgid ""
+"Export your account info and contacts. Use this to make a backup of your "
+"account and/or to move it to another server."
+msgstr "Esporta le informazioni del tuo account e dei contatti. Usa questa funzione per fare un backup del tuo account o per spostarlo in un altro server."
+
+#: mod/uexport.php:40
+msgid "Export all"
+msgstr "Esporta tutto"
+
+#: mod/uexport.php:40
+msgid ""
+"Export your accout info, contacts and all your items as json. Could be a "
+"very big file, and could take a lot of time. Use this to make a full backup "
+"of your account (photos are not exported)"
+msgstr "Esporta le informazioni del tuo account, i tuoi contatti e tutti i tuoi elementi in json. Può diventare un file veramente molto grosso e metterci un sacco di tempo. Usa questa funzione per fare un backup completo del tuo account (le foto non sono esportate)"
+
+#: mod/uexport.php:47 mod/settings.php:95
+msgid "Export personal data"
+msgstr "Esporta dati personali"
+
+#: mod/wallmessage.php:45 mod/wallmessage.php:109
+#, php-format
+msgid "Number of daily wall messages for %s exceeded. Message failed."
+msgstr "Numero giornaliero di messaggi per %s superato. Invio fallito."
+
+#: mod/wallmessage.php:56
+msgid "Unable to check your home location."
+msgstr "Impossibile controllare la tua posizione di origine."
+
+#: mod/wallmessage.php:83 mod/wallmessage.php:92
+msgid "No recipient."
+msgstr "Nessun destinatario."
+
+#: mod/wallmessage.php:130
+#, php-format
+msgid ""
+"If you wish for %s to respond, please check that the privacy settings on "
+"your site allow private mail from unknown senders."
+msgstr "Se vuoi che %s ti risponda, controlla che le tue impostazioni di privacy permettano la ricezione di messaggi privati da mittenti sconosciuti."
+
+#: mod/delegate.php:101
+msgid "No potential page delegates located."
+msgstr "Nessun potenziale delegato per la pagina è stato trovato."
+
+#: mod/delegate.php:132
+msgid ""
+"Delegates are able to manage all aspects of this account/page except for "
+"basic account settings. Please do not delegate your personal account to "
+"anybody that you do not trust completely."
+msgstr "I Delegati sono in grado di gestire tutti gli aspetti di questa pagina, tranne per le impostazioni di base dell'account. Non delegare il tuo account personale a nessuno di cui non ti fidi ciecamente."
+
+#: mod/delegate.php:133
+msgid "Existing Page Managers"
+msgstr "Gestori Pagina Esistenti"
+
+#: mod/delegate.php:135
+msgid "Existing Page Delegates"
+msgstr "Delegati Pagina Esistenti"
+
+#: mod/delegate.php:137
+msgid "Potential Delegates"
+msgstr "Delegati Potenziali"
+
+#: mod/delegate.php:140
+msgid "Add"
+msgstr "Aggiungi"
+
+#: mod/delegate.php:141
+msgid "No entries."
+msgstr "Nessuna voce."
+
+#: mod/suggest.php:30
+msgid "Do you really want to delete this suggestion?"
+msgstr "Vuoi veramente cancellare questo suggerimento?"
+
+#: mod/suggest.php:71
+msgid ""
+"No suggestions available. If this is a new site, please try again in 24 "
+"hours."
+msgstr "Nessun suggerimento disponibile. Se questo è un sito nuovo, riprova tra 24 ore."
+
+#: mod/suggest.php:84 mod/suggest.php:104
+msgid "Ignore/Hide"
+msgstr "Ignora / Nascondi"
+
+#: mod/directory.php:193 view/theme/vier/theme.php:194
+msgid "Global Directory"
+msgstr "Elenco globale"
+
+#: mod/directory.php:195
+msgid "Find on this site"
+msgstr "Cerca nel sito"
+
+#: mod/directory.php:197
+msgid "Results for:"
+msgstr "Risultati per:"
+
+#: mod/directory.php:199
+msgid "Site Directory"
+msgstr "Elenco del sito"
+
+#: mod/directory.php:206
+msgid "No entries (some entries may be hidden)."
+msgstr "Nessuna voce (qualche voce potrebbe essere nascosta)."
+
+#: mod/fbrowser.php:136
+msgid "Files"
+msgstr "File"
+
+#: mod/friendica.php:70
+msgid "This is Friendica, version"
+msgstr "Questo è Friendica, versione"
+
+#: mod/friendica.php:71
+msgid "running at web location"
+msgstr "in esecuzione all'indirizzo web"
+
+#: mod/friendica.php:75
+msgid ""
+"Please visit Friendi.ca to learn more "
+"about the Friendica project."
+msgstr "Visita Friendi.ca per saperne di più sul progetto Friendica."
+
+#: mod/friendica.php:79
+msgid "Bug reports and issues: please visit"
+msgstr "Segnalazioni di bug e problemi: visita"
+
+#: mod/friendica.php:79
+msgid "the bugtracker at github"
+msgstr "il bugtracker su github"
+
+#: mod/friendica.php:82
+msgid ""
+"Suggestions, praise, donations, etc. - please email \"Info\" at Friendica - "
+"dot com"
+msgstr "Suggerimenti, lodi, donazioni, ecc -  e-mail a  \"Info\" at Friendica punto com"
+
+#: mod/friendica.php:96
+msgid "Installed plugins/addons/apps:"
+msgstr "Plugin/componenti aggiuntivi/applicazioni installate"
+
+#: mod/friendica.php:110
+msgid "No installed plugins/addons/apps"
+msgstr "Nessun plugin/componente aggiuntivo/applicazione installata"
+
+#: mod/friendica.php:115
+msgid "On this server the following remote servers are blocked."
+msgstr "In questo server i seguenti server remoti sono bloccati."
+
+#: mod/friendica.php:116 mod/admin.php:291 mod/admin.php:309
+msgid "Reason for the block"
+msgstr "Motivazione del blocco"
+
+#: mod/install.php:107
+msgid "Friendica Communications Server - Setup"
+msgstr "Friendica Comunicazione Server - Impostazioni"
+
+#: mod/install.php:113
+msgid "Could not connect to database."
+msgstr " Impossibile collegarsi con il database."
+
+#: mod/install.php:117
+msgid "Could not create table."
+msgstr "Impossibile creare le tabelle."
+
+#: mod/install.php:123
+msgid "Your Friendica site database has been installed."
+msgstr "Il tuo Friendica è stato installato."
+
+#: mod/install.php:128
+msgid ""
+"You may need to import the file \"database.sql\" manually using phpmyadmin "
+"or mysql."
+msgstr "Potresti dover importare il file \"database.sql\" manualmente con phpmyadmin o mysql"
+
+#: mod/install.php:129 mod/install.php:201 mod/install.php:548
+msgid "Please see the file \"INSTALL.txt\"."
+msgstr "Leggi il file \"INSTALL.txt\"."
+
+#: mod/install.php:141
+msgid "Database already in use."
+msgstr "Database già in uso."
+
+#: mod/install.php:198
+msgid "System check"
+msgstr "Controllo sistema"
+
+#: mod/install.php:203
+msgid "Check again"
+msgstr "Controlla ancora"
+
+#: mod/install.php:222
+msgid "Database connection"
+msgstr "Connessione al database"
+
+#: mod/install.php:223
+msgid ""
+"In order to install Friendica we need to know how to connect to your "
+"database."
+msgstr "Per installare Friendica dobbiamo sapere come collegarci al tuo database."
+
+#: mod/install.php:224
+msgid ""
+"Please contact your hosting provider or site administrator if you have "
+"questions about these settings."
+msgstr "Contatta il tuo fornitore di hosting o l'amministratore del sito se hai domande su queste impostazioni."
+
+#: mod/install.php:225
+msgid ""
+"The database you specify below should already exist. If it does not, please "
+"create it before continuing."
+msgstr "Il database dovrà già esistere. Se non esiste, crealo prima di continuare."
+
+#: mod/install.php:229
+msgid "Database Server Name"
+msgstr "Nome del database server"
+
+#: mod/install.php:230
+msgid "Database Login Name"
+msgstr "Nome utente database"
+
+#: mod/install.php:231
+msgid "Database Login Password"
+msgstr "Password utente database"
+
+#: mod/install.php:231
+msgid "For security reasons the password must not be empty"
+msgstr "Per motivi di sicurezza la password non puo' essere vuota."
+
+#: mod/install.php:232
+msgid "Database Name"
+msgstr "Nome database"
+
+#: mod/install.php:233 mod/install.php:274
+msgid "Site administrator email address"
+msgstr "Indirizzo email dell'amministratore del sito"
+
+#: mod/install.php:233 mod/install.php:274
+msgid ""
+"Your account email address must match this in order to use the web admin "
+"panel."
+msgstr "Il tuo indirizzo email deve corrispondere a questo per poter usare il pannello di amministrazione web."
+
+#: mod/install.php:237 mod/install.php:277
+msgid "Please select a default timezone for your website"
+msgstr "Seleziona il fuso orario predefinito per il tuo sito web"
+
+#: mod/install.php:264
+msgid "Site settings"
+msgstr "Impostazioni sito"
+
+#: mod/install.php:278
+msgid "System Language:"
+msgstr "Lingua di Sistema:"
+
+#: mod/install.php:278
+msgid ""
+"Set the default language for your Friendica installation interface and to "
+"send emails."
+msgstr "Imposta la lingua di default per l'interfaccia e l'invio delle email."
+
+#: mod/install.php:318
+msgid "Could not find a command line version of PHP in the web server PATH."
+msgstr "Non riesco a trovare la versione di PHP da riga di comando nel PATH del server web"
+
+#: mod/install.php:319
+msgid ""
+"If you don't have a command line version of PHP installed on server, you "
+"will not be able to run the background processing. See 'Setup the poller'"
+msgstr "Se non hai la versione a riga di comando di PHP installata sul tuo server, non sarai in grado di eseguire i processi in background. Vedi 'Setup the poller'"
+
+#: mod/install.php:323
+msgid "PHP executable path"
+msgstr "Percorso eseguibile PHP"
+
+#: mod/install.php:323
+msgid ""
+"Enter full path to php executable. You can leave this blank to continue the "
+"installation."
+msgstr "Inserisci il percorso completo all'eseguibile di php. Puoi lasciare bianco questo campo per continuare l'installazione."
+
+#: mod/install.php:328
+msgid "Command line PHP"
+msgstr "PHP da riga di comando"
+
+#: mod/install.php:337
+msgid "PHP executable is not the php cli binary (could be cgi-fgci version)"
+msgstr "L'eseguibile PHP non è il binario php cli (potrebbe essere la versione cgi-fcgi)"
+
+#: mod/install.php:338
+msgid "Found PHP version: "
+msgstr "Versione PHP:"
+
+#: mod/install.php:340
+msgid "PHP cli binary"
+msgstr "Binario PHP cli"
+
+#: mod/install.php:351
+msgid ""
+"The command line version of PHP on your system does not have "
+"\"register_argc_argv\" enabled."
+msgstr "La versione da riga di comando di PHP nel sistema non ha abilitato \"register_argc_argv\"."
+
+#: mod/install.php:352
+msgid "This is required for message delivery to work."
+msgstr "E' obbligatorio per far funzionare la consegna dei messaggi."
+
+#: mod/install.php:354
+msgid "PHP register_argc_argv"
+msgstr "PHP register_argc_argv"
+
+#: mod/install.php:377
+msgid ""
+"Error: the \"openssl_pkey_new\" function on this system is not able to "
+"generate encryption keys"
+msgstr "Errore: la funzione \"openssl_pkey_new\" in questo sistema non è in grado di generare le chiavi di criptazione"
+
+#: mod/install.php:378
+msgid ""
+"If running under Windows, please see "
+"\"http://www.php.net/manual/en/openssl.installation.php\"."
+msgstr "Se stai eseguendo friendika su windows, guarda \"http://www.php.net/manual/en/openssl.installation.php\"."
+
+#: mod/install.php:380
+msgid "Generate encryption keys"
+msgstr "Genera chiavi di criptazione"
+
+#: mod/install.php:387
+msgid "libCurl PHP module"
+msgstr "modulo PHP libCurl"
+
+#: mod/install.php:388
+msgid "GD graphics PHP module"
+msgstr "modulo PHP GD graphics"
+
+#: mod/install.php:389
+msgid "OpenSSL PHP module"
+msgstr "modulo PHP OpenSSL"
+
+#: mod/install.php:390
+msgid "PDO or MySQLi PHP module"
+msgstr "modulo PHP PDO o MySQLi"
+
+#: mod/install.php:391
+msgid "mb_string PHP module"
+msgstr "modulo PHP mb_string"
+
+#: mod/install.php:392
+msgid "XML PHP module"
+msgstr "Modulo PHP XML"
+
+#: mod/install.php:393
+msgid "iconv module"
+msgstr "modulo iconv"
+
+#: mod/install.php:397 mod/install.php:399
+msgid "Apache mod_rewrite module"
+msgstr "Modulo mod_rewrite di Apache"
+
+#: mod/install.php:397
+msgid ""
+"Error: Apache webserver mod-rewrite module is required but not installed."
+msgstr "Errore: E' il modulo mod-rewrite di Apache è richiesto, ma non risulta installato"
+
+#: mod/install.php:405
+msgid "Error: libCURL PHP module required but not installed."
+msgstr "Errore: il modulo libCURL di PHP è richiesto, ma non risulta installato."
+
+#: mod/install.php:409
+msgid ""
+"Error: GD graphics PHP module with JPEG support required but not installed."
+msgstr "Errore: Il modulo GD graphics di PHP con supporto a JPEG è richiesto, ma non risulta installato."
+
+#: mod/install.php:413
+msgid "Error: openssl PHP module required but not installed."
+msgstr "Errore: il modulo openssl di PHP è richiesto, ma non risulta installato."
+
+#: mod/install.php:417
+msgid "Error: PDO or MySQLi PHP module required but not installed."
+msgstr "Errore: uno dei due moduli PHP PDO o MySQLi è richiesto ma non installato."
+
+#: mod/install.php:421
+msgid "Error: The MySQL driver for PDO is not installed."
+msgstr "Errore: il driver MySQL per PDO non è installato."
+
+#: mod/install.php:425
+msgid "Error: mb_string PHP module required but not installed."
+msgstr "Errore: il modulo PHP mb_string è richiesto, ma non risulta installato."
+
+#: mod/install.php:429
+msgid "Error: iconv PHP module required but not installed."
+msgstr "Errore: il modulo PHP iconv è richiesto ma non installato."
+
+#: mod/install.php:439
+msgid "Error, XML PHP module required but not installed."
+msgstr "Errore, il modulo PHP XML è richiesto ma non installato."
+
+#: mod/install.php:451
+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 "L'installazione web deve poter creare un file chiamato \".htconfig.php\" nella cartella principale del tuo web server ma non è in grado di farlo."
+
+#: mod/install.php:452
+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 "Ciò è dovuto spesso a impostazioni di permessi, dato che il web server può non essere in grado di scrivere il file nella tua cartella, anche se tu puoi."
+
+#: mod/install.php:453
+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 "Alla fine di questa procedura, di daremo un testo da salvare in un file chiamato .htconfig.php nella tua cartella principale di Friendica"
+
+#: mod/install.php:454
+msgid ""
+"You can alternatively skip this procedure and perform a manual installation."
+" Please see the file \"INSTALL.txt\" for instructions."
+msgstr "Puoi in alternativa saltare questa procedura ed eseguire l'installazione manualmente. Vedi il file \"INSTALL.txt\" per le istruzioni."
+
+#: mod/install.php:457
+msgid ".htconfig.php is writable"
+msgstr ".htconfig.php è scrivibile"
+
+#: mod/install.php:467
+msgid ""
+"Friendica uses the Smarty3 template engine to render its web views. Smarty3 "
+"compiles templates to PHP to speed up rendering."
+msgstr "Friendica usa il motore di template Smarty3 per renderizzare le sue pagine web. Smarty3 compila i template in PHP per velocizzare il rendering."
+
+#: mod/install.php:468
+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 "Per salvare questi template compilati, il server werb ha bisogno dell'accesso in scrittura alla cartella view/smarty3/ nella cartella principale dei Friendica."
+
+#: mod/install.php:469
+msgid ""
+"Please ensure that the user that your web server runs as (e.g. www-data) has"
+" write access to this folder."
+msgstr "Per favore, controlla che l'utente con cui il tuo server web gira (es www-data) ha accesso in scrittura a questa cartella."
+
+#: mod/install.php:470
+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 "Nota: come misura di sicurezza, dovresti dare accesso in scrittura solo alla cartella view/smarty3, non ai template (.tpl) che contiene."
+
+#: mod/install.php:473
+msgid "view/smarty3 is writable"
+msgstr "view/smarty3 è scrivibile"
+
+#: mod/install.php:489
+msgid ""
+"Url rewrite in .htaccess is not working. Check your server configuration."
+msgstr "La riscrittura degli url in .htaccess non funziona. Controlla la configurazione del tuo server."
+
+#: mod/install.php:491
+msgid "Url rewrite is working"
+msgstr "La riscrittura degli url funziona"
+
+#: mod/install.php:510
+msgid "ImageMagick PHP extension is not installed"
+msgstr "L'estensione PHP ImageMagick non è installata"
+
+#: mod/install.php:512
+msgid "ImageMagick PHP extension is installed"
+msgstr "L'estensione PHP ImageMagick è installata"
+
+#: mod/install.php:514
+msgid "ImageMagick supports GIF"
+msgstr "ImageMagick supporta i GIF"
+
+#: mod/install.php:521
+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 "Il file di configurazione del database \".htconfig.php\" non può essere scritto. Usa il testo qui di seguito per creare un file di configurazione nella cartella principale del tuo sito."
+
+#: mod/install.php:546
+msgid "

What next

" +msgstr "

Cosa fare ora

" + +#: mod/install.php:547 +msgid "" +"IMPORTANT: You will need to [manually] setup a scheduled task for the " +"poller." +msgstr "IMPORTANTE: Devi impostare [manualmente] la pianificazione del poller." + +#: mod/search.php:28 mod/network.php:189 msgid "Remove term" msgstr "Rimuovi termine" -#: mod/network.php:404 +#: mod/search.php:96 +msgid "Only logged in users are permitted to perform a search." +msgstr "Solo agli utenti autenticati è permesso eseguire ricerche." + +#: mod/search.php:120 +msgid "Too Many Requests" +msgstr "Troppe richieste" + +#: mod/search.php:121 +msgid "Only one search per minute is permitted for not logged in users." +msgstr "Solo una ricerca al minuto è permessa agli utenti non autenticati." + +#: mod/search.php:221 +#, php-format +msgid "Items tagged with: %s" +msgstr "Elementi taggati con: %s" + +#: mod/search.php:223 mod/contacts.php:827 +#, php-format +msgid "Results for: %s" +msgstr "Risultati per: %s" + +#: mod/unfollow.php:33 +msgid "Contact wasn't found or can't be unfollowed." +msgstr "" + +#: mod/unfollow.php:47 +msgid "Contact unfollowed" +msgstr "" + +#: mod/unfollow.php:73 +msgid "You aren't a friend of this contact." +msgstr "Non sei un amico di questo contatto" + +#: mod/unfollow.php:79 +msgid "Unfollowing is currently not supported by your network." +msgstr "" + +#: mod/unfollow.php:100 mod/contacts.php:593 +msgid "Disconnect/Unfollow" +msgstr "Disconnetti/Non Seguire" + +#: mod/admin.php:100 +msgid "Theme settings updated." +msgstr "Impostazioni del tema aggiornate." + +#: mod/admin.php:172 mod/admin.php:1175 +msgid "Site" +msgstr "Sito" + +#: mod/admin.php:173 mod/admin.php:1103 mod/admin.php:1620 mod/admin.php:1636 +msgid "Users" +msgstr "Utenti" + +#: mod/admin.php:174 mod/admin.php:1738 mod/admin.php:1801 mod/settings.php:74 +msgid "Plugins" +msgstr "Plugin" + +#: mod/admin.php:175 mod/admin.php:2014 mod/admin.php:2064 +msgid "Themes" +msgstr "Temi" + +#: mod/admin.php:176 mod/settings.php:52 +msgid "Additional features" +msgstr "Funzionalità aggiuntive" + +#: mod/admin.php:177 +msgid "DB updates" +msgstr "Aggiornamenti Database" + +#: mod/admin.php:178 mod/admin.php:585 +msgid "Inspect Queue" +msgstr "Ispeziona Coda di invio" + +#: mod/admin.php:179 mod/admin.php:299 +msgid "Server Blocklist" +msgstr "Server Blocklist" + +#: mod/admin.php:180 mod/admin.php:551 +msgid "Federation Statistics" +msgstr "Statistiche sulla Federazione" + +#: mod/admin.php:181 mod/admin.php:376 +msgid "Delete Item" +msgstr "Rimuovi elemento" + +#: mod/admin.php:195 mod/admin.php:206 mod/admin.php:2138 +msgid "Logs" +msgstr "Log" + +#: mod/admin.php:196 mod/admin.php:2206 +msgid "View Logs" +msgstr "Vedi i log" + +#: mod/admin.php:197 +msgid "probe address" +msgstr "controlla indirizzo" + +#: mod/admin.php:198 +msgid "check webfinger" +msgstr "verifica webfinger" + +#: mod/admin.php:205 +msgid "Plugin Features" +msgstr "Impostazioni Plugins" + +#: mod/admin.php:207 +msgid "diagnostics" +msgstr "diagnostiche" + +#: mod/admin.php:208 +msgid "User registrations waiting for confirmation" +msgstr "Utenti registrati in attesa di conferma" + +#: mod/admin.php:290 +msgid "The blocked domain" +msgstr "Il dominio bloccato" + +#: mod/admin.php:291 mod/admin.php:304 +msgid "The reason why you blocked this domain." +msgstr "Le ragioni per cui blocchi questo dominio." + +#: mod/admin.php:292 +msgid "Delete domain" +msgstr "Elimina dominio" + +#: mod/admin.php:292 +msgid "Check to delete this entry from the blocklist" +msgstr "Seleziona per eliminare questa voce dalla blocklist" + +#: mod/admin.php:298 mod/admin.php:375 mod/admin.php:550 mod/admin.php:584 +#: mod/admin.php:681 mod/admin.php:1174 mod/admin.php:1619 mod/admin.php:1737 +#: mod/admin.php:1800 mod/admin.php:2013 mod/admin.php:2063 mod/admin.php:2137 +#: mod/admin.php:2205 +msgid "Administration" +msgstr "Amministrazione" + +#: mod/admin.php:300 +msgid "" +"This page can be used to define a black list of servers from the federated " +"network that are not allowed to interact with your node. For all entered " +"domains you should also give a reason why you have blocked the remote " +"server." +msgstr "Questa pagina puo' essere usata per definire una black list di server dal network federato a cui nono è permesso interagire col tuo nodo. Per ogni dominio inserito, dovresti anche riportare una ragione per cui hai bloccato il server remoto." + +#: mod/admin.php:301 +msgid "" +"The list of blocked servers will be made publically available on the " +"/friendica page so that your users and people investigating communication " +"problems can find the reason easily." +msgstr "La lista di server bloccati sarà resa disponibile pubblicamente sulla pagina /friendica, così che i tuoi utenti e le persone che indagano su problemi di comunicazione possano trovarne la ragione facilmente." + +#: mod/admin.php:302 +msgid "Add new entry to block list" +msgstr "Aggiungi una nuova voce alla blocklist" + +#: mod/admin.php:303 +msgid "Server Domain" +msgstr "Dominio del Server" + +#: mod/admin.php:303 +msgid "" +"The domain of the new server to add to the block list. Do not include the " +"protocol." +msgstr "Il dominio del server da aggiungere alla blocklist. Non includere il protocollo." + +#: mod/admin.php:304 +msgid "Block reason" +msgstr "Ragione blocco" + +#: mod/admin.php:305 +msgid "Add Entry" +msgstr "Aggiungi Voce" + +#: mod/admin.php:306 +msgid "Save changes to the blocklist" +msgstr "Salva modifiche alla blocklist" + +#: mod/admin.php:307 +msgid "Current Entries in the Blocklist" +msgstr "Voci correnti nella blocklist" + +#: mod/admin.php:310 +msgid "Delete entry from blocklist" +msgstr "Elimina voce dalla blocklist" + +#: mod/admin.php:313 +msgid "Delete entry from blocklist?" +msgstr "Eliminare la voce dalla blocklist?" + +#: mod/admin.php:338 +msgid "Server added to blocklist." +msgstr "Server aggiunto alla blocklist." + +#: mod/admin.php:354 +msgid "Site blocklist updated." +msgstr "Blocklist del sito aggiornata." + +#: mod/admin.php:377 +msgid "Delete this Item" +msgstr "Rimuovi questo elemento" + +#: mod/admin.php:378 +msgid "" +"On this page you can delete an item from your node. If the item is a top " +"level posting, the entire thread will be deleted." +msgstr "" + +#: mod/admin.php:379 +msgid "" +"You need to know the GUID of the item. You can find it e.g. by looking at " +"the display URL. The last part of http://example.com/display/123456 is the " +"GUID, here 123456." +msgstr "" + +#: mod/admin.php:380 +msgid "GUID" +msgstr "" + +#: mod/admin.php:380 +msgid "The GUID of the item you want to delete." +msgstr "" + +#: mod/admin.php:417 +msgid "Item marked for deletion." +msgstr "" + +#: mod/admin.php:481 +msgid "unknown" +msgstr "sconosciuto" + +#: mod/admin.php:544 +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 "Questa pagina offre alcuni numeri riguardo la porzione del social network federato di cui il tuo nodo Friendica fa parte. Questi numeri non sono completi ma riflettono esclusivamente la porzione di rete di cui il tuo nodo e' a conoscenza." + +#: mod/admin.php:545 +msgid "" +"The Auto Discovered Contact Directory feature is not enabled, it " +"will improve the data displayed here." +msgstr "La funzione Elenco Contatti Scoperto Automaticamente non è abilitata, migliorerà i dati visualizzati qui." + +#: mod/admin.php:557 +#, php-format +msgid "Currently this node is aware of %d nodes from the following platforms:" +msgstr "Attualmente questo nodo conosce %d nodi dalle seguenti piattaforme:" + +#: mod/admin.php:587 +msgid "ID" +msgstr "ID" + +#: mod/admin.php:588 +msgid "Recipient Name" +msgstr "Nome Destinatario" + +#: mod/admin.php:589 +msgid "Recipient Profile" +msgstr "Profilo Destinatario" + +#: mod/admin.php:591 +msgid "Created" +msgstr "Creato" + +#: mod/admin.php:592 +msgid "Last Tried" +msgstr "Ultimo Tentativo" + +#: mod/admin.php:593 +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 "Questa pagina elenca il contenuto della coda di invio dei post. Questi sono post la cui consegna è fallita. Verranno inviati nuovamente più tardi ed eventualmente cancellati se la consegna continua a fallire." + +#: mod/admin.php:617 +#, php-format +msgid "" +"Your DB still runs with MyISAM tables. You should change the engine type to " +"InnoDB. As Friendica will use InnoDB only features in the future, you should" +" change this! See here for a guide that may be helpful " +"converting the table engines. You may also use the command php " +"include/dbstructure.php toinnodb of your Friendica installation for an " +"automatic conversion.
" +msgstr "Il tuo database contiene ancora tabelle MyISAM. Dovresti cambiare il motore a InnoDB. Siccome Friendica userà esclusivamente InnoDB nelle versioni a venire, dovresti cambiarle! Vedi qui per una guida che puo' essere d'aiuto nel convertire il motore delle tabelle. Puoi anche usare il comando php include/dbstructure.php toinnodb nella tua installazione Friendica per eseguire la conversione automaticamente.
" + +#: mod/admin.php:624 +#, php-format +msgid "" +"There is a new version of Friendica available for download. Your current " +"version is %1$s, upstream version is %2$s" +msgstr "" + +#: mod/admin.php:635 +msgid "" +"The database update failed. Please run \"php include/dbstructure.php " +"update\" from the command line and have a look at the errors that might " +"appear." +msgstr "" + +#: mod/admin.php:641 +msgid "The worker was never executed. Please check your database structure!" +msgstr "" + +#: mod/admin.php:644 +#, php-format +msgid "" +"The last worker execution was on %s UTC. This is older than one hour. Please" +" check your crontab settings." +msgstr "" + +#: mod/admin.php:649 mod/admin.php:1569 +msgid "Normal Account" +msgstr "Account normale" + +#: mod/admin.php:650 mod/admin.php:1570 +msgid "Automatic Follower Account" +msgstr "" + +#: mod/admin.php:651 mod/admin.php:1571 +msgid "Public Forum Account" +msgstr "" + +#: mod/admin.php:652 mod/admin.php:1572 +msgid "Automatic Friend Account" +msgstr "Account per amicizia automatizzato" + +#: mod/admin.php:653 +msgid "Blog Account" +msgstr "Account Blog" + +#: mod/admin.php:654 +msgid "Private Forum Account" +msgstr "" + +#: mod/admin.php:676 +msgid "Message queues" +msgstr "Code messaggi" + +#: mod/admin.php:682 +msgid "Summary" +msgstr "Sommario" + +#: mod/admin.php:684 +msgid "Registered users" +msgstr "Utenti registrati" + +#: mod/admin.php:686 +msgid "Pending registrations" +msgstr "Registrazioni in attesa" + +#: mod/admin.php:687 +msgid "Version" +msgstr "Versione" + +#: mod/admin.php:692 +msgid "Active plugins" +msgstr "Plugin attivi" + +#: mod/admin.php:722 +msgid "Can not parse base url. Must have at least ://" +msgstr "Impossibile analizzare l'url base. Deve avere almeno [schema]://[dominio]" + +#: mod/admin.php:1029 +msgid "Site settings updated." +msgstr "Impostazioni del sito aggiornate." + +#: mod/admin.php:1057 mod/settings.php:948 +msgid "No special theme for mobile devices" +msgstr "Nessun tema speciale per i dispositivi mobili" + +#: mod/admin.php:1086 +msgid "No community page" +msgstr "Nessuna pagina Comunità" + +#: mod/admin.php:1087 +msgid "Public postings from users of this site" +msgstr "Messaggi pubblici dagli utenti di questo sito" + +#: mod/admin.php:1088 +msgid "Global community page" +msgstr "Pagina Comunità globale" + +#: mod/admin.php:1093 mod/contacts.php:552 +msgid "Never" +msgstr "Mai" + +#: mod/admin.php:1094 +msgid "At post arrival" +msgstr "All'arrivo di un messaggio" + +#: mod/admin.php:1102 mod/contacts.php:579 +msgid "Disabled" +msgstr "Disabilitato" + +#: mod/admin.php:1104 +msgid "Users, Global Contacts" +msgstr "Utenti, Contatti Globali" + +#: mod/admin.php:1105 +msgid "Users, Global Contacts/fallback" +msgstr "Utenti, Contatti Globali/fallback" + +#: mod/admin.php:1109 +msgid "One month" +msgstr "Un mese" + +#: mod/admin.php:1110 +msgid "Three months" +msgstr "Tre mesi" + +#: mod/admin.php:1111 +msgid "Half a year" +msgstr "Sei mesi" + +#: mod/admin.php:1112 +msgid "One year" +msgstr "Un anno" + +#: mod/admin.php:1117 +msgid "Multi user instance" +msgstr "Istanza multi utente" + +#: mod/admin.php:1140 +msgid "Closed" +msgstr "Chiusa" + +#: mod/admin.php:1141 +msgid "Requires approval" +msgstr "Richiede l'approvazione" + +#: mod/admin.php:1142 +msgid "Open" +msgstr "Aperta" + +#: mod/admin.php:1146 +msgid "No SSL policy, links will track page SSL state" +msgstr "Nessuna gestione SSL, i link seguiranno lo stato SSL della pagina" + +#: mod/admin.php:1147 +msgid "Force all links to use SSL" +msgstr "Forza tutti i link ad usare SSL" + +#: mod/admin.php:1148 +msgid "Self-signed certificate, use SSL for local links only (discouraged)" +msgstr "Certificato auto-firmato, usa SSL solo per i link locali (sconsigliato)" + +#: mod/admin.php:1152 +msgid "Don't check" +msgstr "" + +#: mod/admin.php:1153 +msgid "check the stable version" +msgstr "" + +#: mod/admin.php:1154 +msgid "check the development version" +msgstr "" + +#: mod/admin.php:1176 mod/admin.php:1802 mod/admin.php:2065 mod/admin.php:2139 +#: mod/admin.php:2292 mod/settings.php:691 mod/settings.php:802 +#: mod/settings.php:851 mod/settings.php:913 mod/settings.php:1010 +#: mod/settings.php:1258 +msgid "Save Settings" +msgstr "Salva Impostazioni" + +#: mod/admin.php:1177 +msgid "Republish users to directory" +msgstr "" + +#: mod/admin.php:1178 mod/register.php:277 +msgid "Registration" +msgstr "Registrazione" + +#: mod/admin.php:1179 +msgid "File upload" +msgstr "Caricamento file" + +#: mod/admin.php:1180 +msgid "Policies" +msgstr "Politiche" + +#: mod/admin.php:1182 +msgid "Auto Discovered Contact Directory" +msgstr "Elenco Contatti Scoperto Automaticamente" + +#: mod/admin.php:1183 +msgid "Performance" +msgstr "Performance" + +#: mod/admin.php:1184 +msgid "Worker" +msgstr "Worker" + +#: mod/admin.php:1185 +msgid "" +"Relocate - WARNING: advanced function. Could make this server unreachable." +msgstr "Trasloca - ATTENZIONE: funzione avanzata! Può rendere questo server irraggiungibile." + +#: mod/admin.php:1188 +msgid "Site name" +msgstr "Nome del sito" + +#: mod/admin.php:1189 +msgid "Host name" +msgstr "Nome host" + +#: mod/admin.php:1190 +msgid "Sender Email" +msgstr "Mittente email" + +#: mod/admin.php:1190 +msgid "" +"The email address your server shall use to send notification emails from." +msgstr "L'indirizzo email che il tuo server dovrà usare per inviare notifiche via email." + +#: mod/admin.php:1191 +msgid "Banner/Logo" +msgstr "Banner/Logo" + +#: mod/admin.php:1192 +msgid "Shortcut icon" +msgstr "Icona shortcut" + +#: mod/admin.php:1192 +msgid "Link to an icon that will be used for browsers." +msgstr "Link verso un'icona che verrà usata dai browser." + +#: mod/admin.php:1193 +msgid "Touch icon" +msgstr "Icona touch" + +#: mod/admin.php:1193 +msgid "Link to an icon that will be used for tablets and mobiles." +msgstr "Link verso un'icona che verrà usata dai tablet e i telefonini." + +#: mod/admin.php:1194 +msgid "Additional Info" +msgstr "Informazioni aggiuntive" + +#: mod/admin.php:1194 +#, php-format +msgid "" +"For public servers: you can add additional information here that will be " +"listed at %s/siteinfo." +msgstr "Per server pubblici: puoi aggiungere informazioni extra che verrano mostrate su %s/siteinfo." + +#: mod/admin.php:1195 +msgid "System language" +msgstr "Lingua di sistema" + +#: mod/admin.php:1196 +msgid "System theme" +msgstr "Tema di sistema" + +#: mod/admin.php:1196 +msgid "" +"Default system theme - may be over-ridden by user profiles - change theme settings" +msgstr "Tema di sistema - può essere sovrascritto dalle impostazioni utente - cambia le impostazioni del tema" + +#: mod/admin.php:1197 +msgid "Mobile system theme" +msgstr "Tema mobile di sistema" + +#: mod/admin.php:1197 +msgid "Theme for mobile devices" +msgstr "Tema per dispositivi mobili" + +#: mod/admin.php:1198 +msgid "SSL link policy" +msgstr "Gestione link SSL" + +#: mod/admin.php:1198 +msgid "Determines whether generated links should be forced to use SSL" +msgstr "Determina se i link generati devono essere forzati a usare SSL" + +#: mod/admin.php:1199 +msgid "Force SSL" +msgstr "Forza SSL" + +#: mod/admin.php:1199 +msgid "" +"Force all Non-SSL requests to SSL - Attention: on some systems it could lead" +" to endless loops." +msgstr "Forza tutte le richieste non SSL su SSL - Attenzione: su alcuni sistemi può portare a loop senza fine" + +#: mod/admin.php:1200 +msgid "Hide help entry from navigation menu" +msgstr "Nascondi la voce 'Guida' dal menu di navigazione" + +#: mod/admin.php:1200 +msgid "" +"Hides the menu entry for the Help pages from the navigation menu. You can " +"still access it calling /help directly." +msgstr "Nasconde la voce per le pagine della guida dal menu di navigazione. E' comunque possibile accedervi richiamando /help direttamente." + +#: mod/admin.php:1201 +msgid "Single user instance" +msgstr "Istanza a singolo utente" + +#: mod/admin.php:1201 +msgid "Make this instance multi-user or single-user for the named user" +msgstr "Rendi questa istanza multi utente o a singolo utente per l'utente selezionato" + +#: mod/admin.php:1202 +msgid "Maximum image size" +msgstr "Massima dimensione immagini" + +#: mod/admin.php:1202 +msgid "" +"Maximum size in bytes of uploaded images. Default is 0, which means no " +"limits." +msgstr "Massima dimensione in byte delle immagini caricate. Il default è 0, cioè nessun limite." + +#: mod/admin.php:1203 +msgid "Maximum image length" +msgstr "Massima lunghezza immagine" + +#: mod/admin.php:1203 +msgid "" +"Maximum length in pixels of the longest side of uploaded images. Default is " +"-1, which means no limits." +msgstr "Massima lunghezza in pixel del lato più lungo delle immagini caricate. Predefinito a -1, ovvero nessun limite." + +#: mod/admin.php:1204 +msgid "JPEG image quality" +msgstr "Qualità immagini JPEG" + +#: mod/admin.php:1204 +msgid "" +"Uploaded JPEGS will be saved at this quality setting [0-100]. Default is " +"100, which is full quality." +msgstr "Le immagini JPEG caricate verranno salvate con questa qualità [0-100]. Predefinito è 100, ovvero qualità piena." + +#: mod/admin.php:1206 +msgid "Register policy" +msgstr "Politica di registrazione" + +#: mod/admin.php:1207 +msgid "Maximum Daily Registrations" +msgstr "Massime registrazioni giornaliere" + +#: mod/admin.php:1207 +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 "Se la registrazione è permessa, qui si definisce il massimo numero di nuovi utenti registrati da accettare giornalmente. Se la registrazione è chiusa, questa impostazione non ha effetto." + +#: mod/admin.php:1208 +msgid "Register text" +msgstr "Testo registrazione" + +#: mod/admin.php:1208 +msgid "Will be displayed prominently on the registration page." +msgstr "Sarà mostrato ben visibile nella pagina di registrazione." + +#: mod/admin.php:1209 +msgid "Accounts abandoned after x days" +msgstr "Account abbandonati dopo x giorni" + +#: mod/admin.php:1209 +msgid "" +"Will not waste system resources polling external sites for abandonded " +"accounts. Enter 0 for no time limit." +msgstr "Non spreca risorse di sistema controllando siti esterni per gli account abbandonati. Immettere 0 per nessun limite di tempo." + +#: mod/admin.php:1210 +msgid "Allowed friend domains" +msgstr "Domini amici consentiti" + +#: mod/admin.php:1210 +msgid "" +"Comma separated list of domains which are allowed to establish friendships " +"with this site. Wildcards are accepted. Empty to allow any domains" +msgstr "Elenco separato da virgola dei domini che possono stabilire amicizie con questo sito. Sono accettati caratteri jolly. Vuoto per accettare qualsiasi dominio." + +#: mod/admin.php:1211 +msgid "Allowed email domains" +msgstr "Domini email consentiti" + +#: mod/admin.php:1211 +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 "Elenco separato da virgola dei domini permessi come indirizzi email in fase di registrazione a questo sito. Sono accettati caratteri jolly. Lascalo vuoto per accettare qualsiasi dominio." + +#: mod/admin.php:1212 +msgid "Block public" +msgstr "Blocca pagine pubbliche" + +#: mod/admin.php:1212 +msgid "" +"Check to block public access to all otherwise public personal pages on this " +"site unless you are currently logged in." +msgstr "Seleziona per bloccare l'accesso pubblico a tutte le pagine personali di questo sito, a meno di essere loggato." + +#: mod/admin.php:1213 +msgid "Force publish" +msgstr "Forza pubblicazione" + +#: mod/admin.php:1213 +msgid "" +"Check to force all profiles on this site to be listed in the site directory." +msgstr "Seleziona per forzare tutti i profili di questo sito ad essere compresi nell'elenco di questo sito." + +#: mod/admin.php:1214 +msgid "Global directory URL" +msgstr "URL della directory globale" + +#: mod/admin.php:1214 +msgid "" +"URL to the global directory. If this is not set, the global directory is " +"completely unavailable to the application." +msgstr "URL dell'elenco globale. Se vuoto, l'elenco globale sarà completamente disabilitato." + +#: mod/admin.php:1215 +msgid "Allow threaded items" +msgstr "Permetti commenti nidificati" + +#: mod/admin.php:1215 +msgid "Allow infinite level threading for items on this site." +msgstr "Permette un infinito livello di nidificazione dei commenti su questo sito." + +#: mod/admin.php:1216 +msgid "Private posts by default for new users" +msgstr "Post privati di default per i nuovi utenti" + +#: mod/admin.php:1216 +msgid "" +"Set default post permissions for all new members to the default privacy " +"group rather than public." +msgstr "Imposta i permessi predefiniti dei post per tutti i nuovi utenti come privati per il gruppo predefinito, invece che pubblici." + +#: mod/admin.php:1217 +msgid "Don't include post content in email notifications" +msgstr "Non includere il contenuto dei post nelle notifiche via email" + +#: mod/admin.php:1217 +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 "Non include il contenuti del post/commento/messaggio privato/etc. nelle notifiche email che sono inviate da questo sito, per privacy" + +#: mod/admin.php:1218 +msgid "Disallow public access to addons listed in the apps menu." +msgstr "Disabilita l'accesso pubblico ai plugin raccolti nel menu apps." + +#: mod/admin.php:1218 +msgid "" +"Checking this box will restrict addons listed in the apps menu to members " +"only." +msgstr "Selezionando questo box si limiterà ai soli membri l'accesso ai componenti aggiuntivi nel menu applicazioni" + +#: mod/admin.php:1219 +msgid "Don't embed private images in posts" +msgstr "Non inglobare immagini private nei post" + +#: mod/admin.php:1219 +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 "Non sostituire le foto locali nei post con una copia incorporata dell'immagine. Questo significa che i contatti che riceveranno i post contenenti foto private dovranno autenticarsi e caricare ogni immagine, cosa che può richiedere un po' di tempo." + +#: mod/admin.php:1220 +msgid "Allow Users to set remote_self" +msgstr "Permetti agli utenti di impostare 'io remoto'" + +#: mod/admin.php:1220 +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 "Selezionando questo, a tutti gli utenti sarà permesso di impostare qualsiasi contatto come 'io remoto' nella pagina di modifica del contatto. Impostare questa opzione fa si che tutti i messaggi di quel contatto vengano ripetuti nello stream dell'utente." + +#: mod/admin.php:1221 +msgid "Block multiple registrations" +msgstr "Blocca registrazioni multiple" + +#: mod/admin.php:1221 +msgid "Disallow users to register additional accounts for use as pages." +msgstr "Non permette all'utente di registrare account extra da usare come pagine." + +#: mod/admin.php:1222 +msgid "OpenID support" +msgstr "Supporto OpenID" + +#: mod/admin.php:1222 +msgid "OpenID support for registration and logins." +msgstr "Supporta OpenID per la registrazione e il login" + +#: mod/admin.php:1223 +msgid "Fullname check" +msgstr "Controllo nome completo" + +#: mod/admin.php:1223 +msgid "" +"Force users to register with a space between firstname and lastname in Full " +"name, as an antispam measure" +msgstr "Forza gli utenti a registrarsi con uno spazio tra il nome e il cognome in \"Nome completo\", come misura anti spam" + +#: mod/admin.php:1224 +msgid "Community Page Style" +msgstr "Stile pagina Comunità" + +#: mod/admin.php:1224 +msgid "" +"Type of community page to show. 'Global community' shows every public " +"posting from an open distributed network that arrived on this server." +msgstr "Tipo di pagina Comunità da mostrare. 'Comunità Globale' mostra tutti i messaggi pubblici arrivati su questo server da network aperti distribuiti." + +#: mod/admin.php:1225 +msgid "Posts per user on community page" +msgstr "Messaggi per utente nella pagina Comunità" + +#: mod/admin.php:1225 +msgid "" +"The maximum number of posts per user on the community page. (Not valid for " +"'Global Community')" +msgstr "Il numero massimo di messaggi per utente mostrato nella pagina Comunità (non valido per 'Comunità globale')" + +#: mod/admin.php:1226 +msgid "Enable OStatus support" +msgstr "Abilita supporto OStatus" + +#: mod/admin.php:1226 +msgid "" +"Provide built-in OStatus (StatusNet, GNU Social etc.) compatibility. All " +"communications in OStatus are public, so privacy warnings will be " +"occasionally displayed." +msgstr "Fornisce la compatibilità integrata a OStatus (StatusNet, Gnu Social, etc.). Tutte le comunicazioni su OStatus sono pubbliche, quindi un avviso di privacy verrà mostrato occasionalmente." + +#: mod/admin.php:1227 +msgid "Only import OStatus threads from our contacts" +msgstr "Importa conversazioni OStatus solo dai nostri contatti." + +#: mod/admin.php:1227 +msgid "" +"Normally we import every content from our OStatus contacts. With this option" +" we only store threads that are started by a contact that is known on our " +"system." +msgstr "Normalmente importiamo tutto il contenuto dai contatti OStatus. Con questa opzione salviamo solo le conversazioni iniziate da un contatto è conosciuto a questo nodo." + +#: mod/admin.php:1228 +msgid "OStatus support can only be enabled if threading is enabled." +msgstr "Il supporto OStatus può essere abilitato solo se è abilitato il threading." + +#: mod/admin.php:1230 +msgid "" +"Diaspora support can't be enabled because Friendica was installed into a sub" +" directory." +msgstr "Il supporto a Diaspora non può essere abilitato perché Friendica è stato installato in una sotto directory." + +#: mod/admin.php:1231 +msgid "Enable Diaspora support" +msgstr "Abilita il supporto a Diaspora" + +#: mod/admin.php:1231 +msgid "Provide built-in Diaspora network compatibility." +msgstr "Fornisce compatibilità con il network Diaspora." + +#: mod/admin.php:1232 +msgid "Only allow Friendica contacts" +msgstr "Permetti solo contatti Friendica" + +#: mod/admin.php:1232 +msgid "" +"All contacts must use Friendica protocols. All other built-in communication " +"protocols disabled." +msgstr "Tutti i contatti devono usare il protocollo di Friendica. Tutti gli altri protocolli sono disabilitati." + +#: mod/admin.php:1233 +msgid "Verify SSL" +msgstr "Verifica SSL" + +#: mod/admin.php:1233 +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 "Se vuoi, puoi abilitare il controllo rigoroso dei certificati.Questo significa che non potrai collegarti (del tutto) con siti con certificati SSL auto-firmati." + +#: mod/admin.php:1234 +msgid "Proxy user" +msgstr "Utente Proxy" + +#: mod/admin.php:1235 +msgid "Proxy URL" +msgstr "URL Proxy" + +#: mod/admin.php:1236 +msgid "Network timeout" +msgstr "Timeout rete" + +#: mod/admin.php:1236 +msgid "Value is in seconds. Set to 0 for unlimited (not recommended)." +msgstr "Valore in secondi. Imposta a 0 per illimitato (non raccomandato)." + +#: mod/admin.php:1237 +msgid "Maximum Load Average" +msgstr "Massimo carico medio" + +#: mod/admin.php:1237 +msgid "" +"Maximum system load before delivery and poll processes are deferred - " +"default 50." +msgstr "Massimo carico di sistema prima che i processi di invio e di poll siano ritardati. Predefinito a 50." + +#: mod/admin.php:1238 +msgid "Maximum Load Average (Frontend)" +msgstr "Media Massimo Carico (Frontend)" + +#: mod/admin.php:1238 +msgid "Maximum system load before the frontend quits service - default 50." +msgstr "Massimo carico di sistema prima che il frontend fermi il servizio - default 50." + +#: mod/admin.php:1239 +msgid "Minimal Memory" +msgstr "Memoria Minima" + +#: mod/admin.php:1239 +msgid "" +"Minimal free memory in MB for the poller. Needs access to /proc/meminfo - " +"default 0 (deactivated)." +msgstr "Minima memoria libera in MB per il poller. Necessita di avere accesso a /proc/meminfo - default 0 (disabilitato)." + +#: mod/admin.php:1240 +msgid "Maximum table size for optimization" +msgstr "Dimensione massima della tabella per l'ottimizzazione" + +#: mod/admin.php:1240 +msgid "" +"Maximum table size (in MB) for the automatic optimization - default 100 MB. " +"Enter -1 to disable it." +msgstr "La dimensione massima (in MB) per l'ottimizzazione automatica - default 100 MB. Inserisci -1 per disabilitarlo." + +#: mod/admin.php:1241 +msgid "Minimum level of fragmentation" +msgstr "Livello minimo di frammentazione" + +#: mod/admin.php:1241 +msgid "" +"Minimum fragmenation level to start the automatic optimization - default " +"value is 30%." +msgstr "Livello minimo di frammentazione per iniziare la procedura di ottimizzazione automatica - il valore di default è 30%." + +#: mod/admin.php:1243 +msgid "Periodical check of global contacts" +msgstr "Check periodico dei contatti globali" + +#: mod/admin.php:1243 +msgid "" +"If enabled, the global contacts are checked periodically for missing or " +"outdated data and the vitality of the contacts and servers." +msgstr "Se abilitato, i contatti globali sono controllati periodicamente per verificare dati mancanti o sorpassati e la vitalità dei contatti e dei server." + +#: mod/admin.php:1244 +msgid "Days between requery" +msgstr "Giorni tra le richieste" + +#: mod/admin.php:1244 +msgid "Number of days after which a server is requeried for his contacts." +msgstr "Numero di giorni dopo i quali al server vengono richiesti i suoi contatti." + +#: mod/admin.php:1245 +msgid "Discover contacts from other servers" +msgstr "Trova contatti dagli altri server" + +#: mod/admin.php:1245 +msgid "" +"Periodically query other servers for contacts. You can choose between " +"'users': the users on the remote system, 'Global Contacts': active contacts " +"that are known on the system. The fallback is meant for Redmatrix servers " +"and older friendica servers, where global contacts weren't available. The " +"fallback increases the server load, so the recommened setting is 'Users, " +"Global Contacts'." +msgstr "Richiede periodicamente contatti agli altri server. Puoi scegliere tra 'utenti', gli utenti sul sistema remoto, o 'contatti globali', i contatti attivi che sono conosciuti dal sistema. Il fallback è pensato per i server Redmatrix e i vecchi server Friendica, dove i contatti globali non sono disponibili. Il fallback incrementa il carico di sistema, per cui l'impostazione consigliata è \"Utenti, Contatti Globali\"." + +#: mod/admin.php:1246 +msgid "Timeframe for fetching global contacts" +msgstr "Termine per il recupero contatti globali" + +#: mod/admin.php:1246 +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 "Quando si attiva la scoperta, questo valore definisce il periodo di tempo per l'attività dei contatti globali che vengono prelevati da altri server." + +#: mod/admin.php:1247 +msgid "Search the local directory" +msgstr "Cerca la directory locale" + +#: mod/admin.php:1247 +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 "Cerca nella directory locale invece che nella directory globale. Durante la ricerca a livello locale, ogni ricerca verrà eseguita sulla directory globale in background. Ciò migliora i risultati della ricerca quando la ricerca viene ripetuta." + +#: mod/admin.php:1249 +msgid "Publish server information" +msgstr "Pubblica informazioni server" + +#: mod/admin.php:1249 +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 " +"profiles, number of posts and the activated protocols and connectors. See the-federation.info for details." +msgstr "Se abilitata, saranno pubblicati i dati generali del server e i dati di utilizzo. I dati contengono il nome e la versione del server, il numero di utenti con profili pubblici, numero dei posti e dei protocolli e connettori attivati. Per informazioni, vedere the-federation.info ." + +#: mod/admin.php:1251 +msgid "Check upstream version" +msgstr "" + +#: mod/admin.php:1251 +msgid "" +"Enables checking for new Friendica versions at github. If there is a new " +"version, you will be informed in the admin panel overview." +msgstr "" + +#: mod/admin.php:1252 +msgid "Suppress Tags" +msgstr "Sopprimi Tags" + +#: mod/admin.php:1252 +msgid "Suppress showing a list of hashtags at the end of the posting." +msgstr "Non mostra la lista di hashtag in coda al messaggio" + +#: mod/admin.php:1253 +msgid "Path to item cache" +msgstr "Percorso cache elementi" + +#: mod/admin.php:1253 +msgid "The item caches buffers generated bbcode and external images." +msgstr "La cache degli elementi memorizza il bbcode generato e le immagini esterne." + +#: mod/admin.php:1254 +msgid "Cache duration in seconds" +msgstr "Durata della cache in secondi" + +#: mod/admin.php:1254 +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 "Quanto a lungo devono essere mantenuti i file di cache? Il valore predefinito è 86400 secondi (un giorno). Per disabilitare la cache, imposta il valore a -1." + +#: mod/admin.php:1255 +msgid "Maximum numbers of comments per post" +msgstr "Numero massimo di commenti per post" + +#: mod/admin.php:1255 +msgid "How much comments should be shown for each post? Default value is 100." +msgstr "Quanti commenti devono essere mostrati per ogni post? Default : 100." + +#: mod/admin.php:1256 +msgid "Temp path" +msgstr "Percorso file temporanei" + +#: mod/admin.php:1256 +msgid "" +"If you have a restricted system where the webserver can't access the system " +"temp path, enter another path here." +msgstr "Se si dispone di un sistema ristretto in cui il server web non può accedere al percorso temporaneo di sistema, inserire un altro percorso qui." + +#: mod/admin.php:1257 +msgid "Base path to installation" +msgstr "Percorso base all'installazione" + +#: mod/admin.php:1257 +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 "Se il sistema non è in grado di rilevare il percorso corretto per l'installazione, immettere il percorso corretto qui. Questa impostazione deve essere inserita solo se si utilizza un sistema limitato e/o collegamenti simbolici al tuo webroot." + +#: mod/admin.php:1258 +msgid "Disable picture proxy" +msgstr "Disabilita il proxy immagini" + +#: mod/admin.php:1258 +msgid "" +"The picture proxy increases performance and privacy. It shouldn't be used on" +" systems with very low bandwith." +msgstr "Il proxy immagini aumenta le performance e la privacy. Non dovrebbe essere usato su server con poca banda disponibile." + +#: mod/admin.php:1259 +msgid "Only search in tags" +msgstr "Cerca solo nei tag" + +#: mod/admin.php:1259 +msgid "On large systems the text search can slow down the system extremely." +msgstr "Su server con molti dati, la ricerca nel testo può estremamente rallentare il sistema." + +#: mod/admin.php:1261 +msgid "New base url" +msgstr "Nuovo url base" + +#: mod/admin.php:1261 +msgid "" +"Change base url for this server. Sends relocate message to all Friendica and" +" Diaspora* contacts of all users." +msgstr "" + +#: mod/admin.php:1263 +msgid "RINO Encryption" +msgstr "Crittografia RINO" + +#: mod/admin.php:1263 +msgid "Encryption layer between nodes." +msgstr "Crittografia delle comunicazioni tra nodi." + +#: mod/admin.php:1265 +msgid "Maximum number of parallel workers" +msgstr "Massimo numero di lavori in parallelo" + +#: mod/admin.php:1265 +msgid "" +"On shared hosters set this to 2. On larger systems, values of 10 are great. " +"Default value is 4." +msgstr "Su host condivisi imposta a 2. Su sistemi più grandi, valori fino a 10 vanno bene. Il valore di default è 4." + +#: mod/admin.php:1266 +msgid "Don't use 'proc_open' with the worker" +msgstr "Non usare 'proc_open' con il worker" + +#: mod/admin.php:1266 +msgid "" +"Enable this if your system doesn't allow the use of 'proc_open'. This can " +"happen on shared hosters. If this is enabled you should increase the " +"frequency of poller calls in your crontab." +msgstr "Abilita se il tuo sistema non consente l'utilizzo di 'proc_open'. Può succedere con gli hosting condivisi. Se abiliti questa opzione, dovresti aumentare la frequenza delle chiamate al poller nel tuo crontab." + +#: mod/admin.php:1267 +msgid "Enable fastlane" +msgstr "Abilita fastlane" + +#: mod/admin.php:1267 +msgid "" +"When enabed, the fastlane mechanism starts an additional worker if processes" +" with higher priority are blocked by processes of lower priority." +msgstr "Quando abilitato, il meccanismo di fastlane avvia processi aggiuntivi se processi con priorità più alta sono bloccati da processi con priorità più bassa." + +#: mod/admin.php:1268 +msgid "Enable frontend worker" +msgstr "Abilita worker da frontend" + +#: mod/admin.php:1268 +#, php-format +msgid "" +"When enabled the Worker process is triggered when backend access is " +"performed (e.g. messages being delivered). On smaller sites you might want " +"to call %s/worker on a regular basis via an external cron job. You should " +"only enable this option if you cannot utilize cron/scheduled jobs on your " +"server." +msgstr "" + +#: mod/admin.php:1298 +msgid "Update has been marked successful" +msgstr "L'aggiornamento è stato segnato come di successo" + +#: mod/admin.php:1306 +#, php-format +msgid "Database structure update %s was successfully applied." +msgstr "Aggiornamento struttura database %s applicata con successo." + +#: mod/admin.php:1309 +#, php-format +msgid "Executing of database structure update %s failed with error: %s" +msgstr "Aggiornamento struttura database %s fallita con errore: %s" + +#: mod/admin.php:1323 +#, php-format +msgid "Executing %s failed with error: %s" +msgstr "Esecuzione di %s fallita con errore: %s" + +#: mod/admin.php:1326 +#, php-format +msgid "Update %s was successfully applied." +msgstr "L'aggiornamento %s è stato applicato con successo" + +#: mod/admin.php:1329 +#, php-format +msgid "Update %s did not return a status. Unknown if it succeeded." +msgstr "L'aggiornamento %s non ha riportato uno stato. Non so se è andato a buon fine." + +#: mod/admin.php:1332 +#, php-format +msgid "There was no additional update function %s that needed to be called." +msgstr "Non ci sono altre funzioni di aggiornamento %s da richiamare." + +#: mod/admin.php:1352 +msgid "No failed updates." +msgstr "Nessun aggiornamento fallito." + +#: mod/admin.php:1353 +msgid "Check database structure" +msgstr "Controlla struttura database" + +#: mod/admin.php:1358 +msgid "Failed Updates" +msgstr "Aggiornamenti falliti" + +#: mod/admin.php:1359 +msgid "" +"This does not include updates prior to 1139, which did not return a status." +msgstr "Questo non include gli aggiornamenti prima del 1139, che non ritornano lo stato." + +#: mod/admin.php:1360 +msgid "Mark success (if update was manually applied)" +msgstr "Segna completato (se l'update è stato applicato manualmente)" + +#: mod/admin.php:1361 +msgid "Attempt to execute this update step automatically" +msgstr "Cerco di eseguire questo aggiornamento in automatico" + +#: mod/admin.php:1395 +#, php-format +msgid "" +"\n" +"\t\t\tDear %1$s,\n" +"\t\t\t\tthe administrator of %2$s has set up an account for you." +msgstr "\nGentile %1$s,\n l'amministratore di %2$s ha impostato un account per te." + +#: mod/admin.php:1398 +#, php-format +msgid "" +"\n" +"\t\t\tThe login details are as follows:\n" +"\n" +"\t\t\tSite Location:\t%1$s\n" +"\t\t\tLogin Name:\t\t%2$s\n" +"\t\t\tPassword:\t\t%3$s\n" +"\n" +"\t\t\tYou may change your password from your account \"Settings\" page after logging\n" +"\t\t\tin.\n" +"\n" +"\t\t\tPlease take a few moments to review the other account settings on that page.\n" +"\n" +"\t\t\tYou may also wish to add some basic information to your default profile\n" +"\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n" +"\n" +"\t\t\tWe recommend setting your full name, adding a profile photo,\n" +"\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n" +"\t\t\tperhaps what country you live in; if you do not wish to be more specific\n" +"\t\t\tthan that.\n" +"\n" +"\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n" +"\t\t\tIf you are new and do not know anybody here, they may help\n" +"\t\t\tyou to make some new and interesting friends.\n" +"\n" +"\t\t\tThank you and welcome to %4$s." +msgstr "\nI dettagli del tuo utente sono:\n Indirizzo del sito: %1$s\n Nome utente: %2$s\n Password: %3$s\n\nPuoi cambiare la tua password dalla pagina delle impostazioni del tuo account dopo esserti autenticato.\n\nPer favore, prenditi qualche momento per esaminare tutte le impostazioni presenti.\n\nPotresti voler aggiungere qualche informazione di base al tuo profilo predefinito (nella pagina \"Profili\"), così che le altre persone possano trovarti più facilmente.\n\nTi raccomandiamo di inserire il tuo nome completo, aggiungere una foto, aggiungere qualche parola chiave del profilo (molto utili per trovare nuovi contatti), e magari in quale nazione vivi, se non vuoi essere più specifico di così.\n\nNoi rispettiamo appieno la tua privacy, e nessuna di queste informazioni è necessaria o obbligatoria.\nSe sei nuovo e non conosci nessuno qui, possono aiutarti a trovare qualche nuovo e interessante contatto.\n\nGrazie e benvenuto su %4$s" + +#: mod/admin.php:1442 +#, php-format +msgid "%s user blocked/unblocked" +msgid_plural "%s users blocked/unblocked" +msgstr[0] "%s utente bloccato/sbloccato" +msgstr[1] "%s utenti bloccati/sbloccati" + +#: mod/admin.php:1449 +#, php-format +msgid "%s user deleted" +msgid_plural "%s users deleted" +msgstr[0] "%s utente cancellato" +msgstr[1] "%s utenti cancellati" + +#: mod/admin.php:1496 +#, php-format +msgid "User '%s' deleted" +msgstr "Utente '%s' cancellato" + +#: mod/admin.php:1504 +#, php-format +msgid "User '%s' unblocked" +msgstr "Utente '%s' sbloccato" + +#: mod/admin.php:1504 +#, php-format +msgid "User '%s' blocked" +msgstr "Utente '%s' bloccato" + +#: mod/admin.php:1612 mod/admin.php:1638 +msgid "Register date" +msgstr "Data registrazione" + +#: mod/admin.php:1612 mod/admin.php:1638 +msgid "Last login" +msgstr "Ultimo accesso" + +#: mod/admin.php:1612 mod/admin.php:1638 +msgid "Last item" +msgstr "Ultimo elemento" + +#: mod/admin.php:1612 mod/settings.php:43 +msgid "Account" +msgstr "Account" + +#: mod/admin.php:1621 +msgid "Add User" +msgstr "Aggiungi utente" + +#: mod/admin.php:1622 +msgid "select all" +msgstr "seleziona tutti" + +#: mod/admin.php:1623 +msgid "User registrations waiting for confirm" +msgstr "Richieste di registrazione in attesa di conferma" + +#: mod/admin.php:1624 +msgid "User waiting for permanent deletion" +msgstr "Utente in attesa di cancellazione definitiva" + +#: mod/admin.php:1625 +msgid "Request date" +msgstr "Data richiesta" + +#: mod/admin.php:1626 +msgid "No registrations." +msgstr "Nessuna registrazione." + +#: mod/admin.php:1627 +msgid "Note from the user" +msgstr "Nota dall'utente" + +#: mod/admin.php:1629 +msgid "Deny" +msgstr "Nega" + +#: mod/admin.php:1631 mod/contacts.php:635 mod/contacts.php:835 +#: mod/contacts.php:1013 +msgid "Block" +msgstr "Blocca" + +#: mod/admin.php:1632 mod/contacts.php:635 mod/contacts.php:835 +#: mod/contacts.php:1013 +msgid "Unblock" +msgstr "Sblocca" + +#: mod/admin.php:1633 +msgid "Site admin" +msgstr "Amministrazione sito" + +#: mod/admin.php:1634 +msgid "Account expired" +msgstr "Account scaduto" + +#: mod/admin.php:1637 +msgid "New User" +msgstr "Nuovo Utente" + +#: mod/admin.php:1638 +msgid "Deleted since" +msgstr "Rimosso da" + +#: mod/admin.php:1643 +msgid "" +"Selected users will be deleted!\\n\\nEverything these users had posted on " +"this site will be permanently deleted!\\n\\nAre you sure?" +msgstr "Gli utenti selezionati saranno cancellati!\\n\\nTutto quello che gli utenti hanno inviato su questo sito sarà permanentemente canellato!\\n\\nSei sicuro?" + +#: mod/admin.php:1644 +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 "L'utente {0} sarà cancellato!\\n\\nTutto quello che ha inviato su questo sito sarà permanentemente cancellato!\\n\\nSei sicuro?" + +#: mod/admin.php:1654 +msgid "Name of the new user." +msgstr "Nome del nuovo utente." + +#: mod/admin.php:1655 +msgid "Nickname" +msgstr "Nome utente" + +#: mod/admin.php:1655 +msgid "Nickname of the new user." +msgstr "Nome utente del nuovo utente." + +#: mod/admin.php:1656 +msgid "Email address of the new user." +msgstr "Indirizzo Email del nuovo utente." + +#: mod/admin.php:1699 +#, php-format +msgid "Plugin %s disabled." +msgstr "Plugin %s disabilitato." + +#: mod/admin.php:1703 +#, php-format +msgid "Plugin %s enabled." +msgstr "Plugin %s abilitato." + +#: mod/admin.php:1714 mod/admin.php:1966 +msgid "Disable" +msgstr "Disabilita" + +#: mod/admin.php:1716 mod/admin.php:1968 +msgid "Enable" +msgstr "Abilita" + +#: mod/admin.php:1739 mod/admin.php:2015 +msgid "Toggle" +msgstr "Inverti" + +#: mod/admin.php:1747 mod/admin.php:2024 +msgid "Author: " +msgstr "Autore: " + +#: mod/admin.php:1748 mod/admin.php:2025 +msgid "Maintainer: " +msgstr "Manutentore: " + +#: mod/admin.php:1803 +msgid "Reload active plugins" +msgstr "Ricarica i plugin attivi" + +#: mod/admin.php:1808 +#, 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 "Non sono disponibili componenti aggiuntivi sul tuo nodo. Puoi trovare il repository ufficiale dei plugin su %1$s e potresti trovare altri plugin interessanti nell'open plugin repository su %2$s" + +#: mod/admin.php:1927 +msgid "No themes found." +msgstr "Nessun tema trovato." + +#: mod/admin.php:2006 +msgid "Screenshot" +msgstr "Anteprima" + +#: mod/admin.php:2066 +msgid "Reload active themes" +msgstr "Ricarica i temi attivi" + +#: mod/admin.php:2071 +#, php-format +msgid "No themes found on the system. They should be paced in %1$s" +msgstr "Non sono stati trovati temi sul tuo sistema. Dovrebbero essere in %1$s" + +#: mod/admin.php:2072 +msgid "[Experimental]" +msgstr "[Sperimentale]" + +#: mod/admin.php:2073 +msgid "[Unsupported]" +msgstr "[Non supportato]" + +#: mod/admin.php:2097 +msgid "Log settings updated." +msgstr "Impostazioni Log aggiornate." + +#: mod/admin.php:2129 +msgid "PHP log currently enabled." +msgstr "Log PHP abilitato." + +#: mod/admin.php:2131 +msgid "PHP log currently disabled." +msgstr "Log PHP disabilitato" + +#: mod/admin.php:2140 +msgid "Clear" +msgstr "Pulisci" + +#: mod/admin.php:2145 +msgid "Enable Debugging" +msgstr "Abilita Debugging" + +#: mod/admin.php:2146 +msgid "Log file" +msgstr "File di Log" + +#: mod/admin.php:2146 +msgid "" +"Must be writable by web server. Relative to your Friendica top-level " +"directory." +msgstr "Il server web deve avere i permessi di scrittura. Relativo alla tua directory Friendica." + +#: mod/admin.php:2147 +msgid "Log level" +msgstr "Livello di Log" + +#: mod/admin.php:2150 +msgid "PHP logging" +msgstr "Log PHP" + +#: mod/admin.php:2151 +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 "Per abilitare il log degli errori e degli avvisi di PHP puoi aggiungere le seguenti righe al file .htconfig.php nella tua installazione. La posizione del file impostato in 'error_log' è relativa alla directory principale della tua installazione Friendica e il server web deve avere i permessi di scrittura sul file. Il valore '1' per 'log_errors' e 'display_errors' abilita le opzioni, imposta '0' per disabilitarle." + +#: mod/admin.php:2281 mod/admin.php:2282 mod/settings.php:792 +msgid "Off" +msgstr "Spento" + +#: mod/admin.php:2281 mod/admin.php:2282 mod/settings.php:792 +msgid "On" +msgstr "Acceso" + +#: mod/admin.php:2282 +#, php-format +msgid "Lock feature %s" +msgstr "Blocca funzionalità %s" + +#: mod/admin.php:2290 +msgid "Manage Additional Features" +msgstr "Gestisci Funzionalità Aggiuntive" + +#: mod/contacts.php:139 +#, php-format +msgid "%d contact edited." +msgid_plural "%d contacts edited." +msgstr[0] "%d contatto modificato." +msgstr[1] "%d contatti modificati" + +#: mod/contacts.php:174 mod/contacts.php:392 +msgid "Could not access contact record." +msgstr "Non è possibile accedere al contatto." + +#: mod/contacts.php:188 +msgid "Could not locate selected profile." +msgstr "Non riesco a trovare il profilo selezionato." + +#: mod/contacts.php:221 +msgid "Contact updated." +msgstr "Contatto aggiornato." + +#: mod/contacts.php:413 +msgid "Contact has been blocked" +msgstr "Il contatto è stato bloccato" + +#: mod/contacts.php:413 +msgid "Contact has been unblocked" +msgstr "Il contatto è stato sbloccato" + +#: mod/contacts.php:424 +msgid "Contact has been ignored" +msgstr "Il contatto è ignorato" + +#: mod/contacts.php:424 +msgid "Contact has been unignored" +msgstr "Il contatto non è più ignorato" + +#: mod/contacts.php:436 +msgid "Contact has been archived" +msgstr "Il contatto è stato archiviato" + +#: mod/contacts.php:436 +msgid "Contact has been unarchived" +msgstr "Il contatto è stato dearchiviato" + +#: mod/contacts.php:461 +msgid "Drop contact" +msgstr "Cancella contatto" + +#: mod/contacts.php:464 mod/contacts.php:831 +msgid "Do you really want to delete this contact?" +msgstr "Vuoi veramente cancellare questo contatto?" + +#: mod/contacts.php:483 +msgid "Contact has been removed." +msgstr "Il contatto è stato rimosso." + +#: mod/contacts.php:520 +#, php-format +msgid "You are mutual friends with %s" +msgstr "Sei amico reciproco con %s" + +#: mod/contacts.php:524 +#, php-format +msgid "You are sharing with %s" +msgstr "Stai condividendo con %s" + +#: mod/contacts.php:529 +#, php-format +msgid "%s is sharing with you" +msgstr "%s sta condividendo con te" + +#: mod/contacts.php:549 +msgid "Private communications are not available for this contact." +msgstr "Le comunicazioni private non sono disponibili per questo contatto." + +#: mod/contacts.php:556 +msgid "(Update was successful)" +msgstr "(L'aggiornamento è stato completato)" + +#: mod/contacts.php:556 +msgid "(Update was not successful)" +msgstr "(L'aggiornamento non è stato completato)" + +#: mod/contacts.php:558 mod/contacts.php:994 +msgid "Suggest friends" +msgstr "Suggerisci amici" + +#: mod/contacts.php:562 +#, php-format +msgid "Network type: %s" +msgstr "Tipo di rete: %s" + +#: mod/contacts.php:575 +msgid "Communications lost with this contact!" +msgstr "Comunicazione con questo contatto persa!" + +#: mod/contacts.php:578 +msgid "Fetch further information for feeds" +msgstr "Recupera maggiori informazioni per i feed" + +#: mod/contacts.php:579 +msgid "Fetch information" +msgstr "Recupera informazioni" + +#: mod/contacts.php:579 +msgid "Fetch information and keywords" +msgstr "Recupera informazioni e parole chiave" + +#: mod/contacts.php:603 +msgid "Contact" +msgstr "Contatto" + +#: mod/contacts.php:606 +msgid "Profile Visibility" +msgstr "Visibilità del profilo" + +#: mod/contacts.php:607 +#, php-format +msgid "" +"Please choose the profile you would like to display to %s when viewing your " +"profile securely." +msgstr "Seleziona il profilo che vuoi mostrare a %s quando visita il tuo profilo in modo sicuro." + +#: mod/contacts.php:608 +msgid "Contact Information / Notes" +msgstr "Informazioni / Note sul contatto" + +#: mod/contacts.php:609 +msgid "Their personal note" +msgstr "" + +#: mod/contacts.php:611 +msgid "Edit contact notes" +msgstr "Modifica note contatto" + +#: mod/contacts.php:617 +msgid "Block/Unblock contact" +msgstr "Blocca/Sblocca contatto" + +#: mod/contacts.php:618 +msgid "Ignore contact" +msgstr "Ignora il contatto" + +#: mod/contacts.php:619 +msgid "Repair URL settings" +msgstr "Impostazioni riparazione URL" + +#: mod/contacts.php:620 +msgid "View conversations" +msgstr "Vedi conversazioni" + +#: mod/contacts.php:626 +msgid "Last update:" +msgstr "Ultimo aggiornamento:" + +#: mod/contacts.php:628 +msgid "Update public posts" +msgstr "Aggiorna messaggi pubblici" + +#: mod/contacts.php:630 mod/contacts.php:1004 +msgid "Update now" +msgstr "Aggiorna adesso" + +#: mod/contacts.php:636 mod/contacts.php:836 mod/contacts.php:1021 +msgid "Unignore" +msgstr "Non ignorare" + +#: mod/contacts.php:640 +msgid "Currently blocked" +msgstr "Bloccato" + +#: mod/contacts.php:641 +msgid "Currently ignored" +msgstr "Ignorato" + +#: mod/contacts.php:642 +msgid "Currently archived" +msgstr "Al momento archiviato" + +#: mod/contacts.php:643 +msgid "" +"Replies/likes to your public posts may still be visible" +msgstr "Risposte ai tuoi post pubblici possono essere comunque visibili" + +#: mod/contacts.php:644 +msgid "Notification for new posts" +msgstr "Notifica per i nuovi messaggi" + +#: mod/contacts.php:644 +msgid "Send a notification of every new post of this contact" +msgstr "Invia una notifica per ogni nuovo messaggio di questo contatto" + +#: mod/contacts.php:647 +msgid "Blacklisted keywords" +msgstr "Parole chiave in blacklist" + +#: mod/contacts.php:647 +msgid "" +"Comma separated list of keywords that should not be converted to hashtags, " +"when \"Fetch information and keywords\" is selected" +msgstr "Lista separata da virgola di parole chiave che non dovranno essere convertite in hashtag, quando \"Recupera informazioni e parole chiave\" è selezionato" + +#: mod/contacts.php:665 +msgid "Actions" +msgstr "Azioni" + +#: mod/contacts.php:668 +msgid "Contact Settings" +msgstr "Impostazioni Contatto" + +#: mod/contacts.php:714 +msgid "Suggestions" +msgstr "Suggerimenti" + +#: mod/contacts.php:717 +msgid "Suggest potential friends" +msgstr "Suggerisci potenziali amici" + +#: mod/contacts.php:725 +msgid "Show all contacts" +msgstr "Mostra tutti i contatti" + +#: mod/contacts.php:730 +msgid "Unblocked" +msgstr "Sbloccato" + +#: mod/contacts.php:733 +msgid "Only show unblocked contacts" +msgstr "Mostra solo contatti non bloccati" + +#: mod/contacts.php:739 +msgid "Blocked" +msgstr "Bloccato" + +#: mod/contacts.php:742 +msgid "Only show blocked contacts" +msgstr "Mostra solo contatti bloccati" + +#: mod/contacts.php:748 +msgid "Ignored" +msgstr "Ignorato" + +#: mod/contacts.php:751 +msgid "Only show ignored contacts" +msgstr "Mostra solo contatti ignorati" + +#: mod/contacts.php:757 +msgid "Archived" +msgstr "Archiviato" + +#: mod/contacts.php:760 +msgid "Only show archived contacts" +msgstr "Mostra solo contatti archiviati" + +#: mod/contacts.php:766 +msgid "Hidden" +msgstr "Nascosto" + +#: mod/contacts.php:769 +msgid "Only show hidden contacts" +msgstr "Mostra solo contatti nascosti" + +#: mod/contacts.php:826 +msgid "Search your contacts" +msgstr "Cerca nei tuoi contatti" + +#: mod/contacts.php:834 mod/settings.php:160 mod/settings.php:717 +msgid "Update" +msgstr "Aggiorna" + +#: mod/contacts.php:837 mod/contacts.php:1029 +msgid "Archive" +msgstr "Archivia" + +#: mod/contacts.php:837 mod/contacts.php:1029 +msgid "Unarchive" +msgstr "Dearchivia" + +#: mod/contacts.php:840 +msgid "Batch Actions" +msgstr "Azioni Batch" + +#: mod/contacts.php:886 +msgid "View all contacts" +msgstr "Vedi tutti i contatti" + +#: mod/contacts.php:896 +msgid "View all common friends" +msgstr "Vedi tutti gli amici in comune" + +#: mod/contacts.php:903 +msgid "Advanced Contact Settings" +msgstr "Impostazioni avanzate Contatto" + +#: mod/contacts.php:937 +msgid "Mutual Friendship" +msgstr "Amicizia reciproca" + +#: mod/contacts.php:941 +msgid "is a fan of yours" +msgstr "è un tuo fan" + +#: mod/contacts.php:945 +msgid "you are a fan of" +msgstr "sei un fan di" + +#: mod/contacts.php:1015 +msgid "Toggle Blocked status" +msgstr "Inverti stato \"Blocca\"" + +#: mod/contacts.php:1023 +msgid "Toggle Ignored status" +msgstr "Inverti stato \"Ignora\"" + +#: mod/contacts.php:1031 +msgid "Toggle Archive status" +msgstr "Inverti stato \"Archiviato\"" + +#: mod/contacts.php:1039 +msgid "Delete contact" +msgstr "Rimuovi contatto" + +#: mod/dfrn_confirm.php:74 mod/profiles.php:25 mod/profiles.php:135 +#: mod/profiles.php:182 mod/profiles.php:618 +msgid "Profile not found." +msgstr "Profilo non trovato." + +#: mod/dfrn_confirm.php:131 +msgid "" +"This may occasionally happen if contact was requested by both persons and it" +" has already been approved." +msgstr "Questo può accadere occasionalmente se la richiesta di contatto era stata inviata da entrambe le persone e già approvata." + +#: mod/dfrn_confirm.php:248 +msgid "Response from remote site was not understood." +msgstr "Errore di comunicazione con l'altro sito." + +#: mod/dfrn_confirm.php:257 mod/dfrn_confirm.php:262 +msgid "Unexpected response from remote site: " +msgstr "La risposta dell'altro sito non può essere gestita: " + +#: mod/dfrn_confirm.php:271 +msgid "Confirmation completed successfully." +msgstr "Conferma completata con successo." + +#: mod/dfrn_confirm.php:273 mod/dfrn_confirm.php:287 mod/dfrn_confirm.php:294 +msgid "Remote site reported: " +msgstr "Il sito remoto riporta: " + +#: mod/dfrn_confirm.php:285 +msgid "Temporary failure. Please wait and try again." +msgstr "Problema temporaneo. Attendi e riprova." + +#: mod/dfrn_confirm.php:292 +msgid "Introduction failed or was revoked." +msgstr "La presentazione ha generato un errore o è stata revocata." + +#: mod/dfrn_confirm.php:421 +msgid "Unable to set contact photo." +msgstr "Impossibile impostare la foto del contatto." + +#: mod/dfrn_confirm.php:562 +#, php-format +msgid "No user record found for '%s' " +msgstr "Nessun utente trovato '%s'" + +#: mod/dfrn_confirm.php:572 +msgid "Our site encryption key is apparently messed up." +msgstr "La nostra chiave di criptazione del sito sembra essere corrotta." + +#: mod/dfrn_confirm.php:583 +msgid "Empty site URL was provided or URL could not be decrypted by us." +msgstr "E' stato fornito un indirizzo vuoto o non possiamo decrittare l'indirizzo." + +#: mod/dfrn_confirm.php:605 +msgid "Contact record was not found for you on our site." +msgstr "Il contatto non è stato trovato sul nostro sito." + +#: mod/dfrn_confirm.php:619 +#, php-format +msgid "Site public key not available in contact record for URL %s." +msgstr "La chiave pubblica del sito non è disponibile per l'URL %s" + +#: mod/dfrn_confirm.php:639 +msgid "" +"The ID provided by your system is a duplicate on our system. It should work " +"if you try again." +msgstr "L'ID fornito dal tuo sistema è duplicato sul nostro sistema. Se riprovi dovrebbe funzionare." + +#: mod/dfrn_confirm.php:650 +msgid "Unable to set your contact credentials on our system." +msgstr "Impossibile impostare le credenziali del tuo contatto sul nostro sistema." + +#: mod/dfrn_confirm.php:712 +msgid "Unable to update your contact profile details on our system" +msgstr "Impossibile aggiornare i dettagli del tuo contatto sul nostro sistema" + +#: mod/dfrn_confirm.php:784 +#, php-format +msgid "%1$s has joined %2$s" +msgstr "%1$s si è unito a %2$s" + +#: mod/dirfind.php:41 +#, php-format +msgid "People Search - %s" +msgstr "Cerca persone - %s" + +#: mod/dirfind.php:52 +#, php-format +msgid "Forum Search - %s" +msgstr "Ricerca Forum - %s" + +#: mod/display.php:482 +msgid "Item has been removed." +msgstr "L'oggetto è stato rimosso." + +#: mod/events.php:98 mod/events.php:100 +msgid "Event can not end before it has started." +msgstr "Un evento non può finire prima di iniziare." + +#: mod/events.php:107 mod/events.php:109 +msgid "Event title and start time are required." +msgstr "Titolo e ora di inizio dell'evento sono richiesti." + +#: mod/events.php:385 +msgid "Create New Event" +msgstr "Crea un nuovo evento" + +#: mod/events.php:505 +msgid "Event details" +msgstr "Dettagli dell'evento" + +#: mod/events.php:506 +msgid "Starting date and Title are required." +msgstr "La data di inizio e il titolo sono richiesti." + +#: mod/events.php:507 mod/events.php:508 +msgid "Event Starts:" +msgstr "L'evento inizia:" + +#: mod/events.php:507 mod/events.php:519 mod/profiles.php:708 +msgid "Required" +msgstr "Richiesto" + +#: mod/events.php:509 mod/events.php:525 +msgid "Finish date/time is not known or not relevant" +msgstr "La data/ora di fine non è definita" + +#: mod/events.php:511 mod/events.php:512 +msgid "Event Finishes:" +msgstr "L'evento finisce:" + +#: mod/events.php:513 mod/events.php:526 +msgid "Adjust for viewer timezone" +msgstr "Visualizza con il fuso orario di chi legge" + +#: mod/events.php:515 +msgid "Description:" +msgstr "Descrizione:" + +#: mod/events.php:519 mod/events.php:521 +msgid "Title:" +msgstr "Titolo:" + +#: mod/events.php:522 mod/events.php:523 +msgid "Share this event" +msgstr "Condividi questo evento" + +#: mod/events.php:552 +msgid "Failed to remove event" +msgstr "Rimozione evento fallita." + +#: mod/events.php:554 +msgid "Event removed" +msgstr "Evento rimosso" + +#: mod/fsuggest.php:66 +msgid "Friend suggestion sent." +msgstr "Suggerimento di amicizia inviato." + +#: mod/fsuggest.php:100 +msgid "Suggest Friends" +msgstr "Suggerisci amici" + +#: mod/fsuggest.php:102 +#, php-format +msgid "Suggest a friend for %s" +msgstr "Suggerisci un amico a %s" + +#: mod/item.php:120 +msgid "Unable to locate original post." +msgstr "Impossibile trovare il messaggio originale." + +#: mod/item.php:347 +msgid "Empty post discarded." +msgstr "Messaggio vuoto scartato." + +#: mod/item.php:931 +msgid "System error. Post not saved." +msgstr "Errore di sistema. Messaggio non salvato." + +#: mod/item.php:1022 +#, php-format +msgid "" +"This message was sent to you by %s, a member of the Friendica social " +"network." +msgstr "Questo messaggio ti è stato inviato da %s, un membro del social network Friendica." + +#: mod/item.php:1024 +#, php-format +msgid "You may visit them online at %s" +msgstr "Puoi visitarli online su %s" + +#: mod/item.php:1025 +msgid "" +"Please contact the sender by replying to this post if you do not wish to " +"receive these messages." +msgstr "Contatta il mittente rispondendo a questo post se non vuoi ricevere questi messaggi." + +#: mod/item.php:1029 +#, php-format +msgid "%s posted an update." +msgstr "%s ha inviato un aggiornamento." + +#: mod/mood.php:137 +msgid "Mood" +msgstr "Umore" + +#: mod/mood.php:138 +msgid "Set your current mood and tell your friends" +msgstr "Condividi il tuo umore con i tuoi amici" + +#: mod/network.php:563 #, php-format msgid "" "Warning: This group contains %s member from a network that doesn't allow non" @@ -5393,279 +7150,421 @@ msgid_plural "" msgstr[0] "Attenzione: Questo gruppo contiene %s membro da una rete che non permette la ricezione di messaggi non pubblici." msgstr[1] "Attenzione: Questo gruppo contiene %s membri da reti che non permettono la ricezione di messaggi non pubblici." -#: mod/network.php:407 +#: mod/network.php:566 msgid "Messages in this group won't be send to these receivers." msgstr "I messaggi in questo gruppo non saranno inviati ai quei contatti." -#: mod/network.php:535 +#: mod/network.php:634 +msgid "No such group" +msgstr "Nessun gruppo" + +#: mod/network.php:659 +#, php-format +msgid "Group: %s" +msgstr "Gruppo: %s" + +#: mod/network.php:686 msgid "Private messages to this person are at risk of public disclosure." msgstr "I messaggi privati a questa persona potrebbero risultare visibili anche pubblicamente." -#: mod/network.php:540 +#: mod/network.php:690 msgid "Invalid contact." msgstr "Contatto non valido." -#: mod/network.php:813 +#: mod/network.php:895 msgid "Commented Order" msgstr "Ordina per commento" -#: mod/network.php:816 +#: mod/network.php:898 msgid "Sort by Comment Date" msgstr "Ordina per data commento" -#: mod/network.php:821 +#: mod/network.php:903 msgid "Posted Order" msgstr "Ordina per invio" -#: mod/network.php:824 +#: mod/network.php:906 msgid "Sort by Post Date" msgstr "Ordina per data messaggio" -#: mod/network.php:835 +#: mod/network.php:917 msgid "Posts that mention or involve you" msgstr "Messaggi che ti citano o coinvolgono" -#: mod/network.php:843 +#: mod/network.php:925 msgid "New" msgstr "Nuovo" -#: mod/network.php:846 +#: mod/network.php:928 msgid "Activity Stream - by date" msgstr "Activity Stream - per data" -#: mod/network.php:854 +#: mod/network.php:936 msgid "Shared Links" msgstr "Links condivisi" -#: mod/network.php:857 +#: mod/network.php:939 msgid "Interesting Links" msgstr "Link Interessanti" -#: mod/network.php:865 +#: mod/network.php:947 msgid "Starred" msgstr "Preferiti" -#: mod/network.php:868 +#: mod/network.php:950 msgid "Favourite Posts" msgstr "Messaggi preferiti" -#: mod/openid.php:24 -msgid "OpenID protocol error. No ID returned." -msgstr "Errore protocollo OpenID. Nessun ID ricevuto." +#: mod/ostatus_subscribe.php:17 +msgid "Subscribing to OStatus contacts" +msgstr "Iscrizione a contatti OStatus" -#: mod/openid.php:60 -msgid "" -"Account not found and OpenID registration is not permitted on this site." -msgstr "L'account non è stato trovato, e la registrazione via OpenID non è permessa su questo sito." +#: mod/ostatus_subscribe.php:28 +msgid "No contact provided." +msgstr "Nessun contatto disponibile." -#: mod/photos.php:94 mod/photos.php:1900 +#: mod/ostatus_subscribe.php:34 +msgid "Couldn't fetch information for contact." +msgstr "Non è stato possibile recuperare le informazioni del contatto." + +#: mod/ostatus_subscribe.php:43 +msgid "Couldn't fetch friends for contact." +msgstr "Non è stato possibile recuperare gli amici del contatto." + +#: mod/ostatus_subscribe.php:71 +msgid "success" +msgstr "successo" + +#: mod/ostatus_subscribe.php:73 +msgid "failed" +msgstr "fallito" + +#: mod/ostatus_subscribe.php:76 object/Item.php:262 +msgid "ignored" +msgstr "ignorato" + +#: mod/photos.php:98 mod/photos.php:1877 msgid "Recent Photos" msgstr "Foto recenti" -#: mod/photos.php:97 mod/photos.php:1328 mod/photos.php:1902 +#: mod/photos.php:101 mod/photos.php:1305 mod/photos.php:1879 msgid "Upload New Photos" msgstr "Carica nuove foto" -#: mod/photos.php:112 mod/settings.php:36 +#: mod/photos.php:116 mod/settings.php:36 msgid "everybody" msgstr "tutti" -#: mod/photos.php:176 +#: mod/photos.php:180 msgid "Contact information unavailable" msgstr "I dati di questo contatto non sono disponibili" -#: mod/photos.php:197 +#: mod/photos.php:201 msgid "Album not found." msgstr "Album non trovato." -#: mod/photos.php:230 mod/photos.php:242 mod/photos.php:1272 +#: mod/photos.php:234 mod/photos.php:246 mod/photos.php:1249 msgid "Delete Album" msgstr "Rimuovi album" -#: mod/photos.php:240 +#: mod/photos.php:244 msgid "Do you really want to delete this photo album and all its photos?" msgstr "Vuoi davvero cancellare questo album e tutte le sue foto?" -#: mod/photos.php:323 mod/photos.php:334 mod/photos.php:1598 +#: mod/photos.php:327 mod/photos.php:338 mod/photos.php:1575 msgid "Delete Photo" msgstr "Rimuovi foto" -#: mod/photos.php:332 +#: mod/photos.php:336 msgid "Do you really want to delete this photo?" msgstr "Vuoi veramente cancellare questa foto?" -#: mod/photos.php:713 +#: mod/photos.php:717 #, php-format msgid "%1$s was tagged in %2$s by %3$s" msgstr "%1$s è stato taggato in %2$s da %3$s" -#: mod/photos.php:713 +#: mod/photos.php:717 msgid "a photo" msgstr "una foto" -#: mod/photos.php:821 +#: mod/photos.php:817 mod/profile_photo.php:157 mod/wall_upload.php:182 +#, php-format +msgid "Image exceeds size limit of %s" +msgstr "La dimensione dell'immagine supera il limite di %s" + +#: mod/photos.php:825 msgid "Image file is empty." msgstr "Il file dell'immagine è vuoto." -#: mod/photos.php:988 +#: mod/photos.php:840 mod/profile_photo.php:166 mod/wall_upload.php:196 +msgid "Unable to process image." +msgstr "Impossibile caricare l'immagine." + +#: mod/photos.php:869 mod/profile_photo.php:316 mod/wall_upload.php:235 +msgid "Image upload failed." +msgstr "Caricamento immagine fallito." + +#: mod/photos.php:974 msgid "No photos selected" msgstr "Nessuna foto selezionata" -#: mod/photos.php:1091 mod/videos.php:309 +#: mod/photos.php:1077 mod/videos.php:313 msgid "Access to this item is restricted." msgstr "Questo oggetto non è visibile a tutti." -#: mod/photos.php:1151 -#, php-format -msgid "You have used %1$.2f Mbytes of %2$.2f Mbytes photo storage." -msgstr "Hai usato %1$.2f MBytes su %2$.2f disponibili." - -#: mod/photos.php:1188 +#: mod/photos.php:1165 msgid "Upload Photos" msgstr "Carica foto" -#: mod/photos.php:1192 mod/photos.php:1267 +#: mod/photos.php:1169 mod/photos.php:1244 msgid "New album name: " msgstr "Nome nuovo album: " -#: mod/photos.php:1193 +#: mod/photos.php:1170 msgid "or existing album name: " msgstr "o nome di un album esistente: " -#: mod/photos.php:1194 +#: mod/photos.php:1171 msgid "Do not show a status post for this upload" msgstr "Non creare un post per questo upload" -#: mod/photos.php:1205 mod/photos.php:1602 mod/settings.php:1307 +#: mod/photos.php:1182 mod/photos.php:1579 mod/settings.php:1294 msgid "Show to Groups" msgstr "Mostra ai gruppi" -#: mod/photos.php:1206 mod/photos.php:1603 mod/settings.php:1308 +#: mod/photos.php:1183 mod/photos.php:1580 mod/settings.php:1295 msgid "Show to Contacts" msgstr "Mostra ai contatti" -#: mod/photos.php:1207 +#: mod/photos.php:1184 msgid "Private Photo" msgstr "Foto privata" -#: mod/photos.php:1208 +#: mod/photos.php:1185 msgid "Public Photo" msgstr "Foto pubblica" -#: mod/photos.php:1278 +#: mod/photos.php:1255 msgid "Edit Album" msgstr "Modifica album" -#: mod/photos.php:1283 +#: mod/photos.php:1260 msgid "Show Newest First" msgstr "Mostra nuove foto per prime" -#: mod/photos.php:1285 +#: mod/photos.php:1262 msgid "Show Oldest First" msgstr "Mostra vecchie foto per prime" -#: mod/photos.php:1314 mod/photos.php:1885 +#: mod/photos.php:1291 mod/photos.php:1862 msgid "View Photo" msgstr "Vedi foto" -#: mod/photos.php:1359 +#: mod/photos.php:1336 msgid "Permission denied. Access to this item may be restricted." msgstr "Permesso negato. L'accesso a questo elemento può essere limitato." -#: mod/photos.php:1361 +#: mod/photos.php:1338 msgid "Photo not available" msgstr "Foto non disponibile" -#: mod/photos.php:1422 +#: mod/photos.php:1399 msgid "View photo" msgstr "Vedi foto" -#: mod/photos.php:1422 +#: mod/photos.php:1399 msgid "Edit photo" msgstr "Modifica foto" -#: mod/photos.php:1423 +#: mod/photos.php:1400 msgid "Use as profile photo" msgstr "Usa come foto del profilo" -#: mod/photos.php:1448 +#: mod/photos.php:1406 object/Item.php:127 +msgid "Private Message" +msgstr "Messaggio privato" + +#: mod/photos.php:1425 msgid "View Full Size" msgstr "Vedi dimensione intera" -#: mod/photos.php:1538 +#: mod/photos.php:1515 msgid "Tags: " msgstr "Tag: " -#: mod/photos.php:1541 +#: mod/photos.php:1518 msgid "[Remove any tag]" msgstr "[Rimuovi tutti i tag]" -#: mod/photos.php:1584 +#: mod/photos.php:1561 msgid "New album name" msgstr "Nuovo nome dell'album" -#: mod/photos.php:1585 +#: mod/photos.php:1562 msgid "Caption" msgstr "Titolo" -#: mod/photos.php:1586 +#: mod/photos.php:1563 msgid "Add a Tag" msgstr "Aggiungi tag" -#: mod/photos.php:1586 +#: mod/photos.php:1563 msgid "" "Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping" msgstr "Esempio: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping" -#: mod/photos.php:1587 +#: mod/photos.php:1564 msgid "Do not rotate" msgstr "Non ruotare" -#: mod/photos.php:1588 +#: mod/photos.php:1565 msgid "Rotate CW (right)" msgstr "Ruota a destra" -#: mod/photos.php:1589 +#: mod/photos.php:1566 msgid "Rotate CCW (left)" msgstr "Ruota a sinistra" -#: mod/photos.php:1604 +#: mod/photos.php:1581 msgid "Private photo" msgstr "Foto privata" -#: mod/photos.php:1605 +#: mod/photos.php:1582 msgid "Public photo" msgstr "Foto pubblica" -#: mod/photos.php:1814 +#: mod/photos.php:1602 object/Item.php:280 +msgid "I like this (toggle)" +msgstr "Mi piace (clic per cambiare)" + +#: mod/photos.php:1603 object/Item.php:281 +msgid "I don't like this (toggle)" +msgstr "Non mi piace (clic per cambiare)" + +#: mod/photos.php:1620 mod/photos.php:1662 mod/photos.php:1742 +#: object/Item.php:699 +msgid "This is you" +msgstr "Questo sei tu" + +#: mod/photos.php:1622 mod/photos.php:1664 mod/photos.php:1744 +#: object/Item.php:386 object/Item.php:701 +msgid "Comment" +msgstr "Commento" + +#: mod/photos.php:1791 msgid "Map" msgstr "Mappa" -#: mod/photos.php:1891 mod/videos.php:393 +#: mod/photos.php:1868 mod/videos.php:397 msgid "View Album" msgstr "Sfoglia l'album" -#: mod/probe.php:10 mod/webfinger.php:9 -msgid "Only logged in users are permitted to perform a probing." -msgstr "Solo agli utenti loggati è permesso effettuare un probe." +#: mod/ping.php:276 +msgid "{0} wants to be your friend" +msgstr "{0} vuole essere tuo amico" -#: mod/profile.php:175 -msgid "Tips for New Members" -msgstr "Consigli per i Nuovi Utenti" +#: mod/ping.php:291 +msgid "{0} sent you a message" +msgstr "{0} ti ha inviato un messaggio" -#: mod/profiles.php:38 +#: mod/ping.php:306 +msgid "{0} requested registration" +msgstr "{0} chiede la registrazione" + +#: mod/poke.php:199 +msgid "Poke/Prod" +msgstr "Tocca/Pungola" + +#: mod/poke.php:200 +msgid "poke, prod or do other things to somebody" +msgstr "tocca, pungola o fai altre cose a qualcuno" + +#: mod/poke.php:201 +msgid "Recipient" +msgstr "Destinatario" + +#: mod/poke.php:202 +msgid "Choose what you wish to do to recipient" +msgstr "Scegli cosa vuoi fare al destinatario" + +#: mod/poke.php:205 +msgid "Make this post private" +msgstr "Rendi questo post privato" + +#: mod/profile_photo.php:46 +msgid "Image uploaded but image cropping failed." +msgstr "L'immagine è stata caricata, ma il non è stato possibile ritagliarla." + +#: mod/profile_photo.php:79 mod/profile_photo.php:87 mod/profile_photo.php:95 +#: mod/profile_photo.php:324 +#, php-format +msgid "Image size reduction [%s] failed." +msgstr "Il ridimensionamento dell'immagine [%s] è fallito." + +#: mod/profile_photo.php:129 +msgid "" +"Shift-reload the page or clear browser cache if the new photo does not " +"display immediately." +msgstr "Ricarica la pagina con shift+F5 o cancella la cache del browser se la nuova foto non viene mostrata immediatamente." + +#: mod/profile_photo.php:138 +msgid "Unable to process image" +msgstr "Impossibile elaborare l'immagine" + +#: mod/profile_photo.php:255 +msgid "Upload File:" +msgstr "Carica un file:" + +#: mod/profile_photo.php:256 +msgid "Select a profile:" +msgstr "Seleziona un profilo:" + +#: mod/profile_photo.php:258 +msgid "Upload" +msgstr "Carica" + +#: mod/profile_photo.php:261 +msgid "or" +msgstr "o" + +#: mod/profile_photo.php:261 +msgid "skip this step" +msgstr "salta questo passaggio" + +#: mod/profile_photo.php:261 +msgid "select a photo from your photo albums" +msgstr "seleziona una foto dai tuoi album" + +#: mod/profile_photo.php:275 +msgid "Crop Image" +msgstr "Ritaglia immagine" + +#: mod/profile_photo.php:276 +msgid "Please adjust the image cropping for optimum viewing." +msgstr "Ritaglia l'immagine per una visualizzazione migliore." + +#: mod/profile_photo.php:278 +msgid "Done Editing" +msgstr "Finito" + +#: mod/profile_photo.php:314 +msgid "Image uploaded successfully." +msgstr "Immagine caricata con successo." + +#: mod/profiles.php:44 msgid "Profile deleted." msgstr "Profilo eliminato." -#: mod/profiles.php:54 mod/profiles.php:90 +#: mod/profiles.php:60 mod/profiles.php:96 msgid "Profile-" msgstr "Profilo-" -#: mod/profiles.php:73 mod/profiles.php:118 +#: mod/profiles.php:79 mod/profiles.php:118 msgid "New profile created." msgstr "Il nuovo profilo è stato creato." -#: mod/profiles.php:96 +#: mod/profiles.php:102 msgid "Profile unavailable to clone." msgstr "Impossibile duplicare il profilo." @@ -5709,7 +7608,7 @@ msgstr "XMPP" msgid "Homepage" msgstr "Homepage" -#: mod/profiles.php:375 mod/profiles.php:695 +#: mod/profiles.php:375 mod/profiles.php:694 msgid "Interests" msgstr "Interessi" @@ -5717,7 +7616,7 @@ msgstr "Interessi" msgid "Address" msgstr "Indirizzo" -#: mod/profiles.php:386 mod/profiles.php:691 +#: mod/profiles.php:386 mod/profiles.php:690 msgid "Location" msgstr "Posizione" @@ -5725,377 +7624,353 @@ msgstr "Posizione" msgid "Profile updated." msgstr "Profilo aggiornato." -#: mod/profiles.php:564 +#: mod/profiles.php:563 msgid " and " msgstr "e " -#: mod/profiles.php:573 +#: mod/profiles.php:572 msgid "public profile" msgstr "profilo pubblico" -#: mod/profiles.php:576 +#: mod/profiles.php:575 #, php-format msgid "%1$s changed %2$s to “%3$s”" msgstr "%1$s ha cambiato %2$s in “%3$s”" -#: mod/profiles.php:577 +#: mod/profiles.php:576 #, php-format msgid " - Visit %1$s's %2$s" msgstr "- Visita %2$s di %1$s" -#: mod/profiles.php:579 +#: mod/profiles.php:578 #, php-format msgid "%1$s has an updated %2$s, changing %3$s." msgstr "%1$s ha un %2$s aggiornato. Ha cambiato %3$s" -#: mod/profiles.php:637 +#: mod/profiles.php:636 msgid "Hide contacts and friends:" msgstr "Nascondi contatti:" -#: mod/profiles.php:642 +#: mod/profiles.php:641 msgid "Hide your contact/friend list from viewers of this profile?" msgstr "Nascondi la tua lista di contatti/amici ai visitatori di questo profilo?" -#: mod/profiles.php:667 +#: mod/profiles.php:666 msgid "Show more profile fields:" msgstr "Mostra più informazioni di profilo:" -#: mod/profiles.php:679 +#: mod/profiles.php:678 msgid "Profile Actions" msgstr "Azioni Profilo" -#: mod/profiles.php:680 +#: mod/profiles.php:679 msgid "Edit Profile Details" msgstr "Modifica i dettagli del profilo" -#: mod/profiles.php:682 +#: mod/profiles.php:681 msgid "Change Profile Photo" msgstr "Cambia la foto del profilo" -#: mod/profiles.php:683 +#: mod/profiles.php:682 msgid "View this profile" msgstr "Visualizza questo profilo" -#: mod/profiles.php:685 +#: mod/profiles.php:684 msgid "Create a new profile using these settings" msgstr "Crea un nuovo profilo usando queste impostazioni" -#: mod/profiles.php:686 +#: mod/profiles.php:685 msgid "Clone this profile" msgstr "Clona questo profilo" -#: mod/profiles.php:687 +#: mod/profiles.php:686 msgid "Delete this profile" msgstr "Elimina questo profilo" -#: mod/profiles.php:689 +#: mod/profiles.php:688 msgid "Basic information" msgstr "Informazioni di base" -#: mod/profiles.php:690 +#: mod/profiles.php:689 msgid "Profile picture" msgstr "Immagine del profilo" -#: mod/profiles.php:692 +#: mod/profiles.php:691 msgid "Preferences" msgstr "Preferenze" -#: mod/profiles.php:693 +#: mod/profiles.php:692 msgid "Status information" msgstr "Informazioni stato" -#: mod/profiles.php:694 +#: mod/profiles.php:693 msgid "Additional information" msgstr "Informazioni aggiuntive" -#: mod/profiles.php:697 +#: mod/profiles.php:696 msgid "Relation" msgstr "Relazione" -#: mod/profiles.php:701 +#: mod/profiles.php:700 msgid "Your Gender:" msgstr "Il tuo sesso:" -#: mod/profiles.php:702 +#: mod/profiles.php:701 msgid " Marital Status:" msgstr " Stato sentimentale:" -#: mod/profiles.php:704 +#: mod/profiles.php:703 msgid "Example: fishing photography software" msgstr "Esempio: pesca fotografia programmazione" -#: mod/profiles.php:709 +#: mod/profiles.php:708 msgid "Profile Name:" msgstr "Nome del profilo:" -#: mod/profiles.php:711 +#: mod/profiles.php:710 msgid "" "This is your public profile.
It may " "be visible to anybody using the internet." msgstr "Questo è il tuo profilo publico.
Potrebbe essere visto da chiunque attraverso internet." -#: mod/profiles.php:712 +#: mod/profiles.php:711 msgid "Your Full Name:" msgstr "Il tuo nome completo:" -#: mod/profiles.php:713 +#: mod/profiles.php:712 msgid "Title/Description:" msgstr "Breve descrizione (es. titolo, posizione, altro):" -#: mod/profiles.php:716 +#: mod/profiles.php:715 msgid "Street Address:" msgstr "Indirizzo (via/piazza):" -#: mod/profiles.php:717 +#: mod/profiles.php:716 msgid "Locality/City:" msgstr "Località:" -#: mod/profiles.php:718 +#: mod/profiles.php:717 msgid "Region/State:" msgstr "Regione/Stato:" -#: mod/profiles.php:719 +#: mod/profiles.php:718 msgid "Postal/Zip Code:" msgstr "CAP:" -#: mod/profiles.php:720 +#: mod/profiles.php:719 msgid "Country:" msgstr "Nazione:" -#: mod/profiles.php:724 +#: mod/profiles.php:723 msgid "Who: (if applicable)" msgstr "Con chi: (se possibile)" -#: mod/profiles.php:724 +#: mod/profiles.php:723 msgid "Examples: cathy123, Cathy Williams, cathy@example.com" msgstr "Esempio: cathy123, Cathy Williams, cathy@example.com" -#: mod/profiles.php:725 +#: mod/profiles.php:724 msgid "Since [date]:" msgstr "Dal [data]:" -#: mod/profiles.php:727 +#: mod/profiles.php:726 msgid "Tell us about yourself..." msgstr "Raccontaci di te..." -#: mod/profiles.php:728 +#: mod/profiles.php:727 msgid "XMPP (Jabber) address:" msgstr "Indirizzo XMPP (Jabber):" -#: mod/profiles.php:728 +#: mod/profiles.php:727 msgid "" "The XMPP address will be propagated to your contacts so that they can follow" " you." msgstr "L'indirizzo XMPP verrà propagato ai tuoi contatti così che possano seguirti." -#: mod/profiles.php:729 +#: mod/profiles.php:728 msgid "Homepage URL:" msgstr "Homepage:" -#: mod/profiles.php:732 +#: mod/profiles.php:731 msgid "Religious Views:" msgstr "Orientamento religioso:" -#: mod/profiles.php:733 +#: mod/profiles.php:732 msgid "Public Keywords:" msgstr "Parole chiave visibili a tutti:" -#: mod/profiles.php:733 +#: mod/profiles.php:732 msgid "(Used for suggesting potential friends, can be seen by others)" msgstr "(E' utilizzato per suggerire potenziali amici, può essere visto da altri)" -#: mod/profiles.php:734 +#: mod/profiles.php:733 msgid "Private Keywords:" msgstr "Parole chiave private:" -#: mod/profiles.php:734 +#: mod/profiles.php:733 msgid "(Used for searching profiles, never shown to others)" msgstr "(Usato per cercare tra i profili, non è mai visibile agli altri)" -#: mod/profiles.php:737 +#: mod/profiles.php:736 msgid "Musical interests" msgstr "Interessi musicali" -#: mod/profiles.php:738 +#: mod/profiles.php:737 msgid "Books, literature" msgstr "Libri, letteratura" -#: mod/profiles.php:739 +#: mod/profiles.php:738 msgid "Television" msgstr "Televisione" -#: mod/profiles.php:740 +#: mod/profiles.php:739 msgid "Film/dance/culture/entertainment" msgstr "Film/danza/cultura/intrattenimento" -#: mod/profiles.php:741 +#: mod/profiles.php:740 msgid "Hobbies/Interests" msgstr "Hobby/interessi" -#: mod/profiles.php:742 +#: mod/profiles.php:741 msgid "Love/romance" msgstr "Amore" -#: mod/profiles.php:743 +#: mod/profiles.php:742 msgid "Work/employment" msgstr "Lavoro/impiego" -#: mod/profiles.php:744 +#: mod/profiles.php:743 msgid "School/education" msgstr "Scuola/educazione" -#: mod/profiles.php:745 +#: mod/profiles.php:744 msgid "Contact information and Social Networks" msgstr "Informazioni su contatti e social network" -#: mod/profiles.php:786 +#: mod/profiles.php:785 msgid "Edit/Manage Profiles" msgstr "Modifica / Gestisci profili" -#: mod/register.php:93 +#: mod/register.php:98 msgid "" "Registration successful. Please check your email for further instructions." msgstr "Registrazione completata. Controlla la tua mail per ulteriori informazioni." -#: mod/register.php:98 +#: mod/register.php:103 #, php-format msgid "" "Failed to send email message. Here your accout details:
login: %s
" "password: %s

You can change your password after login." msgstr "Si è verificato un errore inviando l'email. I dettagli del tuo account:
login: %s
password: %s

Puoi cambiare la password dopo il login." -#: mod/register.php:105 +#: mod/register.php:110 msgid "Registration successful." msgstr "Registrazione completata." -#: mod/register.php:111 +#: mod/register.php:116 msgid "Your registration can not be processed." msgstr "La tua registrazione non puo' essere elaborata." -#: mod/register.php:160 +#: mod/register.php:165 msgid "Your registration is pending approval by the site owner." msgstr "La tua richiesta è in attesa di approvazione da parte del proprietario del sito." -#: mod/register.php:226 +#: mod/register.php:231 msgid "" "You may (optionally) fill in this form via OpenID by supplying your OpenID " "and clicking 'Register'." msgstr "Se vuoi, puoi riempire questo modulo tramite OpenID, inserendo il tuo OpenID e cliccando 'Registra'." -#: mod/register.php:227 +#: mod/register.php:232 msgid "" "If you are not familiar with OpenID, please leave that field blank and fill " "in the rest of the items." msgstr "Se non hai familiarità con OpenID, lascia il campo vuoto e riempi il resto della maschera." -#: mod/register.php:228 +#: mod/register.php:233 msgid "Your OpenID (optional): " msgstr "Il tuo OpenID (opzionale): " -#: mod/register.php:242 +#: mod/register.php:247 msgid "Include your profile in member directory?" msgstr "Includi il tuo profilo nell'elenco pubblico?" -#: mod/register.php:267 +#: mod/register.php:272 msgid "Note for the admin" msgstr "Nota per l'amministratore" -#: mod/register.php:267 +#: mod/register.php:272 msgid "Leave a message for the admin, why you want to join this node" msgstr "Lascia un messaggio per l'amministratore, per esempio perché vuoi registrarti su questo nodo" -#: mod/register.php:268 +#: mod/register.php:273 msgid "Membership on this site is by invitation only." msgstr "La registrazione su questo sito è solo su invito." -#: mod/register.php:269 +#: mod/register.php:274 msgid "Your invitation ID: " msgstr "L'ID del tuo invito:" -#: mod/register.php:272 mod/admin.php:1056 -msgid "Registration" -msgstr "Registrazione" - -#: mod/register.php:280 +#: mod/register.php:285 msgid "Your Full Name (e.g. Joe Smith, real or real-looking): " msgstr "Il tuo nome completo (es. Mario Rossi, vero o che sembri vero): " -#: mod/register.php:281 +#: mod/register.php:286 msgid "Your Email Address: " msgstr "Il tuo indirizzo email: " -#: mod/register.php:283 mod/settings.php:1278 +#: mod/register.php:288 mod/settings.php:1265 msgid "New Password:" msgstr "Nuova password:" -#: mod/register.php:283 +#: mod/register.php:288 msgid "Leave empty for an auto generated password." msgstr "Lascia vuoto per generare automaticamente una password." -#: mod/register.php:284 mod/settings.php:1279 +#: mod/register.php:289 mod/settings.php:1266 msgid "Confirm:" msgstr "Conferma:" -#: mod/register.php:285 +#: mod/register.php:290 msgid "" "Choose a profile nickname. This must begin with a text character. Your " "profile address on this site will then be " "'nickname@$sitename'." msgstr "Scegli un nome utente. Deve cominciare con una lettera. L'indirizzo del tuo profilo sarà 'soprannome@$sitename'." -#: mod/register.php:286 +#: mod/register.php:291 msgid "Choose a nickname: " msgstr "Scegli un nome utente: " -#: mod/register.php:296 +#: mod/register.php:301 msgid "Import your profile to this friendica instance" msgstr "Importa il tuo profilo in questo server friendica" -#: mod/search.php:100 -msgid "Only logged in users are permitted to perform a search." -msgstr "Solo agli utenti autenticati è permesso eseguire ricerche." +#: mod/regmod.php:62 +msgid "Account approved." +msgstr "Account approvato." -#: mod/search.php:124 -msgid "Too Many Requests" -msgstr "Troppe richieste" - -#: mod/search.php:125 -msgid "Only one search per minute is permitted for not logged in users." -msgstr "Solo una ricerca al minuto è permessa agli utenti non autenticati." - -#: mod/search.php:225 +#: mod/regmod.php:90 #, php-format -msgid "Items tagged with: %s" -msgstr "Elementi taggati con: %s" +msgid "Registration revoked for %s" +msgstr "Registrazione revocata per %s" -#: mod/settings.php:43 mod/admin.php:1490 -msgid "Account" -msgstr "Account" - -#: mod/settings.php:52 mod/admin.php:169 -msgid "Additional features" -msgstr "Funzionalità aggiuntive" +#: mod/regmod.php:102 +msgid "Please login." +msgstr "Accedi." #: mod/settings.php:60 msgid "Display" msgstr "Visualizzazione" -#: mod/settings.php:67 mod/settings.php:890 +#: mod/settings.php:67 mod/settings.php:895 msgid "Social Networks" msgstr "Social Networks" -#: mod/settings.php:74 mod/admin.php:167 mod/admin.php:1616 mod/admin.php:1679 -msgid "Plugins" -msgstr "Plugin" - #: mod/settings.php:88 msgid "Connected apps" msgstr "Applicazioni collegate" -#: mod/settings.php:95 mod/uexport.php:45 -msgid "Export personal data" -msgstr "Esporta dati personali" - #: mod/settings.php:102 msgid "Remove account" msgstr "Rimuovi account" @@ -6104,2692 +7979,923 @@ msgstr "Rimuovi account" msgid "Missing some important data!" msgstr "Mancano alcuni dati importanti!" -#: mod/settings.php:271 +#: mod/settings.php:267 msgid "Failed to connect with email account using the settings provided." msgstr "Impossibile collegarsi all'account email con i parametri forniti." -#: mod/settings.php:276 +#: mod/settings.php:272 msgid "Email settings updated." msgstr "Impostazioni e-mail aggiornate." -#: mod/settings.php:291 +#: mod/settings.php:288 msgid "Features updated" msgstr "Funzionalità aggiornate" -#: mod/settings.php:361 +#: mod/settings.php:359 msgid "Relocate message has been send to your contacts" msgstr "Il messaggio di trasloco è stato inviato ai tuoi contatti" -#: mod/settings.php:380 +#: mod/settings.php:378 msgid "Empty passwords are not allowed. Password unchanged." msgstr "Le password non possono essere vuote. Password non cambiata." -#: mod/settings.php:388 +#: mod/settings.php:386 msgid "Wrong password." msgstr "Password sbagliata." -#: mod/settings.php:399 +#: mod/settings.php:397 msgid "Password changed." msgstr "Password cambiata." -#: mod/settings.php:401 +#: mod/settings.php:399 msgid "Password update failed. Please try again." msgstr "Aggiornamento password fallito. Prova ancora." -#: mod/settings.php:481 +#: mod/settings.php:489 msgid " Please use a shorter name." msgstr " Usa un nome più corto." -#: mod/settings.php:483 +#: mod/settings.php:492 msgid " Name too short." msgstr " Nome troppo corto." -#: mod/settings.php:492 +#: mod/settings.php:502 msgid "Wrong Password" msgstr "Password Sbagliata" -#: mod/settings.php:497 +#: mod/settings.php:507 msgid " Not valid email." msgstr " Email non valida." -#: mod/settings.php:503 +#: mod/settings.php:514 msgid " Cannot change to that email." msgstr "Non puoi usare quella email." -#: mod/settings.php:559 +#: mod/settings.php:570 msgid "Private forum has no privacy permissions. Using default privacy group." msgstr "Il forum privato non ha permessi di privacy. Uso il gruppo di privacy predefinito." -#: mod/settings.php:563 +#: mod/settings.php:573 msgid "Private forum has no privacy permissions and no default privacy group." msgstr "Il gruppo privato non ha permessi di privacy e nessun gruppo di privacy predefinito." -#: mod/settings.php:603 +#: mod/settings.php:613 msgid "Settings updated." msgstr "Impostazioni aggiornate." -#: mod/settings.php:680 mod/settings.php:706 mod/settings.php:742 +#: mod/settings.php:690 mod/settings.php:716 mod/settings.php:752 msgid "Add application" msgstr "Aggiungi applicazione" -#: mod/settings.php:681 mod/settings.php:792 mod/settings.php:841 -#: mod/settings.php:908 mod/settings.php:1005 mod/settings.php:1271 -#: mod/admin.php:1055 mod/admin.php:1680 mod/admin.php:1943 mod/admin.php:2017 -#: mod/admin.php:2170 -msgid "Save Settings" -msgstr "Salva Impostazioni" - -#: mod/settings.php:684 mod/settings.php:710 +#: mod/settings.php:694 mod/settings.php:720 msgid "Consumer Key" msgstr "Consumer Key" -#: mod/settings.php:685 mod/settings.php:711 +#: mod/settings.php:695 mod/settings.php:721 msgid "Consumer Secret" msgstr "Consumer Secret" -#: mod/settings.php:686 mod/settings.php:712 +#: mod/settings.php:696 mod/settings.php:722 msgid "Redirect" msgstr "Redirect" -#: mod/settings.php:687 mod/settings.php:713 +#: mod/settings.php:697 mod/settings.php:723 msgid "Icon url" msgstr "Url icona" -#: mod/settings.php:698 +#: mod/settings.php:708 msgid "You can't edit this application." msgstr "Non puoi modificare questa applicazione." -#: mod/settings.php:741 +#: mod/settings.php:751 msgid "Connected Apps" msgstr "Applicazioni Collegate" -#: mod/settings.php:745 +#: mod/settings.php:753 object/Item.php:132 object/Item.php:134 +msgid "Edit" +msgstr "Modifica" + +#: mod/settings.php:755 msgid "Client key starts with" msgstr "Chiave del client inizia con" -#: mod/settings.php:746 +#: mod/settings.php:756 msgid "No name" msgstr "Nessun nome" -#: mod/settings.php:747 +#: mod/settings.php:757 msgid "Remove authorization" msgstr "Rimuovi l'autorizzazione" -#: mod/settings.php:759 +#: mod/settings.php:769 msgid "No Plugin settings configured" msgstr "Nessun plugin ha impostazioni modificabili" -#: mod/settings.php:768 +#: mod/settings.php:778 msgid "Plugin Settings" msgstr "Impostazioni plugin" -#: mod/settings.php:782 mod/admin.php:2159 mod/admin.php:2160 -msgid "Off" -msgstr "Spento" - -#: mod/settings.php:782 mod/admin.php:2159 mod/admin.php:2160 -msgid "On" -msgstr "Acceso" - -#: mod/settings.php:790 +#: mod/settings.php:800 msgid "Additional Features" msgstr "Funzionalità aggiuntive" -#: mod/settings.php:800 mod/settings.php:804 +#: mod/settings.php:810 mod/settings.php:814 msgid "General Social Media Settings" msgstr "Impostazioni Media Sociali" -#: mod/settings.php:810 +#: mod/settings.php:820 msgid "Disable intelligent shortening" msgstr "Disabilita accorciamento intelligente" -#: mod/settings.php:812 +#: mod/settings.php:822 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 "Normalmente il sistema tenta di trovare il migliore link da aggiungere a un post accorciato. Se questa opzione è abilitata, ogni post accorciato conterrà sempre un link al post originale su Friendica." -#: mod/settings.php:818 +#: mod/settings.php:828 msgid "Automatically follow any GNU Social (OStatus) followers/mentioners" msgstr "Segui automaticamente chiunque da GNU Social (OStatus) ti segua o ti menzioni" -#: mod/settings.php:820 +#: mod/settings.php:830 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 "Se ricevi un messaggio da un utente OStatus sconosciuto, questa opzione decide cosa fare. Se selezionato, un nuovo contatto verrà creato per ogni utente sconosciuto." -#: mod/settings.php:826 +#: mod/settings.php:836 msgid "Default group for OStatus contacts" msgstr "Gruppo di default per i contatti OStatus" -#: mod/settings.php:834 +#: mod/settings.php:844 msgid "Your legacy GNU Social account" msgstr "Il tuo vecchio account GNU Social" -#: mod/settings.php:836 +#: mod/settings.php:846 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 "Se inserisci il nome del tuo vecchio account GNU Social/Statusnet qui (nel formato utente@dominio.tld), i tuoi contatti verranno automaticamente aggiunti. Il campo verrà svuotato una volta terminato." -#: mod/settings.php:839 +#: mod/settings.php:849 msgid "Repair OStatus subscriptions" msgstr "Ripara le iscrizioni OStatus" -#: mod/settings.php:848 mod/settings.php:849 +#: mod/settings.php:858 mod/settings.php:859 #, php-format msgid "Built-in support for %s connectivity is %s" msgstr "Il supporto integrato per la connettività con %s è %s" -#: mod/settings.php:848 mod/settings.php:849 +#: mod/settings.php:858 mod/settings.php:859 msgid "enabled" msgstr "abilitato" -#: mod/settings.php:848 mod/settings.php:849 +#: mod/settings.php:858 mod/settings.php:859 msgid "disabled" msgstr "disabilitato" -#: mod/settings.php:849 +#: mod/settings.php:859 msgid "GNU Social (OStatus)" msgstr "GNU Social (OStatus)" -#: mod/settings.php:883 +#: mod/settings.php:890 msgid "Email access is disabled on this site." msgstr "L'accesso email è disabilitato su questo sito." -#: mod/settings.php:895 +#: mod/settings.php:900 msgid "Email/Mailbox Setup" msgstr "Impostazioni email" -#: mod/settings.php:896 +#: mod/settings.php:901 msgid "" "If you wish to communicate with email contacts using this service " "(optional), please specify how to connect to your mailbox." msgstr "Se vuoi comunicare con i contatti email usando questo servizio, specifica come collegarti alla tua casella di posta. (opzionale)" -#: mod/settings.php:897 +#: mod/settings.php:902 msgid "Last successful email check:" msgstr "Ultimo controllo email eseguito con successo:" -#: mod/settings.php:899 +#: mod/settings.php:904 msgid "IMAP server name:" msgstr "Nome server IMAP:" -#: mod/settings.php:900 +#: mod/settings.php:905 msgid "IMAP port:" msgstr "Porta IMAP:" -#: mod/settings.php:901 +#: mod/settings.php:906 msgid "Security:" msgstr "Sicurezza:" -#: mod/settings.php:901 mod/settings.php:906 +#: mod/settings.php:906 mod/settings.php:911 msgid "None" msgstr "Nessuna" -#: mod/settings.php:902 +#: mod/settings.php:907 msgid "Email login name:" msgstr "Nome utente email:" -#: mod/settings.php:903 +#: mod/settings.php:908 msgid "Email password:" msgstr "Password email:" -#: mod/settings.php:904 +#: mod/settings.php:909 msgid "Reply-to address:" msgstr "Indirizzo di risposta:" -#: mod/settings.php:905 +#: mod/settings.php:910 msgid "Send public posts to all email contacts:" msgstr "Invia i messaggi pubblici ai contatti email:" -#: mod/settings.php:906 +#: mod/settings.php:911 msgid "Action after import:" msgstr "Azione post importazione:" -#: mod/settings.php:906 +#: mod/settings.php:911 msgid "Move to folder" msgstr "Sposta nella cartella" -#: mod/settings.php:907 +#: mod/settings.php:912 msgid "Move to folder:" msgstr "Sposta nella cartella:" -#: mod/settings.php:943 mod/admin.php:942 -msgid "No special theme for mobile devices" -msgstr "Nessun tema speciale per i dispositivi mobili" - -#: mod/settings.php:1003 +#: mod/settings.php:1008 msgid "Display Settings" msgstr "Impostazioni Grafiche" -#: mod/settings.php:1009 mod/settings.php:1032 +#: mod/settings.php:1014 mod/settings.php:1037 msgid "Display Theme:" msgstr "Tema:" -#: mod/settings.php:1010 +#: mod/settings.php:1015 msgid "Mobile Theme:" msgstr "Tema mobile:" -#: mod/settings.php:1011 +#: mod/settings.php:1016 msgid "Suppress warning of insecure networks" msgstr "Sopprimi avvisi reti insicure" -#: mod/settings.php:1011 +#: mod/settings.php:1016 msgid "" "Should the system suppress the warning that the current group contains " "members of networks that can't receive non public postings." msgstr "Il sistema sopprimerà l'avviso che il gruppo selezionato contiene membri di reti che non possono ricevere post non pubblici." -#: mod/settings.php:1012 +#: mod/settings.php:1017 msgid "Update browser every xx seconds" msgstr "Aggiorna il browser ogni x secondi" -#: mod/settings.php:1012 +#: mod/settings.php:1017 msgid "Minimum of 10 seconds. Enter -1 to disable it." msgstr "Minimo 10 secondi. Inserisci -1 per disabilitarlo" -#: mod/settings.php:1013 +#: mod/settings.php:1018 msgid "Number of items to display per page:" msgstr "Numero di elementi da mostrare per pagina:" -#: mod/settings.php:1013 mod/settings.php:1014 +#: mod/settings.php:1018 mod/settings.php:1019 msgid "Maximum of 100 items" msgstr "Massimo 100 voci" -#: mod/settings.php:1014 +#: mod/settings.php:1019 msgid "Number of items to display per page when viewed from mobile device:" msgstr "Numero di voci da visualizzare per pagina quando si utilizza un dispositivo mobile:" -#: mod/settings.php:1015 +#: mod/settings.php:1020 msgid "Don't show emoticons" msgstr "Non mostrare le emoticons" -#: mod/settings.php:1016 +#: mod/settings.php:1021 msgid "Calendar" msgstr "Calendario" -#: mod/settings.php:1017 +#: mod/settings.php:1022 msgid "Beginning of week:" msgstr "Inizio della settimana:" -#: mod/settings.php:1018 +#: mod/settings.php:1023 msgid "Don't show notices" msgstr "Non mostrare gli avvisi" -#: mod/settings.php:1019 +#: mod/settings.php:1024 msgid "Infinite scroll" msgstr "Scroll infinito" -#: mod/settings.php:1020 +#: mod/settings.php:1025 msgid "Automatic updates only at the top of the network page" msgstr "Aggiornamenti automatici solo in cima alla pagina \"rete\"" -#: mod/settings.php:1021 +#: mod/settings.php:1025 +msgid "" +"When disabled, the network page is updated all the time, which could be " +"confusing while reading." +msgstr "" + +#: mod/settings.php:1026 msgid "Bandwith Saver Mode" msgstr "Modalità Salva Banda" -#: mod/settings.php:1021 +#: mod/settings.php:1026 msgid "" "When enabled, embedded content is not displayed on automatic updates, they " "only show on page reload." msgstr "Quando abilitato, il contenuto embeddato non è mostrato quando la pagina si aggiorna automaticamente, ma solo quando la pagina viene ricaricata." -#: mod/settings.php:1023 +#: mod/settings.php:1028 msgid "General Theme Settings" msgstr "Opzioni Generali Tema" -#: mod/settings.php:1024 +#: mod/settings.php:1029 msgid "Custom Theme Settings" msgstr "Opzioni Personalizzate Tema" -#: mod/settings.php:1025 +#: mod/settings.php:1030 msgid "Content Settings" msgstr "Opzioni Contenuto" -#: mod/settings.php:1026 view/theme/duepuntozero/config.php:63 -#: view/theme/frio/config.php:66 view/theme/quattro/config.php:69 -#: view/theme/vier/config.php:114 +#: mod/settings.php:1031 view/theme/duepuntozero/config.php:67 +#: view/theme/frio/config.php:110 view/theme/quattro/config.php:73 +#: view/theme/vier/config.php:116 msgid "Theme settings" msgstr "Impostazioni tema" -#: mod/settings.php:1110 +#: mod/settings.php:1097 msgid "Account Types" msgstr "Tipi di Account" -#: mod/settings.php:1111 +#: mod/settings.php:1098 msgid "Personal Page Subtypes" msgstr "Sottotipi di Pagine Personali" -#: mod/settings.php:1112 +#: mod/settings.php:1099 msgid "Community Forum Subtypes" msgstr "Sottotipi di Community Forum" -#: mod/settings.php:1119 +#: mod/settings.php:1106 msgid "Personal Page" msgstr "Pagina Personale" -#: mod/settings.php:1120 -msgid "This account is a regular personal profile" -msgstr "Questo account è un profilo personale regolare" +#: mod/settings.php:1107 +msgid "Account for a personal profile." +msgstr "" -#: mod/settings.php:1123 +#: mod/settings.php:1110 msgid "Organisation Page" msgstr "Pagina Organizzazione" -#: mod/settings.php:1124 -msgid "This account is a profile for an organisation" -msgstr "Questo account è il profilo per un'organizzazione" +#: mod/settings.php:1111 +msgid "" +"Account for an organisation that automatically approves contact requests as " +"\"Followers\"." +msgstr "" -#: mod/settings.php:1127 +#: mod/settings.php:1114 msgid "News Page" msgstr "Pagina Notizie" -#: mod/settings.php:1128 -msgid "This account is a news account/reflector" -msgstr "Questo account è un account di notizie" +#: mod/settings.php:1115 +msgid "" +"Account for a news reflector that automatically approves contact requests as" +" \"Followers\"." +msgstr "" -#: mod/settings.php:1131 +#: mod/settings.php:1118 msgid "Community Forum" msgstr "Community Forum" -#: mod/settings.php:1132 -msgid "" -"This account is a community forum where people can discuss with each other" -msgstr "Questo account è un forum comunitario dove le persone possono discutere tra loro" +#: mod/settings.php:1119 +msgid "Account for community discussions." +msgstr "" -#: mod/settings.php:1135 +#: mod/settings.php:1122 msgid "Normal Account Page" msgstr "Pagina Account Normale" -#: mod/settings.php:1136 -msgid "This account is a normal personal profile" -msgstr "Questo account è un normale profilo personale" +#: mod/settings.php:1123 +msgid "" +"Account for a regular personal profile that requires manual approval of " +"\"Friends\" and \"Followers\"." +msgstr "" -#: mod/settings.php:1139 +#: mod/settings.php:1126 msgid "Soapbox Page" msgstr "Pagina Sandbox" -#: mod/settings.php:1140 -msgid "Automatically approve all connection/friend requests as read-only fans" -msgstr "Chi richiede la connessione/amicizia sarà accettato automaticamente come fan che potrà solamente leggere la bacheca" +#: mod/settings.php:1127 +msgid "" +"Account for a public profile that automatically approves contact requests as" +" \"Followers\"." +msgstr "" -#: mod/settings.php:1143 +#: mod/settings.php:1130 msgid "Public Forum" msgstr "Forum Pubblico" -#: mod/settings.php:1144 -msgid "Automatically approve all contact requests" -msgstr "Approva automaticamente tutte le richieste di contatto" +#: mod/settings.php:1131 +msgid "Automatically approves all contact requests." +msgstr "" -#: mod/settings.php:1147 +#: mod/settings.php:1134 msgid "Automatic Friend Page" msgstr "Pagina con amicizia automatica" -#: mod/settings.php:1148 -msgid "Automatically approve all connection/friend requests as friends" -msgstr "Chi richiede la connessione/amicizia sarà accettato automaticamente come amico" +#: mod/settings.php:1135 +msgid "" +"Account for a popular profile that automatically approves contact requests " +"as \"Friends\"." +msgstr "" -#: mod/settings.php:1151 +#: mod/settings.php:1138 msgid "Private Forum [Experimental]" msgstr "Forum privato [sperimentale]" -#: mod/settings.php:1152 -msgid "Private forum - approved members only" -msgstr "Forum privato - solo membri approvati" +#: mod/settings.php:1139 +msgid "Requires manual approval of contact requests." +msgstr "" -#: mod/settings.php:1163 +#: mod/settings.php:1150 msgid "OpenID:" msgstr "OpenID:" -#: mod/settings.php:1163 +#: mod/settings.php:1150 msgid "(Optional) Allow this OpenID to login to this account." msgstr "(Opzionale) Consente di loggarti in questo account con questo OpenID" -#: mod/settings.php:1171 +#: mod/settings.php:1158 msgid "Publish your default profile in your local site directory?" msgstr "Pubblica il tuo profilo predefinito nell'elenco locale del sito" -#: mod/settings.php:1171 +#: mod/settings.php:1158 msgid "Your profile may be visible in public." msgstr "Il tuo profilo potrebbe essere visibile pubblicamente." -#: mod/settings.php:1177 +#: mod/settings.php:1164 msgid "Publish your default profile in the global social directory?" msgstr "Pubblica il tuo profilo predefinito nell'elenco sociale globale" -#: mod/settings.php:1184 +#: mod/settings.php:1171 msgid "Hide your contact/friend list from viewers of your default profile?" msgstr "Nascondi la lista dei tuoi contatti/amici dai visitatori del tuo profilo predefinito" -#: mod/settings.php:1188 +#: mod/settings.php:1175 msgid "" "If enabled, posting public messages to Diaspora and other networks isn't " "possible." msgstr "Se abilitato, l'invio di messaggi pubblici verso Diaspora e altri network non sarà possibile" -#: mod/settings.php:1193 +#: mod/settings.php:1180 msgid "Allow friends to post to your profile page?" msgstr "Permetti agli amici di scrivere sulla tua pagina profilo?" -#: mod/settings.php:1198 +#: mod/settings.php:1185 msgid "Allow friends to tag your posts?" msgstr "Permetti agli amici di aggiungere tag ai tuoi messaggi?" -#: mod/settings.php:1203 +#: mod/settings.php:1190 msgid "Allow us to suggest you as a potential friend to new members?" msgstr "Ci permetti di suggerirti come potenziale amico ai nuovi membri?" -#: mod/settings.php:1208 +#: mod/settings.php:1195 msgid "Permit unknown people to send you private mail?" msgstr "Permetti a utenti sconosciuti di inviarti messaggi privati?" -#: mod/settings.php:1216 +#: mod/settings.php:1203 msgid "Profile is not published." msgstr "Il profilo non è pubblicato." -#: mod/settings.php:1224 +#: mod/settings.php:1211 #, php-format msgid "Your Identity Address is '%s' or '%s'." msgstr "L'indirizzo della tua identità è '%s' or '%s'." -#: mod/settings.php:1231 +#: mod/settings.php:1218 msgid "Automatically expire posts after this many days:" msgstr "Fai scadere i post automaticamente dopo x giorni:" -#: mod/settings.php:1231 +#: mod/settings.php:1218 msgid "If empty, posts will not expire. Expired posts will be deleted" msgstr "Se lasciato vuoto, i messaggi non verranno cancellati." -#: mod/settings.php:1232 +#: mod/settings.php:1219 msgid "Advanced expiration settings" msgstr "Impostazioni avanzate di scadenza" -#: mod/settings.php:1233 +#: mod/settings.php:1220 msgid "Advanced Expiration" msgstr "Scadenza avanzata" -#: mod/settings.php:1234 +#: mod/settings.php:1221 msgid "Expire posts:" msgstr "Fai scadere i post:" -#: mod/settings.php:1235 +#: mod/settings.php:1222 msgid "Expire personal notes:" msgstr "Fai scadere le Note personali:" -#: mod/settings.php:1236 +#: mod/settings.php:1223 msgid "Expire starred posts:" msgstr "Fai scadere i post Speciali:" -#: mod/settings.php:1237 +#: mod/settings.php:1224 msgid "Expire photos:" msgstr "Fai scadere le foto:" -#: mod/settings.php:1238 +#: mod/settings.php:1225 msgid "Only expire posts by others:" msgstr "Fai scadere solo i post degli altri:" -#: mod/settings.php:1269 +#: mod/settings.php:1256 msgid "Account Settings" msgstr "Impostazioni account" -#: mod/settings.php:1277 +#: mod/settings.php:1264 msgid "Password Settings" msgstr "Impostazioni password" -#: mod/settings.php:1279 +#: mod/settings.php:1266 msgid "Leave password fields blank unless changing" msgstr "Lascia questi campi in bianco per non effettuare variazioni alla password" -#: mod/settings.php:1280 +#: mod/settings.php:1267 msgid "Current Password:" msgstr "Password Attuale:" -#: mod/settings.php:1280 mod/settings.php:1281 +#: mod/settings.php:1267 mod/settings.php:1268 msgid "Your current password to confirm the changes" msgstr "La tua password attuale per confermare le modifiche" -#: mod/settings.php:1281 +#: mod/settings.php:1268 msgid "Password:" msgstr "Password:" -#: mod/settings.php:1285 +#: mod/settings.php:1272 msgid "Basic Settings" msgstr "Impostazioni base" -#: mod/settings.php:1287 +#: mod/settings.php:1274 msgid "Email Address:" msgstr "Indirizzo Email:" -#: mod/settings.php:1288 +#: mod/settings.php:1275 msgid "Your Timezone:" msgstr "Il tuo fuso orario:" -#: mod/settings.php:1289 +#: mod/settings.php:1276 msgid "Your Language:" msgstr "La tua lingua:" -#: mod/settings.php:1289 +#: mod/settings.php:1276 msgid "" "Set the language we use to show you friendica interface and to send you " "emails" msgstr "Imposta la lingua che sarà usata per mostrarti l'interfaccia di Friendica e per inviarti le email" -#: mod/settings.php:1290 +#: mod/settings.php:1277 msgid "Default Post Location:" msgstr "Località predefinita:" -#: mod/settings.php:1291 +#: mod/settings.php:1278 msgid "Use Browser Location:" msgstr "Usa la località rilevata dal browser:" -#: mod/settings.php:1294 +#: mod/settings.php:1281 msgid "Security and Privacy Settings" msgstr "Impostazioni di sicurezza e privacy" -#: mod/settings.php:1296 +#: mod/settings.php:1283 msgid "Maximum Friend Requests/Day:" msgstr "Numero massimo di richieste di amicizia al giorno:" -#: mod/settings.php:1296 mod/settings.php:1326 +#: mod/settings.php:1283 mod/settings.php:1313 msgid "(to prevent spam abuse)" msgstr "(per prevenire lo spam)" -#: mod/settings.php:1297 +#: mod/settings.php:1284 msgid "Default Post Permissions" msgstr "Permessi predefiniti per i messaggi" -#: mod/settings.php:1298 +#: mod/settings.php:1285 msgid "(click to open/close)" msgstr "(clicca per aprire/chiudere)" -#: mod/settings.php:1309 +#: mod/settings.php:1296 msgid "Default Private Post" msgstr "Default Post Privato" -#: mod/settings.php:1310 +#: mod/settings.php:1297 msgid "Default Public Post" msgstr "Default Post Pubblico" -#: mod/settings.php:1314 +#: mod/settings.php:1301 msgid "Default Permissions for New Posts" msgstr "Permessi predefiniti per i nuovi post" -#: mod/settings.php:1326 +#: mod/settings.php:1313 msgid "Maximum private messages per day from unknown people:" msgstr "Numero massimo di messaggi privati da utenti sconosciuti per giorno:" -#: mod/settings.php:1329 +#: mod/settings.php:1316 msgid "Notification Settings" msgstr "Impostazioni notifiche" -#: mod/settings.php:1330 +#: mod/settings.php:1317 msgid "By default post a status message when:" msgstr "Invia un messaggio di stato quando:" -#: mod/settings.php:1331 +#: mod/settings.php:1318 msgid "accepting a friend request" msgstr "accetti una richiesta di amicizia" -#: mod/settings.php:1332 +#: mod/settings.php:1319 msgid "joining a forum/community" msgstr "ti unisci a un forum/comunità" -#: mod/settings.php:1333 +#: mod/settings.php:1320 msgid "making an interesting profile change" msgstr "fai un interessante modifica al profilo" -#: mod/settings.php:1334 +#: mod/settings.php:1321 msgid "Send a notification email when:" msgstr "Invia una mail di notifica quando:" -#: mod/settings.php:1335 +#: mod/settings.php:1322 msgid "You receive an introduction" msgstr "Ricevi una presentazione" -#: mod/settings.php:1336 +#: mod/settings.php:1323 msgid "Your introductions are confirmed" msgstr "Le tue presentazioni sono confermate" -#: mod/settings.php:1337 +#: mod/settings.php:1324 msgid "Someone writes on your profile wall" msgstr "Qualcuno scrive sulla bacheca del tuo profilo" -#: mod/settings.php:1338 +#: mod/settings.php:1325 msgid "Someone writes a followup comment" msgstr "Qualcuno scrive un commento a un tuo messaggio" -#: mod/settings.php:1339 +#: mod/settings.php:1326 msgid "You receive a private message" msgstr "Ricevi un messaggio privato" -#: mod/settings.php:1340 +#: mod/settings.php:1327 msgid "You receive a friend suggestion" msgstr "Hai ricevuto un suggerimento di amicizia" -#: mod/settings.php:1341 +#: mod/settings.php:1328 msgid "You are tagged in a post" msgstr "Sei stato taggato in un post" -#: mod/settings.php:1342 +#: mod/settings.php:1329 msgid "You are poked/prodded/etc. in a post" msgstr "Sei 'toccato'/'spronato'/ecc. in un post" -#: mod/settings.php:1344 +#: mod/settings.php:1331 msgid "Activate desktop notifications" msgstr "Attiva notifiche desktop" -#: mod/settings.php:1344 +#: mod/settings.php:1331 msgid "Show desktop popup on new notifications" msgstr "Mostra un popup di notifica sul desktop all'arrivo di nuove notifiche" -#: mod/settings.php:1346 +#: mod/settings.php:1333 msgid "Text-only notification emails" msgstr "Email di notifica in solo testo" -#: mod/settings.php:1348 +#: mod/settings.php:1335 msgid "Send text only notification emails, without the html part" msgstr "Invia le email di notifica in solo testo, senza la parte in html" -#: mod/settings.php:1350 +#: mod/settings.php:1337 +msgid "Show detailled notifications" +msgstr "" + +#: mod/settings.php:1339 +msgid "" +"Per default the notificiation are condensed to a single notification per " +"item. When enabled, every notification is displayed." +msgstr "" + +#: mod/settings.php:1341 msgid "Advanced Account/Page Type Settings" msgstr "Impostazioni avanzate Account/Tipo di pagina" -#: mod/settings.php:1351 +#: mod/settings.php:1342 msgid "Change the behaviour of this account for special situations" msgstr "Modifica il comportamento di questo account in situazioni speciali" -#: mod/settings.php:1354 +#: mod/settings.php:1345 msgid "Relocate" msgstr "Trasloca" -#: mod/settings.php:1355 +#: mod/settings.php:1346 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 "Se hai spostato questo profilo da un'altro server, e alcuni dei tuoi contatti non ricevono i tuoi aggiornamenti, prova a premere questo bottone." -#: mod/settings.php:1356 +#: mod/settings.php:1347 msgid "Resend relocate message to contacts" msgstr "Invia nuovamente il messaggio di trasloco ai contatti" -#: mod/uexport.php:37 -msgid "Export account" -msgstr "Esporta account" - -#: mod/uexport.php:37 -msgid "" -"Export your account info and contacts. Use this to make a backup of your " -"account and/or to move it to another server." -msgstr "Esporta le informazioni del tuo account e dei contatti. Usa questa funzione per fare un backup del tuo account o per spostarlo in un altro server." - -#: mod/uexport.php:38 -msgid "Export all" -msgstr "Esporta tutto" - -#: mod/uexport.php:38 -msgid "" -"Export your accout info, contacts and all your items as json. Could be a " -"very big file, and could take a lot of time. Use this to make a full backup " -"of your account (photos are not exported)" -msgstr "Esporta le informazioni del tuo account, i tuoi contatti e tutti i tuoi elementi in json. Può diventare un file veramente molto grosso e metterci un sacco di tempo. Usa questa funzione per fare un backup completo del tuo account (le foto non sono esportate)" - -#: mod/videos.php:124 +#: mod/videos.php:128 msgid "Do you really want to delete this video?" msgstr "Vuoi veramente cancellare questo video?" -#: mod/videos.php:129 +#: mod/videos.php:133 msgid "Delete Video" msgstr "Rimuovi video" -#: mod/videos.php:208 +#: mod/videos.php:212 msgid "No videos selected" msgstr "Nessun video selezionato" -#: mod/videos.php:402 +#: mod/videos.php:406 msgid "Recent Videos" msgstr "Video Recenti" -#: mod/videos.php:404 +#: mod/videos.php:408 msgid "Upload New Videos" msgstr "Carica Nuovo Video" -#: mod/install.php:106 -msgid "Friendica Communications Server - Setup" -msgstr "Friendica Comunicazione Server - Impostazioni" +#: mod/wall_attach.php:19 mod/wall_attach.php:27 mod/wall_attach.php:78 +#: mod/wall_upload.php:37 mod/wall_upload.php:53 mod/wall_upload.php:111 +#: mod/wall_upload.php:151 mod/wall_upload.php:154 +msgid "Invalid request." +msgstr "Richiesta non valida." -#: mod/install.php:112 -msgid "Could not connect to database." -msgstr " Impossibile collegarsi con il database." +#: mod/wall_attach.php:96 +msgid "Sorry, maybe your upload is bigger than the PHP configuration allows" +msgstr "Mi spiace, forse il file che stai caricando è più grosso di quanto la configurazione di PHP permetta" -#: mod/install.php:116 -msgid "Could not create table." -msgstr "Impossibile creare le tabelle." +#: mod/wall_attach.php:96 +msgid "Or - did you try to upload an empty file?" +msgstr "O.. non avrai provato a caricare un file vuoto?" -#: mod/install.php:122 -msgid "Your Friendica site database has been installed." -msgstr "Il tuo Friendica è stato installato." - -#: mod/install.php:127 -msgid "" -"You may need to import the file \"database.sql\" manually using phpmyadmin " -"or mysql." -msgstr "Potresti dover importare il file \"database.sql\" manualmente con phpmyadmin o mysql" - -#: mod/install.php:128 mod/install.php:200 mod/install.php:547 -msgid "Please see the file \"INSTALL.txt\"." -msgstr "Leggi il file \"INSTALL.txt\"." - -#: mod/install.php:140 -msgid "Database already in use." -msgstr "Database già in uso." - -#: mod/install.php:197 -msgid "System check" -msgstr "Controllo sistema" - -#: mod/install.php:202 -msgid "Check again" -msgstr "Controlla ancora" - -#: mod/install.php:221 -msgid "Database connection" -msgstr "Connessione al database" - -#: mod/install.php:222 -msgid "" -"In order to install Friendica we need to know how to connect to your " -"database." -msgstr "Per installare Friendica dobbiamo sapere come collegarci al tuo database." - -#: mod/install.php:223 -msgid "" -"Please contact your hosting provider or site administrator if you have " -"questions about these settings." -msgstr "Contatta il tuo fornitore di hosting o l'amministratore del sito se hai domande su queste impostazioni." - -#: mod/install.php:224 -msgid "" -"The database you specify below should already exist. If it does not, please " -"create it before continuing." -msgstr "Il database dovrà già esistere. Se non esiste, crealo prima di continuare." - -#: mod/install.php:228 -msgid "Database Server Name" -msgstr "Nome del database server" - -#: mod/install.php:229 -msgid "Database Login Name" -msgstr "Nome utente database" - -#: mod/install.php:230 -msgid "Database Login Password" -msgstr "Password utente database" - -#: mod/install.php:230 -msgid "For security reasons the password must not be empty" -msgstr "Per motivi di sicurezza la password non puo' essere vuota." - -#: mod/install.php:231 -msgid "Database Name" -msgstr "Nome database" - -#: mod/install.php:232 mod/install.php:273 -msgid "Site administrator email address" -msgstr "Indirizzo email dell'amministratore del sito" - -#: mod/install.php:232 mod/install.php:273 -msgid "" -"Your account email address must match this in order to use the web admin " -"panel." -msgstr "Il tuo indirizzo email deve corrispondere a questo per poter usare il pannello di amministrazione web." - -#: mod/install.php:236 mod/install.php:276 -msgid "Please select a default timezone for your website" -msgstr "Seleziona il fuso orario predefinito per il tuo sito web" - -#: mod/install.php:263 -msgid "Site settings" -msgstr "Impostazioni sito" - -#: mod/install.php:277 -msgid "System Language:" -msgstr "Lingua di Sistema:" - -#: mod/install.php:277 -msgid "" -"Set the default language for your Friendica installation interface and to " -"send emails." -msgstr "Imposta la lingua di default per l'interfaccia e l'invio delle email." - -#: mod/install.php:317 -msgid "Could not find a command line version of PHP in the web server PATH." -msgstr "Non riesco a trovare la versione di PHP da riga di comando nel PATH del server web" - -#: mod/install.php:318 -msgid "" -"If you don't have a command line version of PHP installed on server, you " -"will not be able to run the background processing. See 'Setup the poller'" -msgstr "Se non hai la versione a riga di comando di PHP installata sul tuo server, non sarai in grado di eseguire i processi in background. Vedi 'Setup the poller'" - -#: mod/install.php:322 -msgid "PHP executable path" -msgstr "Percorso eseguibile PHP" - -#: mod/install.php:322 -msgid "" -"Enter full path to php executable. You can leave this blank to continue the " -"installation." -msgstr "Inserisci il percorso completo all'eseguibile di php. Puoi lasciare bianco questo campo per continuare l'installazione." - -#: mod/install.php:327 -msgid "Command line PHP" -msgstr "PHP da riga di comando" - -#: mod/install.php:336 -msgid "PHP executable is not the php cli binary (could be cgi-fgci version)" -msgstr "L'eseguibile PHP non è il binario php cli (potrebbe essere la versione cgi-fcgi)" - -#: mod/install.php:337 -msgid "Found PHP version: " -msgstr "Versione PHP:" - -#: mod/install.php:339 -msgid "PHP cli binary" -msgstr "Binario PHP cli" - -#: mod/install.php:350 -msgid "" -"The command line version of PHP on your system does not have " -"\"register_argc_argv\" enabled." -msgstr "La versione da riga di comando di PHP nel sistema non ha abilitato \"register_argc_argv\"." - -#: mod/install.php:351 -msgid "This is required for message delivery to work." -msgstr "E' obbligatorio per far funzionare la consegna dei messaggi." - -#: mod/install.php:353 -msgid "PHP register_argc_argv" -msgstr "PHP register_argc_argv" - -#: mod/install.php:376 -msgid "" -"Error: the \"openssl_pkey_new\" function on this system is not able to " -"generate encryption keys" -msgstr "Errore: la funzione \"openssl_pkey_new\" in questo sistema non è in grado di generare le chiavi di criptazione" - -#: mod/install.php:377 -msgid "" -"If running under Windows, please see " -"\"http://www.php.net/manual/en/openssl.installation.php\"." -msgstr "Se stai eseguendo friendika su windows, guarda \"http://www.php.net/manual/en/openssl.installation.php\"." - -#: mod/install.php:379 -msgid "Generate encryption keys" -msgstr "Genera chiavi di criptazione" - -#: mod/install.php:386 -msgid "libCurl PHP module" -msgstr "modulo PHP libCurl" - -#: mod/install.php:387 -msgid "GD graphics PHP module" -msgstr "modulo PHP GD graphics" - -#: mod/install.php:388 -msgid "OpenSSL PHP module" -msgstr "modulo PHP OpenSSL" - -#: mod/install.php:389 -msgid "PDO or MySQLi PHP module" -msgstr "modulo PHP PDO o MySQLi" - -#: mod/install.php:390 -msgid "mb_string PHP module" -msgstr "modulo PHP mb_string" - -#: mod/install.php:391 -msgid "XML PHP module" -msgstr "Modulo PHP XML" - -#: mod/install.php:392 -msgid "iconv module" -msgstr "modulo iconv" - -#: mod/install.php:396 mod/install.php:398 -msgid "Apache mod_rewrite module" -msgstr "Modulo mod_rewrite di Apache" - -#: mod/install.php:396 -msgid "" -"Error: Apache webserver mod-rewrite module is required but not installed." -msgstr "Errore: E' il modulo mod-rewrite di Apache è richiesto, ma non risulta installato" - -#: mod/install.php:404 -msgid "Error: libCURL PHP module required but not installed." -msgstr "Errore: il modulo libCURL di PHP è richiesto, ma non risulta installato." - -#: mod/install.php:408 -msgid "" -"Error: GD graphics PHP module with JPEG support required but not installed." -msgstr "Errore: Il modulo GD graphics di PHP con supporto a JPEG è richiesto, ma non risulta installato." - -#: mod/install.php:412 -msgid "Error: openssl PHP module required but not installed." -msgstr "Errore: il modulo openssl di PHP è richiesto, ma non risulta installato." - -#: mod/install.php:416 -msgid "Error: PDO or MySQLi PHP module required but not installed." -msgstr "Errore: uno dei due moduli PHP PDO o MySQLi è richiesto ma non installato." - -#: mod/install.php:420 -msgid "Error: The MySQL driver for PDO is not installed." -msgstr "Errore: il driver MySQL per PDO non è installato." - -#: mod/install.php:424 -msgid "Error: mb_string PHP module required but not installed." -msgstr "Errore: il modulo PHP mb_string è richiesto, ma non risulta installato." - -#: mod/install.php:428 -msgid "Error: iconv PHP module required but not installed." -msgstr "Errore: il modulo PHP iconv è richiesto ma non installato." - -#: mod/install.php:438 -msgid "Error, XML PHP module required but not installed." -msgstr "Errore, il modulo PHP XML è richiesto ma non installato." - -#: mod/install.php:450 -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 "L'installazione web deve poter creare un file chiamato \".htconfig.php\" nella cartella principale del tuo web server ma non è in grado di farlo." - -#: mod/install.php:451 -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 "Ciò è dovuto spesso a impostazioni di permessi, dato che il web server può non essere in grado di scrivere il file nella tua cartella, anche se tu puoi." - -#: mod/install.php:452 -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 "Alla fine di questa procedura, di daremo un testo da salvare in un file chiamato .htconfig.php nella tua cartella principale di Friendica" - -#: mod/install.php:453 -msgid "" -"You can alternatively skip this procedure and perform a manual installation." -" Please see the file \"INSTALL.txt\" for instructions." -msgstr "Puoi in alternativa saltare questa procedura ed eseguire l'installazione manualmente. Vedi il file \"INSTALL.txt\" per le istruzioni." - -#: mod/install.php:456 -msgid ".htconfig.php is writable" -msgstr ".htconfig.php è scrivibile" - -#: mod/install.php:466 -msgid "" -"Friendica uses the Smarty3 template engine to render its web views. Smarty3 " -"compiles templates to PHP to speed up rendering." -msgstr "Friendica usa il motore di template Smarty3 per renderizzare le sue pagine web. Smarty3 compila i template in PHP per velocizzare il rendering." - -#: mod/install.php:467 -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 "Per salvare questi template compilati, il server werb ha bisogno dell'accesso in scrittura alla cartella view/smarty3/ nella cartella principale dei Friendica." - -#: mod/install.php:468 -msgid "" -"Please ensure that the user that your web server runs as (e.g. www-data) has" -" write access to this folder." -msgstr "Per favore, controlla che l'utente con cui il tuo server web gira (es www-data) ha accesso in scrittura a questa cartella." - -#: mod/install.php:469 -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 "Nota: come misura di sicurezza, dovresti dare accesso in scrittura solo alla cartella view/smarty3, non ai template (.tpl) che contiene." - -#: mod/install.php:472 -msgid "view/smarty3 is writable" -msgstr "view/smarty3 è scrivibile" - -#: mod/install.php:488 -msgid "" -"Url rewrite in .htaccess is not working. Check your server configuration." -msgstr "La riscrittura degli url in .htaccess non funziona. Controlla la configurazione del tuo server." - -#: mod/install.php:490 -msgid "Url rewrite is working" -msgstr "La riscrittura degli url funziona" - -#: mod/install.php:509 -msgid "ImageMagick PHP extension is not installed" -msgstr "L'estensione PHP ImageMagick non è installata" - -#: mod/install.php:511 -msgid "ImageMagick PHP extension is installed" -msgstr "L'estensione PHP ImageMagick è installata" - -#: mod/install.php:513 -msgid "ImageMagick supports GIF" -msgstr "ImageMagick supporta i GIF" - -#: mod/install.php:520 -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 "Il file di configurazione del database \".htconfig.php\" non può essere scritto. Usa il testo qui di seguito per creare un file di configurazione nella cartella principale del tuo sito." - -#: mod/install.php:545 -msgid "

What next

" -msgstr "

Cosa fare ora

" - -#: mod/install.php:546 -msgid "" -"IMPORTANT: You will need to [manually] setup a scheduled task for the " -"poller." -msgstr "IMPORTANTE: Devi impostare [manualmente] la pianificazione del poller." - -#: mod/item.php:116 -msgid "Unable to locate original post." -msgstr "Impossibile trovare il messaggio originale." - -#: mod/item.php:344 -msgid "Empty post discarded." -msgstr "Messaggio vuoto scartato." - -#: mod/item.php:904 -msgid "System error. Post not saved." -msgstr "Errore di sistema. Messaggio non salvato." - -#: mod/item.php:995 +#: mod/wall_attach.php:107 #, php-format -msgid "" -"This message was sent to you by %s, a member of the Friendica social " -"network." -msgstr "Questo messaggio ti è stato inviato da %s, un membro del social network Friendica." +msgid "File exceeds size limit of %s" +msgstr "Il file supera la dimensione massima di %s" -#: mod/item.php:997 -#, php-format -msgid "You may visit them online at %s" -msgstr "Puoi visitarli online su %s" +#: mod/wall_attach.php:131 mod/wall_attach.php:147 +msgid "File upload failed." +msgstr "Caricamento del file non riuscito." -#: mod/item.php:998 -msgid "" -"Please contact the sender by replying to this post if you do not wish to " -"receive these messages." -msgstr "Contatta il mittente rispondendo a questo post se non vuoi ricevere questi messaggi." +#: object/Item.php:106 +msgid "This entry was edited" +msgstr "Questa voce è stata modificata" -#: mod/item.php:1002 -#, php-format -msgid "%s posted an update." -msgstr "%s ha inviato un aggiornamento." +#: object/Item.php:151 +msgid "save to folder" +msgstr "salva nella cartella" -#: mod/notifications.php:35 -msgid "Invalid request identifier." -msgstr "L'identificativo della richiesta non è valido." +#: object/Item.php:221 +msgid "I will attend" +msgstr "Parteciperò" -#: mod/notifications.php:44 mod/notifications.php:180 -#: mod/notifications.php:227 -msgid "Discard" -msgstr "Scarta" +#: object/Item.php:221 +msgid "I will not attend" +msgstr "Non parteciperò" -#: mod/notifications.php:105 -msgid "Network Notifications" -msgstr "Notifiche dalla rete" +#: object/Item.php:221 +msgid "I might attend" +msgstr "Forse parteciperò" -#: mod/notifications.php:117 -msgid "Personal Notifications" -msgstr "Notifiche personali" +#: object/Item.php:247 +msgid "add star" +msgstr "aggiungi a speciali" -#: mod/notifications.php:123 -msgid "Home Notifications" -msgstr "Notifiche bacheca" +#: object/Item.php:248 +msgid "remove star" +msgstr "rimuovi da speciali" -#: mod/notifications.php:152 -msgid "Show Ignored Requests" -msgstr "Mostra richieste ignorate" +#: object/Item.php:249 +msgid "toggle star status" +msgstr "Inverti stato preferito" -#: mod/notifications.php:152 -msgid "Hide Ignored Requests" -msgstr "Nascondi richieste ignorate" +#: object/Item.php:252 +msgid "starred" +msgstr "preferito" -#: mod/notifications.php:164 mod/notifications.php:234 -msgid "Notification type: " -msgstr "Tipo di notifica: " +#: object/Item.php:257 +msgid "ignore thread" +msgstr "ignora la discussione" -#: mod/notifications.php:167 -#, php-format -msgid "suggested by %s" -msgstr "suggerito da %s" +#: object/Item.php:258 +msgid "unignore thread" +msgstr "non ignorare la discussione" -#: mod/notifications.php:173 mod/notifications.php:252 -msgid "Post a new friend activity" -msgstr "Invia una attività \"è ora amico con\"" +#: object/Item.php:259 +msgid "toggle ignore status" +msgstr "inverti stato \"Ignora\"" -#: mod/notifications.php:173 mod/notifications.php:252 -msgid "if applicable" -msgstr "se applicabile" +#: object/Item.php:269 +msgid "add tag" +msgstr "aggiungi tag" -#: mod/notifications.php:176 mod/notifications.php:261 mod/admin.php:1506 -msgid "Approve" -msgstr "Approva" +#: object/Item.php:280 +msgid "like" +msgstr "mi piace" -#: mod/notifications.php:195 -msgid "Claims to be known to you: " -msgstr "Dice di conoscerti: " +#: object/Item.php:281 +msgid "dislike" +msgstr "non mi piace" -#: mod/notifications.php:196 -msgid "yes" -msgstr "si" +#: object/Item.php:284 +msgid "Share this" +msgstr "Condividi questo" -#: mod/notifications.php:196 -msgid "no" -msgstr "no" +#: object/Item.php:284 +msgid "share" +msgstr "condividi" -#: mod/notifications.php:197 mod/notifications.php:202 -msgid "Shall your connection be bidirectional or not?" -msgstr "La connessione dovrà essere bidirezionale o no?" +#: object/Item.php:352 +msgid "to" +msgstr "a" -#: mod/notifications.php:198 mod/notifications.php:203 -#, php-format -msgid "" -"Accepting %s as a friend allows %s to subscribe to your posts, and you will " -"also receive updates from them in your news feed." -msgstr "Accettando %s come amico permette a %s di seguire i tuoi post, e a te di riceverne gli aggiornamenti." - -#: mod/notifications.php:199 -#, php-format -msgid "" -"Accepting %s as a subscriber allows them to subscribe to your posts, but you" -" will not receive updates from them in your news feed." -msgstr "Accentrando %s come abbonato gli permette di abbonarsi ai tuoi messaggi, ma tu non riceverai aggiornamenti da lui." - -#: mod/notifications.php:204 -#, php-format -msgid "" -"Accepting %s as a sharer allows them to subscribe to your posts, but you " -"will not receive updates from them in your news feed." -msgstr "Accentando %s come condivisore, gli permetti di abbonarsi ai tuoi messaggi, ma tu non riceverai nessun aggiornamento da loro." - -#: mod/notifications.php:215 -msgid "Friend" -msgstr "Amico" - -#: mod/notifications.php:216 -msgid "Sharer" -msgstr "Condivisore" - -#: mod/notifications.php:216 -msgid "Subscriber" -msgstr "Abbonato" - -#: mod/notifications.php:272 -msgid "No introductions." -msgstr "Nessuna presentazione." - -#: mod/notifications.php:313 -msgid "Show unread" -msgstr "Mostra non letti" - -#: mod/notifications.php:313 -msgid "Show all" -msgstr "Mostra tutti" - -#: mod/notifications.php:319 -#, php-format -msgid "No more %s notifications." -msgstr "Nessun'altra notifica %s." - -#: mod/ping.php:270 -msgid "{0} wants to be your friend" -msgstr "{0} vuole essere tuo amico" - -#: mod/ping.php:285 -msgid "{0} sent you a message" -msgstr "{0} ti ha inviato un messaggio" - -#: mod/ping.php:300 -msgid "{0} requested registration" -msgstr "{0} chiede la registrazione" - -#: mod/admin.php:96 -msgid "Theme settings updated." -msgstr "Impostazioni del tema aggiornate." - -#: mod/admin.php:165 mod/admin.php:1054 -msgid "Site" -msgstr "Sito" - -#: mod/admin.php:166 mod/admin.php:988 mod/admin.php:1498 mod/admin.php:1514 -msgid "Users" -msgstr "Utenti" - -#: mod/admin.php:168 mod/admin.php:1892 mod/admin.php:1942 -msgid "Themes" -msgstr "Temi" - -#: mod/admin.php:170 -msgid "DB updates" -msgstr "Aggiornamenti Database" - -#: mod/admin.php:171 mod/admin.php:512 -msgid "Inspect Queue" -msgstr "Ispeziona Coda di invio" - -#: mod/admin.php:172 mod/admin.php:288 -msgid "Server Blocklist" -msgstr "Server Blocklist" - -#: mod/admin.php:173 mod/admin.php:478 -msgid "Federation Statistics" -msgstr "Statistiche sulla Federazione" - -#: mod/admin.php:187 mod/admin.php:198 mod/admin.php:2016 -msgid "Logs" -msgstr "Log" - -#: mod/admin.php:188 mod/admin.php:2084 -msgid "View Logs" -msgstr "Vedi i log" - -#: mod/admin.php:189 -msgid "probe address" -msgstr "controlla indirizzo" - -#: mod/admin.php:190 -msgid "check webfinger" -msgstr "verifica webfinger" - -#: mod/admin.php:197 -msgid "Plugin Features" -msgstr "Impostazioni Plugins" - -#: mod/admin.php:199 -msgid "diagnostics" -msgstr "diagnostiche" - -#: mod/admin.php:200 -msgid "User registrations waiting for confirmation" -msgstr "Utenti registrati in attesa di conferma" - -#: mod/admin.php:279 -msgid "The blocked domain" -msgstr "Il dominio bloccato" - -#: mod/admin.php:280 mod/admin.php:293 -msgid "The reason why you blocked this domain." -msgstr "Le ragioni per cui blocchi questo dominio." - -#: mod/admin.php:281 -msgid "Delete domain" -msgstr "Elimina dominio" - -#: mod/admin.php:281 -msgid "Check to delete this entry from the blocklist" -msgstr "Seleziona per eliminare questa voce dalla blocklist" - -#: mod/admin.php:287 mod/admin.php:477 mod/admin.php:511 mod/admin.php:586 -#: mod/admin.php:1053 mod/admin.php:1497 mod/admin.php:1615 mod/admin.php:1678 -#: mod/admin.php:1891 mod/admin.php:1941 mod/admin.php:2015 mod/admin.php:2083 -msgid "Administration" -msgstr "Amministrazione" - -#: mod/admin.php:289 -msgid "" -"This page can be used to define a black list of servers from the federated " -"network that are not allowed to interact with your node. For all entered " -"domains you should also give a reason why you have blocked the remote " -"server." -msgstr "Questa pagina puo' essere usata per definire una black list di server dal network federato a cui nono è permesso interagire col tuo nodo. Per ogni dominio inserito, dovresti anche riportare una ragione per cui hai bloccato il server remoto." - -#: mod/admin.php:290 -msgid "" -"The list of blocked servers will be made publically available on the " -"/friendica page so that your users and people investigating communication " -"problems can find the reason easily." -msgstr "La lista di server bloccati sarà resa disponibile pubblicamente sulla pagina /friendica, così che i tuoi utenti e le persone che indagano su problemi di comunicazione possano trovarne la ragione facilmente." - -#: mod/admin.php:291 -msgid "Add new entry to block list" -msgstr "Aggiungi una nuova voce alla blocklist" - -#: mod/admin.php:292 -msgid "Server Domain" -msgstr "Dominio del Server" - -#: mod/admin.php:292 -msgid "" -"The domain of the new server to add to the block list. Do not include the " -"protocol." -msgstr "Il dominio del server da aggiungere alla blocklist. Non includere il protocollo." - -#: mod/admin.php:293 -msgid "Block reason" -msgstr "Ragione blocco" - -#: mod/admin.php:294 -msgid "Add Entry" -msgstr "Aggiungi Voce" - -#: mod/admin.php:295 -msgid "Save changes to the blocklist" -msgstr "Salva modifiche alla blocklist" - -#: mod/admin.php:296 -msgid "Current Entries in the Blocklist" -msgstr "Voci correnti nella blocklist" - -#: mod/admin.php:299 -msgid "Delete entry from blocklist" -msgstr "Elimina voce dalla blocklist" - -#: mod/admin.php:302 -msgid "Delete entry from blocklist?" -msgstr "Eliminare la voce dalla blocklist?" - -#: mod/admin.php:327 -msgid "Server added to blocklist." -msgstr "Server aggiunto alla blocklist." - -#: mod/admin.php:343 -msgid "Site blocklist updated." -msgstr "Blocklist del sito aggiornata." - -#: mod/admin.php:408 -msgid "unknown" -msgstr "sconosciuto" - -#: mod/admin.php:471 -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 "Questa pagina offre alcuni numeri riguardo la porzione del social network federato di cui il tuo nodo Friendica fa parte. Questi numeri non sono completi ma riflettono esclusivamente la porzione di rete di cui il tuo nodo e' a conoscenza." - -#: mod/admin.php:472 -msgid "" -"The Auto Discovered Contact Directory feature is not enabled, it " -"will improve the data displayed here." -msgstr "La funzione Elenco Contatti Scoperto Automaticamente non è abilitata, migliorerà i dati visualizzati qui." - -#: mod/admin.php:484 -#, php-format -msgid "Currently this node is aware of %d nodes from the following platforms:" -msgstr "Attualmente questo nodo conosce %d nodi dalle seguenti piattaforme:" - -#: mod/admin.php:514 -msgid "ID" -msgstr "ID" - -#: mod/admin.php:515 -msgid "Recipient Name" -msgstr "Nome Destinatario" - -#: mod/admin.php:516 -msgid "Recipient Profile" -msgstr "Profilo Destinatario" - -#: mod/admin.php:518 -msgid "Created" -msgstr "Creato" - -#: mod/admin.php:519 -msgid "Last Tried" -msgstr "Ultimo Tentativo" - -#: mod/admin.php:520 -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 "Questa pagina elenca il contenuto della coda di invio dei post. Questi sono post la cui consegna è fallita. Verranno inviati nuovamente più tardi ed eventualmente cancellati se la consegna continua a fallire." - -#: mod/admin.php:545 -#, php-format -msgid "" -"Your DB still runs with MyISAM tables. You should change the engine type to " -"InnoDB. As Friendica will use InnoDB only features in the future, you should" -" change this! See here for a guide that may be helpful " -"converting the table engines. You may also use the command php " -"include/dbstructure.php toinnodb of your Friendica installation for an " -"automatic conversion.
" -msgstr "Il tuo database contiene ancora tabelle MyISAM. Dovresti cambiare il motore a InnoDB. Siccome Friendica userà esclusivamente InnoDB nelle versioni a venire, dovresti cambiarle! Vedi qui per una guida che puo' essere d'aiuto nel convertire il motore delle tabelle. Puoi anche usare il comando php include/dbstructure.php toinnodb nella tua installazione Friendica per eseguire la conversione automaticamente.
" - -#: mod/admin.php:550 -msgid "" -"You are using a MySQL version which does not support all features that " -"Friendica uses. You should consider switching to MariaDB." -msgstr "Stai usando una versione di MySQL che non supporta tutte le funzionalità che Friendica usa. Dovresti considerare di utilizzare MariaDB." - -#: mod/admin.php:554 mod/admin.php:1447 -msgid "Normal Account" -msgstr "Account normale" - -#: mod/admin.php:555 mod/admin.php:1448 -msgid "Soapbox Account" -msgstr "Account per comunicati e annunci" - -#: mod/admin.php:556 mod/admin.php:1449 -msgid "Community/Celebrity Account" -msgstr "Account per celebrità o per comunità" - -#: mod/admin.php:557 mod/admin.php:1450 -msgid "Automatic Friend Account" -msgstr "Account per amicizia automatizzato" - -#: mod/admin.php:558 -msgid "Blog Account" -msgstr "Account Blog" - -#: mod/admin.php:559 -msgid "Private Forum" -msgstr "Forum Privato" - -#: mod/admin.php:581 -msgid "Message queues" -msgstr "Code messaggi" - -#: mod/admin.php:587 -msgid "Summary" -msgstr "Sommario" - -#: mod/admin.php:589 -msgid "Registered users" -msgstr "Utenti registrati" - -#: mod/admin.php:591 -msgid "Pending registrations" -msgstr "Registrazioni in attesa" - -#: mod/admin.php:592 -msgid "Version" -msgstr "Versione" - -#: mod/admin.php:597 -msgid "Active plugins" -msgstr "Plugin attivi" - -#: mod/admin.php:622 -msgid "Can not parse base url. Must have at least ://" -msgstr "Impossibile analizzare l'url base. Deve avere almeno [schema]://[dominio]" - -#: mod/admin.php:914 -msgid "Site settings updated." -msgstr "Impostazioni del sito aggiornate." - -#: mod/admin.php:971 -msgid "No community page" -msgstr "Nessuna pagina Comunità" - -#: mod/admin.php:972 -msgid "Public postings from users of this site" -msgstr "Messaggi pubblici dagli utenti di questo sito" - -#: mod/admin.php:973 -msgid "Global community page" -msgstr "Pagina Comunità globale" - -#: mod/admin.php:979 -msgid "At post arrival" -msgstr "All'arrivo di un messaggio" - -#: mod/admin.php:989 -msgid "Users, Global Contacts" -msgstr "Utenti, Contatti Globali" - -#: mod/admin.php:990 -msgid "Users, Global Contacts/fallback" -msgstr "Utenti, Contatti Globali/fallback" - -#: mod/admin.php:994 -msgid "One month" -msgstr "Un mese" - -#: mod/admin.php:995 -msgid "Three months" -msgstr "Tre mesi" - -#: mod/admin.php:996 -msgid "Half a year" -msgstr "Sei mesi" - -#: mod/admin.php:997 -msgid "One year" -msgstr "Un anno" - -#: mod/admin.php:1002 -msgid "Multi user instance" -msgstr "Istanza multi utente" - -#: mod/admin.php:1025 -msgid "Closed" -msgstr "Chiusa" - -#: mod/admin.php:1026 -msgid "Requires approval" -msgstr "Richiede l'approvazione" - -#: mod/admin.php:1027 -msgid "Open" -msgstr "Aperta" - -#: mod/admin.php:1031 -msgid "No SSL policy, links will track page SSL state" -msgstr "Nessuna gestione SSL, i link seguiranno lo stato SSL della pagina" - -#: mod/admin.php:1032 -msgid "Force all links to use SSL" -msgstr "Forza tutti i link ad usare SSL" - -#: mod/admin.php:1033 -msgid "Self-signed certificate, use SSL for local links only (discouraged)" -msgstr "Certificato auto-firmato, usa SSL solo per i link locali (sconsigliato)" - -#: mod/admin.php:1057 -msgid "File upload" -msgstr "Caricamento file" - -#: mod/admin.php:1058 -msgid "Policies" -msgstr "Politiche" - -#: mod/admin.php:1060 -msgid "Auto Discovered Contact Directory" -msgstr "Elenco Contatti Scoperto Automaticamente" - -#: mod/admin.php:1061 -msgid "Performance" -msgstr "Performance" - -#: mod/admin.php:1062 -msgid "Worker" -msgstr "Worker" - -#: mod/admin.php:1063 -msgid "" -"Relocate - WARNING: advanced function. Could make this server unreachable." -msgstr "Trasloca - ATTENZIONE: funzione avanzata! Può rendere questo server irraggiungibile." - -#: mod/admin.php:1066 -msgid "Site name" -msgstr "Nome del sito" - -#: mod/admin.php:1067 -msgid "Host name" -msgstr "Nome host" - -#: mod/admin.php:1068 -msgid "Sender Email" -msgstr "Mittente email" - -#: mod/admin.php:1068 -msgid "" -"The email address your server shall use to send notification emails from." -msgstr "L'indirizzo email che il tuo server dovrà usare per inviare notifiche via email." - -#: mod/admin.php:1069 -msgid "Banner/Logo" -msgstr "Banner/Logo" - -#: mod/admin.php:1070 -msgid "Shortcut icon" -msgstr "Icona shortcut" - -#: mod/admin.php:1070 -msgid "Link to an icon that will be used for browsers." -msgstr "Link verso un'icona che verrà usata dai browser." - -#: mod/admin.php:1071 -msgid "Touch icon" -msgstr "Icona touch" - -#: mod/admin.php:1071 -msgid "Link to an icon that will be used for tablets and mobiles." -msgstr "Link verso un'icona che verrà usata dai tablet e i telefonini." - -#: mod/admin.php:1072 -msgid "Additional Info" -msgstr "Informazioni aggiuntive" - -#: mod/admin.php:1072 -#, php-format -msgid "" -"For public servers: you can add additional information here that will be " -"listed at %s/siteinfo." -msgstr "Per server pubblici: puoi aggiungere informazioni extra che verrano mostrate su %s/siteinfo." - -#: mod/admin.php:1073 -msgid "System language" -msgstr "Lingua di sistema" - -#: mod/admin.php:1074 -msgid "System theme" -msgstr "Tema di sistema" - -#: mod/admin.php:1074 -msgid "" -"Default system theme - may be over-ridden by user profiles - change theme settings" -msgstr "Tema di sistema - può essere sovrascritto dalle impostazioni utente - cambia le impostazioni del tema" - -#: mod/admin.php:1075 -msgid "Mobile system theme" -msgstr "Tema mobile di sistema" - -#: mod/admin.php:1075 -msgid "Theme for mobile devices" -msgstr "Tema per dispositivi mobili" - -#: mod/admin.php:1076 -msgid "SSL link policy" -msgstr "Gestione link SSL" - -#: mod/admin.php:1076 -msgid "Determines whether generated links should be forced to use SSL" -msgstr "Determina se i link generati devono essere forzati a usare SSL" - -#: mod/admin.php:1077 -msgid "Force SSL" -msgstr "Forza SSL" - -#: mod/admin.php:1077 -msgid "" -"Force all Non-SSL requests to SSL - Attention: on some systems it could lead" -" to endless loops." -msgstr "Forza tutte le richieste non SSL su SSL - Attenzione: su alcuni sistemi può portare a loop senza fine" - -#: mod/admin.php:1078 -msgid "Hide help entry from navigation menu" -msgstr "Nascondi la voce 'Guida' dal menu di navigazione" - -#: mod/admin.php:1078 -msgid "" -"Hides the menu entry for the Help pages from the navigation menu. You can " -"still access it calling /help directly." -msgstr "Nasconde la voce per le pagine della guida dal menu di navigazione. E' comunque possibile accedervi richiamando /help direttamente." - -#: mod/admin.php:1079 -msgid "Single user instance" -msgstr "Istanza a singolo utente" - -#: mod/admin.php:1079 -msgid "Make this instance multi-user or single-user for the named user" -msgstr "Rendi questa istanza multi utente o a singolo utente per l'utente selezionato" - -#: mod/admin.php:1080 -msgid "Maximum image size" -msgstr "Massima dimensione immagini" - -#: mod/admin.php:1080 -msgid "" -"Maximum size in bytes of uploaded images. Default is 0, which means no " -"limits." -msgstr "Massima dimensione in byte delle immagini caricate. Il default è 0, cioè nessun limite." - -#: mod/admin.php:1081 -msgid "Maximum image length" -msgstr "Massima lunghezza immagine" - -#: mod/admin.php:1081 -msgid "" -"Maximum length in pixels of the longest side of uploaded images. Default is " -"-1, which means no limits." -msgstr "Massima lunghezza in pixel del lato più lungo delle immagini caricate. Predefinito a -1, ovvero nessun limite." - -#: mod/admin.php:1082 -msgid "JPEG image quality" -msgstr "Qualità immagini JPEG" - -#: mod/admin.php:1082 -msgid "" -"Uploaded JPEGS will be saved at this quality setting [0-100]. Default is " -"100, which is full quality." -msgstr "Le immagini JPEG caricate verranno salvate con questa qualità [0-100]. Predefinito è 100, ovvero qualità piena." - -#: mod/admin.php:1084 -msgid "Register policy" -msgstr "Politica di registrazione" - -#: mod/admin.php:1085 -msgid "Maximum Daily Registrations" -msgstr "Massime registrazioni giornaliere" - -#: mod/admin.php:1085 -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 "Se la registrazione è permessa, qui si definisce il massimo numero di nuovi utenti registrati da accettare giornalmente. Se la registrazione è chiusa, questa impostazione non ha effetto." - -#: mod/admin.php:1086 -msgid "Register text" -msgstr "Testo registrazione" - -#: mod/admin.php:1086 -msgid "Will be displayed prominently on the registration page." -msgstr "Sarà mostrato ben visibile nella pagina di registrazione." - -#: mod/admin.php:1087 -msgid "Accounts abandoned after x days" -msgstr "Account abbandonati dopo x giorni" - -#: mod/admin.php:1087 -msgid "" -"Will not waste system resources polling external sites for abandonded " -"accounts. Enter 0 for no time limit." -msgstr "Non spreca risorse di sistema controllando siti esterni per gli account abbandonati. Immettere 0 per nessun limite di tempo." - -#: mod/admin.php:1088 -msgid "Allowed friend domains" -msgstr "Domini amici consentiti" - -#: mod/admin.php:1088 -msgid "" -"Comma separated list of domains which are allowed to establish friendships " -"with this site. Wildcards are accepted. Empty to allow any domains" -msgstr "Elenco separato da virgola dei domini che possono stabilire amicizie con questo sito. Sono accettati caratteri jolly. Vuoto per accettare qualsiasi dominio." - -#: mod/admin.php:1089 -msgid "Allowed email domains" -msgstr "Domini email consentiti" - -#: mod/admin.php:1089 -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 "Elenco separato da virgola dei domini permessi come indirizzi email in fase di registrazione a questo sito. Sono accettati caratteri jolly. Lascalo vuoto per accettare qualsiasi dominio." - -#: mod/admin.php:1090 -msgid "Block public" -msgstr "Blocca pagine pubbliche" - -#: mod/admin.php:1090 -msgid "" -"Check to block public access to all otherwise public personal pages on this " -"site unless you are currently logged in." -msgstr "Seleziona per bloccare l'accesso pubblico a tutte le pagine personali di questo sito, a meno di essere loggato." - -#: mod/admin.php:1091 -msgid "Force publish" -msgstr "Forza pubblicazione" - -#: mod/admin.php:1091 -msgid "" -"Check to force all profiles on this site to be listed in the site directory." -msgstr "Seleziona per forzare tutti i profili di questo sito ad essere compresi nell'elenco di questo sito." - -#: mod/admin.php:1092 -msgid "Global directory URL" -msgstr "URL della directory globale" - -#: mod/admin.php:1092 -msgid "" -"URL to the global directory. If this is not set, the global directory is " -"completely unavailable to the application." -msgstr "URL dell'elenco globale. Se vuoto, l'elenco globale sarà completamente disabilitato." - -#: mod/admin.php:1093 -msgid "Allow threaded items" -msgstr "Permetti commenti nidificati" - -#: mod/admin.php:1093 -msgid "Allow infinite level threading for items on this site." -msgstr "Permette un infinito livello di nidificazione dei commenti su questo sito." - -#: mod/admin.php:1094 -msgid "Private posts by default for new users" -msgstr "Post privati di default per i nuovi utenti" - -#: mod/admin.php:1094 -msgid "" -"Set default post permissions for all new members to the default privacy " -"group rather than public." -msgstr "Imposta i permessi predefiniti dei post per tutti i nuovi utenti come privati per il gruppo predefinito, invece che pubblici." - -#: mod/admin.php:1095 -msgid "Don't include post content in email notifications" -msgstr "Non includere il contenuto dei post nelle notifiche via email" - -#: mod/admin.php:1095 -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 "Non include il contenuti del post/commento/messaggio privato/etc. nelle notifiche email che sono inviate da questo sito, per privacy" - -#: mod/admin.php:1096 -msgid "Disallow public access to addons listed in the apps menu." -msgstr "Disabilita l'accesso pubblico ai plugin raccolti nel menu apps." - -#: mod/admin.php:1096 -msgid "" -"Checking this box will restrict addons listed in the apps menu to members " -"only." -msgstr "Selezionando questo box si limiterà ai soli membri l'accesso ai componenti aggiuntivi nel menu applicazioni" - -#: mod/admin.php:1097 -msgid "Don't embed private images in posts" -msgstr "Non inglobare immagini private nei post" - -#: mod/admin.php:1097 -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 "Non sostituire le foto locali nei post con una copia incorporata dell'immagine. Questo significa che i contatti che riceveranno i post contenenti foto private dovranno autenticarsi e caricare ogni immagine, cosa che può richiedere un po' di tempo." - -#: mod/admin.php:1098 -msgid "Allow Users to set remote_self" -msgstr "Permetti agli utenti di impostare 'io remoto'" - -#: mod/admin.php:1098 -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 "Selezionando questo, a tutti gli utenti sarà permesso di impostare qualsiasi contatto come 'io remoto' nella pagina di modifica del contatto. Impostare questa opzione fa si che tutti i messaggi di quel contatto vengano ripetuti nello stream dell'utente." - -#: mod/admin.php:1099 -msgid "Block multiple registrations" -msgstr "Blocca registrazioni multiple" - -#: mod/admin.php:1099 -msgid "Disallow users to register additional accounts for use as pages." -msgstr "Non permette all'utente di registrare account extra da usare come pagine." - -#: mod/admin.php:1100 -msgid "OpenID support" -msgstr "Supporto OpenID" - -#: mod/admin.php:1100 -msgid "OpenID support for registration and logins." -msgstr "Supporta OpenID per la registrazione e il login" - -#: mod/admin.php:1101 -msgid "Fullname check" -msgstr "Controllo nome completo" - -#: mod/admin.php:1101 -msgid "" -"Force users to register with a space between firstname and lastname in Full " -"name, as an antispam measure" -msgstr "Forza gli utenti a registrarsi con uno spazio tra il nome e il cognome in \"Nome completo\", come misura anti spam" - -#: mod/admin.php:1102 -msgid "Community Page Style" -msgstr "Stile pagina Comunità" - -#: mod/admin.php:1102 -msgid "" -"Type of community page to show. 'Global community' shows every public " -"posting from an open distributed network that arrived on this server." -msgstr "Tipo di pagina Comunità da mostrare. 'Comunità Globale' mostra tutti i messaggi pubblici arrivati su questo server da network aperti distribuiti." - -#: mod/admin.php:1103 -msgid "Posts per user on community page" -msgstr "Messaggi per utente nella pagina Comunità" - -#: mod/admin.php:1103 -msgid "" -"The maximum number of posts per user on the community page. (Not valid for " -"'Global Community')" -msgstr "Il numero massimo di messaggi per utente mostrato nella pagina Comunità (non valido per 'Comunità globale')" - -#: mod/admin.php:1104 -msgid "Enable OStatus support" -msgstr "Abilita supporto OStatus" - -#: mod/admin.php:1104 -msgid "" -"Provide built-in OStatus (StatusNet, GNU Social etc.) compatibility. All " -"communications in OStatus are public, so privacy warnings will be " -"occasionally displayed." -msgstr "Fornisce la compatibilità integrata a OStatus (StatusNet, Gnu Social, etc.). Tutte le comunicazioni su OStatus sono pubbliche, quindi un avviso di privacy verrà mostrato occasionalmente." - -#: mod/admin.php:1105 -msgid "OStatus conversation completion interval" -msgstr "Intervallo completamento conversazioni OStatus" - -#: mod/admin.php:1105 -msgid "" -"How often shall the poller check for new entries in OStatus conversations? " -"This can be a very ressource task." -msgstr "quanto spesso il poller deve controllare se esistono nuovi commenti in una conversazione OStatus? Questo è un lavoro che può richiedere molte risorse." - -#: mod/admin.php:1106 -msgid "Only import OStatus threads from our contacts" -msgstr "Importa conversazioni OStatus solo dai nostri contatti." - -#: mod/admin.php:1106 -msgid "" -"Normally we import every content from our OStatus contacts. With this option" -" we only store threads that are started by a contact that is known on our " -"system." -msgstr "Normalmente importiamo tutto il contenuto dai contatti OStatus. Con questa opzione salviamo solo le conversazioni iniziate da un contatto è conosciuto a questo nodo." - -#: mod/admin.php:1107 -msgid "OStatus support can only be enabled if threading is enabled." -msgstr "Il supporto OStatus può essere abilitato solo se è abilitato il threading." - -#: mod/admin.php:1109 -msgid "" -"Diaspora support can't be enabled because Friendica was installed into a sub" -" directory." -msgstr "Il supporto a Diaspora non può essere abilitato perché Friendica è stato installato in una sotto directory." - -#: mod/admin.php:1110 -msgid "Enable Diaspora support" -msgstr "Abilita il supporto a Diaspora" - -#: mod/admin.php:1110 -msgid "Provide built-in Diaspora network compatibility." -msgstr "Fornisce compatibilità con il network Diaspora." - -#: mod/admin.php:1111 -msgid "Only allow Friendica contacts" -msgstr "Permetti solo contatti Friendica" - -#: mod/admin.php:1111 -msgid "" -"All contacts must use Friendica protocols. All other built-in communication " -"protocols disabled." -msgstr "Tutti i contatti devono usare il protocollo di Friendica. Tutti gli altri protocolli sono disabilitati." - -#: mod/admin.php:1112 -msgid "Verify SSL" -msgstr "Verifica SSL" - -#: mod/admin.php:1112 -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 "Se vuoi, puoi abilitare il controllo rigoroso dei certificati.Questo significa che non potrai collegarti (del tutto) con siti con certificati SSL auto-firmati." - -#: mod/admin.php:1113 -msgid "Proxy user" -msgstr "Utente Proxy" - -#: mod/admin.php:1114 -msgid "Proxy URL" -msgstr "URL Proxy" - -#: mod/admin.php:1115 -msgid "Network timeout" -msgstr "Timeout rete" - -#: mod/admin.php:1115 -msgid "Value is in seconds. Set to 0 for unlimited (not recommended)." -msgstr "Valore in secondi. Imposta a 0 per illimitato (non raccomandato)." - -#: mod/admin.php:1116 -msgid "Maximum Load Average" -msgstr "Massimo carico medio" - -#: mod/admin.php:1116 -msgid "" -"Maximum system load before delivery and poll processes are deferred - " -"default 50." -msgstr "Massimo carico di sistema prima che i processi di invio e di poll siano ritardati. Predefinito a 50." - -#: mod/admin.php:1117 -msgid "Maximum Load Average (Frontend)" -msgstr "Media Massimo Carico (Frontend)" - -#: mod/admin.php:1117 -msgid "Maximum system load before the frontend quits service - default 50." -msgstr "Massimo carico di sistema prima che il frontend fermi il servizio - default 50." - -#: mod/admin.php:1118 -msgid "Minimal Memory" -msgstr "Memoria Minima" - -#: mod/admin.php:1118 -msgid "" -"Minimal free memory in MB for the poller. Needs access to /proc/meminfo - " -"default 0 (deactivated)." -msgstr "Minima memoria libera in MB per il poller. Necessita di avere accesso a /proc/meminfo - default 0 (disabilitato)." - -#: mod/admin.php:1119 -msgid "Maximum table size for optimization" -msgstr "Dimensione massima della tabella per l'ottimizzazione" - -#: mod/admin.php:1119 -msgid "" -"Maximum table size (in MB) for the automatic optimization - default 100 MB. " -"Enter -1 to disable it." -msgstr "La dimensione massima (in MB) per l'ottimizzazione automatica - default 100 MB. Inserisci -1 per disabilitarlo." - -#: mod/admin.php:1120 -msgid "Minimum level of fragmentation" -msgstr "Livello minimo di frammentazione" - -#: mod/admin.php:1120 -msgid "" -"Minimum fragmenation level to start the automatic optimization - default " -"value is 30%." -msgstr "Livello minimo di frammentazione per iniziare la procedura di ottimizzazione automatica - il valore di default è 30%." - -#: mod/admin.php:1122 -msgid "Periodical check of global contacts" -msgstr "Check periodico dei contatti globali" - -#: mod/admin.php:1122 -msgid "" -"If enabled, the global contacts are checked periodically for missing or " -"outdated data and the vitality of the contacts and servers." -msgstr "Se abilitato, i contatti globali sono controllati periodicamente per verificare dati mancanti o sorpassati e la vitalità dei contatti e dei server." - -#: mod/admin.php:1123 -msgid "Days between requery" -msgstr "Giorni tra le richieste" - -#: mod/admin.php:1123 -msgid "Number of days after which a server is requeried for his contacts." -msgstr "Numero di giorni dopo i quali al server vengono richiesti i suoi contatti." - -#: mod/admin.php:1124 -msgid "Discover contacts from other servers" -msgstr "Trova contatti dagli altri server" - -#: mod/admin.php:1124 -msgid "" -"Periodically query other servers for contacts. You can choose between " -"'users': the users on the remote system, 'Global Contacts': active contacts " -"that are known on the system. The fallback is meant for Redmatrix servers " -"and older friendica servers, where global contacts weren't available. The " -"fallback increases the server load, so the recommened setting is 'Users, " -"Global Contacts'." -msgstr "Richiede periodicamente contatti agli altri server. Puoi scegliere tra 'utenti', gli utenti sul sistema remoto, o 'contatti globali', i contatti attivi che sono conosciuti dal sistema. Il fallback è pensato per i server Redmatrix e i vecchi server Friendica, dove i contatti globali non sono disponibili. Il fallback incrementa il carico di sistema, per cui l'impostazione consigliata è \"Utenti, Contatti Globali\"." - -#: mod/admin.php:1125 -msgid "Timeframe for fetching global contacts" -msgstr "Termine per il recupero contatti globali" - -#: mod/admin.php:1125 -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 "Quando si attiva la scoperta, questo valore definisce il periodo di tempo per l'attività dei contatti globali che vengono prelevati da altri server." - -#: mod/admin.php:1126 -msgid "Search the local directory" -msgstr "Cerca la directory locale" - -#: mod/admin.php:1126 -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 "Cerca nella directory locale invece che nella directory globale. Durante la ricerca a livello locale, ogni ricerca verrà eseguita sulla directory globale in background. Ciò migliora i risultati della ricerca quando la ricerca viene ripetuta." - -#: mod/admin.php:1128 -msgid "Publish server information" -msgstr "Pubblica informazioni server" - -#: mod/admin.php:1128 -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 " -"profiles, number of posts and the activated protocols and connectors. See the-federation.info for details." -msgstr "Se abilitata, saranno pubblicati i dati generali del server e i dati di utilizzo. I dati contengono il nome e la versione del server, il numero di utenti con profili pubblici, numero dei posti e dei protocolli e connettori attivati. Per informazioni, vedere the-federation.info ." - -#: mod/admin.php:1130 -msgid "Suppress Tags" -msgstr "Sopprimi Tags" - -#: mod/admin.php:1130 -msgid "Suppress showing a list of hashtags at the end of the posting." -msgstr "Non mostra la lista di hashtag in coda al messaggio" - -#: mod/admin.php:1131 -msgid "Path to item cache" -msgstr "Percorso cache elementi" - -#: mod/admin.php:1131 -msgid "The item caches buffers generated bbcode and external images." -msgstr "La cache degli elementi memorizza il bbcode generato e le immagini esterne." - -#: mod/admin.php:1132 -msgid "Cache duration in seconds" -msgstr "Durata della cache in secondi" - -#: mod/admin.php:1132 -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 "Quanto a lungo devono essere mantenuti i file di cache? Il valore predefinito è 86400 secondi (un giorno). Per disabilitare la cache, imposta il valore a -1." - -#: mod/admin.php:1133 -msgid "Maximum numbers of comments per post" -msgstr "Numero massimo di commenti per post" - -#: mod/admin.php:1133 -msgid "How much comments should be shown for each post? Default value is 100." -msgstr "Quanti commenti devono essere mostrati per ogni post? Default : 100." - -#: mod/admin.php:1134 -msgid "Temp path" -msgstr "Percorso file temporanei" - -#: mod/admin.php:1134 -msgid "" -"If you have a restricted system where the webserver can't access the system " -"temp path, enter another path here." -msgstr "Se si dispone di un sistema ristretto in cui il server web non può accedere al percorso temporaneo di sistema, inserire un altro percorso qui." - -#: mod/admin.php:1135 -msgid "Base path to installation" -msgstr "Percorso base all'installazione" - -#: mod/admin.php:1135 -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 "Se il sistema non è in grado di rilevare il percorso corretto per l'installazione, immettere il percorso corretto qui. Questa impostazione deve essere inserita solo se si utilizza un sistema limitato e/o collegamenti simbolici al tuo webroot." - -#: mod/admin.php:1136 -msgid "Disable picture proxy" -msgstr "Disabilita il proxy immagini" - -#: mod/admin.php:1136 -msgid "" -"The picture proxy increases performance and privacy. It shouldn't be used on" -" systems with very low bandwith." -msgstr "Il proxy immagini aumenta le performance e la privacy. Non dovrebbe essere usato su server con poca banda disponibile." - -#: mod/admin.php:1137 -msgid "Only search in tags" -msgstr "Cerca solo nei tag" - -#: mod/admin.php:1137 -msgid "On large systems the text search can slow down the system extremely." -msgstr "Su server con molti dati, la ricerca nel testo può estremamente rallentare il sistema." - -#: mod/admin.php:1139 -msgid "New base url" -msgstr "Nuovo url base" - -#: mod/admin.php:1139 -msgid "" -"Change base url for this server. Sends relocate message to all DFRN contacts" -" of all users." -msgstr "Cambia l'url base di questo server. Invia il messaggio di trasloco a tutti i contatti DFRN di tutti gli utenti." - -#: mod/admin.php:1141 -msgid "RINO Encryption" -msgstr "Crittografia RINO" - -#: mod/admin.php:1141 -msgid "Encryption layer between nodes." -msgstr "Crittografia delle comunicazioni tra nodi." - -#: mod/admin.php:1143 -msgid "Maximum number of parallel workers" -msgstr "Massimo numero di lavori in parallelo" - -#: mod/admin.php:1143 -msgid "" -"On shared hosters set this to 2. On larger systems, values of 10 are great. " -"Default value is 4." -msgstr "Su host condivisi imposta a 2. Su sistemi più grandi, valori fino a 10 vanno bene. Il valore di default è 4." - -#: mod/admin.php:1144 -msgid "Don't use 'proc_open' with the worker" -msgstr "Non usare 'proc_open' con il worker" - -#: mod/admin.php:1144 -msgid "" -"Enable this if your system doesn't allow the use of 'proc_open'. This can " -"happen on shared hosters. If this is enabled you should increase the " -"frequency of poller calls in your crontab." -msgstr "Abilita se il tuo sistema non consente l'utilizzo di 'proc_open'. Può succedere con gli hosting condivisi. Se abiliti questa opzione, dovresti aumentare la frequenza delle chiamate al poller nel tuo crontab." - -#: mod/admin.php:1145 -msgid "Enable fastlane" -msgstr "Abilita fastlane" - -#: mod/admin.php:1145 -msgid "" -"When enabed, the fastlane mechanism starts an additional worker if processes" -" with higher priority are blocked by processes of lower priority." -msgstr "Quando abilitato, il meccanismo di fastlane avvia processi aggiuntivi se processi con priorità più alta sono bloccati da processi con priorità più bassa." - -#: mod/admin.php:1146 -msgid "Enable frontend worker" -msgstr "Abilita worker da frontend" - -#: mod/admin.php:1146 -msgid "" -"When enabled the Worker process is triggered when backend access is " -"performed (e.g. messages being delivered). On smaller sites you might want " -"to call yourdomain.tld/worker on a regular basis via an external cron job. " -"You should only enable this option if you cannot utilize cron/scheduled jobs" -" on your server. The worker background process needs to be activated for " -"this." -msgstr "Quando abilitato, il processo è avviato quando viene eseguito un accesso al backend (per esempio, quando un messaggio viene consegnato). Su siti più piccoli potresti voler chiamare yourdomain.tld/worker regolarmente attraverso un cron esterno. Dovresti abilitare questa opzione solo se non puoi utilizzare cron sul tuo server. L'elaborazione in background con worker deve essere abilitata perchè questa opzione sia effettiva." - -#: mod/admin.php:1176 -msgid "Update has been marked successful" -msgstr "L'aggiornamento è stato segnato come di successo" - -#: mod/admin.php:1184 -#, php-format -msgid "Database structure update %s was successfully applied." -msgstr "Aggiornamento struttura database %s applicata con successo." - -#: mod/admin.php:1187 -#, php-format -msgid "Executing of database structure update %s failed with error: %s" -msgstr "Aggiornamento struttura database %s fallita con errore: %s" - -#: mod/admin.php:1201 -#, php-format -msgid "Executing %s failed with error: %s" -msgstr "Esecuzione di %s fallita con errore: %s" - -#: mod/admin.php:1204 -#, php-format -msgid "Update %s was successfully applied." -msgstr "L'aggiornamento %s è stato applicato con successo" - -#: mod/admin.php:1207 -#, php-format -msgid "Update %s did not return a status. Unknown if it succeeded." -msgstr "L'aggiornamento %s non ha riportato uno stato. Non so se è andato a buon fine." - -#: mod/admin.php:1210 -#, php-format -msgid "There was no additional update function %s that needed to be called." -msgstr "Non ci sono altre funzioni di aggiornamento %s da richiamare." - -#: mod/admin.php:1230 -msgid "No failed updates." -msgstr "Nessun aggiornamento fallito." - -#: mod/admin.php:1231 -msgid "Check database structure" -msgstr "Controlla struttura database" - -#: mod/admin.php:1236 -msgid "Failed Updates" -msgstr "Aggiornamenti falliti" - -#: mod/admin.php:1237 -msgid "" -"This does not include updates prior to 1139, which did not return a status." -msgstr "Questo non include gli aggiornamenti prima del 1139, che non ritornano lo stato." - -#: mod/admin.php:1238 -msgid "Mark success (if update was manually applied)" -msgstr "Segna completato (se l'update è stato applicato manualmente)" - -#: mod/admin.php:1239 -msgid "Attempt to execute this update step automatically" -msgstr "Cerco di eseguire questo aggiornamento in automatico" - -#: mod/admin.php:1273 -#, php-format -msgid "" -"\n" -"\t\t\tDear %1$s,\n" -"\t\t\t\tthe administrator of %2$s has set up an account for you." -msgstr "\nGentile %1$s,\n l'amministratore di %2$s ha impostato un account per te." - -#: mod/admin.php:1276 -#, php-format -msgid "" -"\n" -"\t\t\tThe login details are as follows:\n" -"\n" -"\t\t\tSite Location:\t%1$s\n" -"\t\t\tLogin Name:\t\t%2$s\n" -"\t\t\tPassword:\t\t%3$s\n" -"\n" -"\t\t\tYou may change your password from your account \"Settings\" page after logging\n" -"\t\t\tin.\n" -"\n" -"\t\t\tPlease take a few moments to review the other account settings on that page.\n" -"\n" -"\t\t\tYou may also wish to add some basic information to your default profile\n" -"\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n" -"\n" -"\t\t\tWe recommend setting your full name, adding a profile photo,\n" -"\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n" -"\t\t\tperhaps what country you live in; if you do not wish to be more specific\n" -"\t\t\tthan that.\n" -"\n" -"\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n" -"\t\t\tIf you are new and do not know anybody here, they may help\n" -"\t\t\tyou to make some new and interesting friends.\n" -"\n" -"\t\t\tThank you and welcome to %4$s." -msgstr "\nI dettagli del tuo utente sono:\n Indirizzo del sito: %1$s\n Nome utente: %2$s\n Password: %3$s\n\nPuoi cambiare la tua password dalla pagina delle impostazioni del tuo account dopo esserti autenticato.\n\nPer favore, prenditi qualche momento per esaminare tutte le impostazioni presenti.\n\nPotresti voler aggiungere qualche informazione di base al tuo profilo predefinito (nella pagina \"Profili\"), così che le altre persone possano trovarti più facilmente.\n\nTi raccomandiamo di inserire il tuo nome completo, aggiungere una foto, aggiungere qualche parola chiave del profilo (molto utili per trovare nuovi contatti), e magari in quale nazione vivi, se non vuoi essere più specifico di così.\n\nNoi rispettiamo appieno la tua privacy, e nessuna di queste informazioni è necessaria o obbligatoria.\nSe sei nuovo e non conosci nessuno qui, possono aiutarti a trovare qualche nuovo e interessante contatto.\n\nGrazie e benvenuto su %4$s" - -#: mod/admin.php:1320 -#, php-format -msgid "%s user blocked/unblocked" -msgid_plural "%s users blocked/unblocked" -msgstr[0] "%s utente bloccato/sbloccato" -msgstr[1] "%s utenti bloccati/sbloccati" - -#: mod/admin.php:1327 -#, php-format -msgid "%s user deleted" -msgid_plural "%s users deleted" -msgstr[0] "%s utente cancellato" -msgstr[1] "%s utenti cancellati" - -#: mod/admin.php:1374 -#, php-format -msgid "User '%s' deleted" -msgstr "Utente '%s' cancellato" - -#: mod/admin.php:1382 -#, php-format -msgid "User '%s' unblocked" -msgstr "Utente '%s' sbloccato" - -#: mod/admin.php:1382 -#, php-format -msgid "User '%s' blocked" -msgstr "Utente '%s' bloccato" - -#: mod/admin.php:1490 mod/admin.php:1516 -msgid "Register date" -msgstr "Data registrazione" - -#: mod/admin.php:1490 mod/admin.php:1516 -msgid "Last login" -msgstr "Ultimo accesso" - -#: mod/admin.php:1490 mod/admin.php:1516 -msgid "Last item" -msgstr "Ultimo elemento" - -#: mod/admin.php:1499 -msgid "Add User" -msgstr "Aggiungi utente" - -#: mod/admin.php:1500 -msgid "select all" -msgstr "seleziona tutti" - -#: mod/admin.php:1501 -msgid "User registrations waiting for confirm" -msgstr "Richieste di registrazione in attesa di conferma" - -#: mod/admin.php:1502 -msgid "User waiting for permanent deletion" -msgstr "Utente in attesa di cancellazione definitiva" - -#: mod/admin.php:1503 -msgid "Request date" -msgstr "Data richiesta" - -#: mod/admin.php:1504 -msgid "No registrations." -msgstr "Nessuna registrazione." - -#: mod/admin.php:1505 -msgid "Note from the user" -msgstr "Nota dall'utente" - -#: mod/admin.php:1507 -msgid "Deny" -msgstr "Nega" - -#: mod/admin.php:1511 -msgid "Site admin" -msgstr "Amministrazione sito" - -#: mod/admin.php:1512 -msgid "Account expired" -msgstr "Account scaduto" - -#: mod/admin.php:1515 -msgid "New User" -msgstr "Nuovo Utente" - -#: mod/admin.php:1516 -msgid "Deleted since" -msgstr "Rimosso da" - -#: mod/admin.php:1521 -msgid "" -"Selected users will be deleted!\\n\\nEverything these users had posted on " -"this site will be permanently deleted!\\n\\nAre you sure?" -msgstr "Gli utenti selezionati saranno cancellati!\\n\\nTutto quello che gli utenti hanno inviato su questo sito sarà permanentemente canellato!\\n\\nSei sicuro?" - -#: mod/admin.php:1522 -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 "L'utente {0} sarà cancellato!\\n\\nTutto quello che ha inviato su questo sito sarà permanentemente cancellato!\\n\\nSei sicuro?" - -#: mod/admin.php:1532 -msgid "Name of the new user." -msgstr "Nome del nuovo utente." - -#: mod/admin.php:1533 -msgid "Nickname" -msgstr "Nome utente" - -#: mod/admin.php:1533 -msgid "Nickname of the new user." -msgstr "Nome utente del nuovo utente." - -#: mod/admin.php:1534 -msgid "Email address of the new user." -msgstr "Indirizzo Email del nuovo utente." - -#: mod/admin.php:1577 -#, php-format -msgid "Plugin %s disabled." -msgstr "Plugin %s disabilitato." - -#: mod/admin.php:1581 -#, php-format -msgid "Plugin %s enabled." -msgstr "Plugin %s abilitato." - -#: mod/admin.php:1592 mod/admin.php:1844 -msgid "Disable" -msgstr "Disabilita" - -#: mod/admin.php:1594 mod/admin.php:1846 -msgid "Enable" -msgstr "Abilita" - -#: mod/admin.php:1617 mod/admin.php:1893 -msgid "Toggle" -msgstr "Inverti" - -#: mod/admin.php:1625 mod/admin.php:1902 -msgid "Author: " -msgstr "Autore: " - -#: mod/admin.php:1626 mod/admin.php:1903 -msgid "Maintainer: " -msgstr "Manutentore: " - -#: mod/admin.php:1681 -msgid "Reload active plugins" -msgstr "Ricarica i plugin attivi" - -#: mod/admin.php:1686 -#, 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 "Non sono disponibili componenti aggiuntivi sul tuo nodo. Puoi trovare il repository ufficiale dei plugin su %1$s e potresti trovare altri plugin interessanti nell'open plugin repository su %2$s" - -#: mod/admin.php:1805 -msgid "No themes found." -msgstr "Nessun tema trovato." - -#: mod/admin.php:1884 -msgid "Screenshot" -msgstr "Anteprima" - -#: mod/admin.php:1944 -msgid "Reload active themes" -msgstr "Ricarica i temi attivi" - -#: mod/admin.php:1949 -#, php-format -msgid "No themes found on the system. They should be paced in %1$s" -msgstr "Non sono stati trovati temi sul tuo sistema. Dovrebbero essere in %1$s" - -#: mod/admin.php:1950 -msgid "[Experimental]" -msgstr "[Sperimentale]" - -#: mod/admin.php:1951 -msgid "[Unsupported]" -msgstr "[Non supportato]" - -#: mod/admin.php:1975 -msgid "Log settings updated." -msgstr "Impostazioni Log aggiornate." - -#: mod/admin.php:2007 -msgid "PHP log currently enabled." -msgstr "Log PHP abilitato." - -#: mod/admin.php:2009 -msgid "PHP log currently disabled." -msgstr "Log PHP disabilitato" - -#: mod/admin.php:2018 -msgid "Clear" -msgstr "Pulisci" - -#: mod/admin.php:2023 -msgid "Enable Debugging" -msgstr "Abilita Debugging" - -#: mod/admin.php:2024 -msgid "Log file" -msgstr "File di Log" - -#: mod/admin.php:2024 -msgid "" -"Must be writable by web server. Relative to your Friendica top-level " -"directory." -msgstr "Il server web deve avere i permessi di scrittura. Relativo alla tua directory Friendica." - -#: mod/admin.php:2025 -msgid "Log level" -msgstr "Livello di Log" - -#: mod/admin.php:2028 -msgid "PHP logging" -msgstr "Log PHP" - -#: mod/admin.php:2029 -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 "Per abilitare il log degli errori e degli avvisi di PHP puoi aggiungere le seguenti righe al file .htconfig.php nella tua installazione. La posizione del file impostato in 'error_log' è relativa alla directory principale della tua installazione Friendica e il server web deve avere i permessi di scrittura sul file. Il valore '1' per 'log_errors' e 'display_errors' abilita le opzioni, imposta '0' per disabilitarle." - -#: mod/admin.php:2160 -#, php-format -msgid "Lock feature %s" -msgstr "Blocca funzionalità %s" - -#: mod/admin.php:2168 -msgid "Manage Additional Features" -msgstr "Gestisci Funzionalità Aggiuntive" - -#: object/Item.php:359 +#: object/Item.php:353 msgid "via" msgstr "via" -#: view/theme/duepuntozero/config.php:44 +#: object/Item.php:354 +msgid "Wall-to-Wall" +msgstr "Da bacheca a bacheca" + +#: object/Item.php:355 +msgid "via Wall-To-Wall:" +msgstr "da bacheca a bacheca" + +#: object/Item.php:414 +#, php-format +msgid "%d comment" +msgid_plural "%d comments" +msgstr[0] "%d commento" +msgstr[1] "%d commenti" + +#: object/Item.php:703 +msgid "Bold" +msgstr "Grassetto" + +#: object/Item.php:704 +msgid "Italic" +msgstr "Corsivo" + +#: object/Item.php:705 +msgid "Underline" +msgstr "Sottolineato" + +#: object/Item.php:706 +msgid "Quote" +msgstr "Citazione" + +#: object/Item.php:707 +msgid "Code" +msgstr "Codice" + +#: object/Item.php:708 +msgid "Image" +msgstr "Immagine" + +#: object/Item.php:709 +msgid "Link" +msgstr "Link" + +#: object/Item.php:710 +msgid "Video" +msgstr "Video" + +#: view/theme/duepuntozero/config.php:48 msgid "greenzero" msgstr "greenzero" -#: view/theme/duepuntozero/config.php:45 +#: view/theme/duepuntozero/config.php:49 msgid "purplezero" msgstr "purplezero" -#: view/theme/duepuntozero/config.php:46 +#: view/theme/duepuntozero/config.php:50 msgid "easterbunny" msgstr "easterbunny" -#: view/theme/duepuntozero/config.php:47 +#: view/theme/duepuntozero/config.php:51 msgid "darkzero" msgstr "darkzero" -#: view/theme/duepuntozero/config.php:48 +#: view/theme/duepuntozero/config.php:52 msgid "comix" msgstr "comix" -#: view/theme/duepuntozero/config.php:49 +#: view/theme/duepuntozero/config.php:53 msgid "slackr" msgstr "slackr" -#: view/theme/duepuntozero/config.php:64 +#: view/theme/duepuntozero/config.php:68 msgid "Variations" msgstr "Varianti" -#: view/theme/frio/config.php:47 -msgid "Default" -msgstr "Default" - -#: view/theme/frio/config.php:59 -msgid "Note: " -msgstr "Nota:" - -#: view/theme/frio/config.php:59 -msgid "Check image permissions if all users are allowed to visit the image" -msgstr "Controlla i permessi dell'immagine se tutti gli utenti sono autorizzati a vederla" - -#: view/theme/frio/config.php:67 -msgid "Select scheme" -msgstr "Seleziona schema" - -#: view/theme/frio/config.php:68 -msgid "Navigation bar background color" -msgstr "Colore di sfondo barra di navigazione" - -#: view/theme/frio/config.php:69 -msgid "Navigation bar icon color " -msgstr "Colore icona barra di navigazione" - -#: view/theme/frio/config.php:70 -msgid "Link color" -msgstr "Colore link" - -#: view/theme/frio/config.php:71 -msgid "Set the background color" -msgstr "Imposta il colore di sfondo" - -#: view/theme/frio/config.php:72 -msgid "Content background transparency" -msgstr "Trasparenza sfondo contenuto" - -#: view/theme/frio/config.php:73 -msgid "Set the background image" -msgstr "Imposta l'immagine di sfondo" - #: view/theme/frio/php/Image.php:23 msgid "Repeat the image" msgstr "Ripeti l'immagine" @@ -8822,127 +8928,167 @@ msgstr "Scala best fit" msgid "Resize to best fit and retain aspect ratio." msgstr "Scala l'immagine alla miglior dimensione per riempire mantenendo le proporzioni." -#: view/theme/frio/theme.php:226 +#: view/theme/frio/config.php:92 +msgid "Default" +msgstr "Default" + +#: view/theme/frio/config.php:104 +msgid "Note" +msgstr "" + +#: view/theme/frio/config.php:104 +msgid "Check image permissions if all users are allowed to visit the image" +msgstr "Controlla i permessi dell'immagine se tutti gli utenti sono autorizzati a vederla" + +#: view/theme/frio/config.php:111 +msgid "Select scheme" +msgstr "Seleziona schema" + +#: view/theme/frio/config.php:112 +msgid "Navigation bar background color" +msgstr "Colore di sfondo barra di navigazione" + +#: view/theme/frio/config.php:113 +msgid "Navigation bar icon color " +msgstr "Colore icona barra di navigazione" + +#: view/theme/frio/config.php:114 +msgid "Link color" +msgstr "Colore link" + +#: view/theme/frio/config.php:115 +msgid "Set the background color" +msgstr "Imposta il colore di sfondo" + +#: view/theme/frio/config.php:116 +msgid "Content background transparency" +msgstr "Trasparenza sfondo contenuto" + +#: view/theme/frio/config.php:117 +msgid "Set the background image" +msgstr "Imposta l'immagine di sfondo" + +#: view/theme/frio/theme.php:231 msgid "Guest" msgstr "Ospite" -#: view/theme/frio/theme.php:232 +#: view/theme/frio/theme.php:237 msgid "Visitor" msgstr "Visitatore" -#: view/theme/quattro/config.php:70 +#: view/theme/quattro/config.php:74 msgid "Alignment" msgstr "Allineamento" -#: view/theme/quattro/config.php:70 +#: view/theme/quattro/config.php:74 msgid "Left" msgstr "Sinistra" -#: view/theme/quattro/config.php:70 +#: view/theme/quattro/config.php:74 msgid "Center" msgstr "Centrato" -#: view/theme/quattro/config.php:71 +#: view/theme/quattro/config.php:75 msgid "Color scheme" msgstr "Schema colori" -#: view/theme/quattro/config.php:72 +#: view/theme/quattro/config.php:76 msgid "Posts font size" msgstr "Dimensione caratteri post" -#: view/theme/quattro/config.php:73 +#: view/theme/quattro/config.php:77 msgid "Textareas font size" msgstr "Dimensione caratteri nelle aree di testo" -#: view/theme/vier/config.php:69 -msgid "Comma separated list of helper forums" -msgstr "Lista separata da virgola di forum di aiuto" - -#: view/theme/vier/config.php:115 -msgid "Set style" -msgstr "Imposta stile" - -#: view/theme/vier/config.php:116 -msgid "Community Pages" -msgstr "Pagine Comunitarie" - -#: view/theme/vier/config.php:117 view/theme/vier/theme.php:149 +#: view/theme/vier/theme.php:144 view/theme/vier/config.php:119 msgid "Community Profiles" msgstr "Profili Comunità" -#: view/theme/vier/config.php:118 -msgid "Help or @NewHere ?" -msgstr "Serve aiuto? Sei nuovo?" - -#: view/theme/vier/config.php:119 view/theme/vier/theme.php:390 -msgid "Connect Services" -msgstr "Servizi connessi" - -#: view/theme/vier/config.php:120 view/theme/vier/theme.php:197 -msgid "Find Friends" -msgstr "Trova Amici" - -#: view/theme/vier/config.php:121 view/theme/vier/theme.php:179 +#: view/theme/vier/theme.php:174 view/theme/vier/config.php:123 msgid "Last users" msgstr "Ultimi utenti" -#: view/theme/vier/theme.php:198 +#: view/theme/vier/theme.php:192 view/theme/vier/config.php:122 +msgid "Find Friends" +msgstr "Trova Amici" + +#: view/theme/vier/theme.php:193 msgid "Local Directory" msgstr "Elenco Locale" -#: view/theme/vier/theme.php:290 +#: view/theme/vier/theme.php:285 msgid "Quick Start" msgstr "Quick Start" -#: index.php:433 -msgid "toggle mobile" -msgstr "commuta tema mobile" +#: view/theme/vier/theme.php:385 view/theme/vier/config.php:121 +msgid "Connect Services" +msgstr "Servizi connessi" -#: boot.php:999 +#: view/theme/vier/config.php:71 +msgid "Comma separated list of helper forums" +msgstr "Lista separata da virgola di forum di aiuto" + +#: view/theme/vier/config.php:117 +msgid "Set style" +msgstr "Imposta stile" + +#: view/theme/vier/config.php:118 +msgid "Community Pages" +msgstr "Pagine Comunitarie" + +#: view/theme/vier/config.php:120 +msgid "Help or @NewHere ?" +msgstr "Serve aiuto? Sei nuovo?" + +#: src/App.php:522 msgid "Delete this item?" msgstr "Cancellare questo elemento?" -#: boot.php:1001 +#: src/App.php:524 msgid "show fewer" msgstr "mostra di meno" -#: boot.php:1729 +#: boot.php:738 #, php-format msgid "Update %s failed. See error logs." msgstr "aggiornamento %s fallito. Guarda i log di errore." -#: boot.php:1843 +#: boot.php:850 msgid "Create a New Account" msgstr "Crea un nuovo account" -#: boot.php:1871 +#: boot.php:878 msgid "Password: " msgstr "Password: " -#: boot.php:1872 +#: boot.php:879 msgid "Remember me" msgstr "Ricordati di me" -#: boot.php:1875 +#: boot.php:882 msgid "Or login using OpenID: " msgstr "O entra con OpenID:" -#: boot.php:1881 +#: boot.php:888 msgid "Forgot your password?" msgstr "Hai dimenticato la password?" -#: boot.php:1884 +#: boot.php:891 msgid "Website Terms of Service" msgstr "Condizioni di servizio del sito web " -#: boot.php:1885 +#: boot.php:892 msgid "terms of service" msgstr "condizioni del servizio" -#: boot.php:1887 +#: boot.php:894 msgid "Website Privacy Policy" msgstr "Politiche di privacy del sito" -#: boot.php:1888 +#: boot.php:895 msgid "privacy policy" msgstr "politiche di privacy" + +#: index.php:438 +msgid "toggle mobile" +msgstr "commuta tema mobile" diff --git a/view/lang/it/strings.php b/view/lang/it/strings.php index 13257c027..71b784155 100644 --- a/view/lang/it/strings.php +++ b/view/lang/it/strings.php @@ -5,6 +5,150 @@ function string_plural_select_it($n){ return ($n != 1);; }} ; +$a->strings["General Features"] = "Funzionalità generali"; +$a->strings["Multiple Profiles"] = "Profili multipli"; +$a->strings["Ability to create multiple profiles"] = "Possibilità di creare profili multipli"; +$a->strings["Photo Location"] = "Località Foto"; +$a->strings["Photo metadata is normally stripped. This extracts the location (if present) prior to stripping metadata and links it to a map."] = "I metadati delle foto vengono rimossi. Questa opzione estrae la località (se presenta) prima di rimuovere i metadati e la collega a una mappa."; +$a->strings["Export Public Calendar"] = "Esporta calendario pubblico"; +$a->strings["Ability for visitors to download the public calendar"] = "Permesso ai visitatori di scaricare il calendario pubblico"; +$a->strings["Post Composition Features"] = "Funzionalità di composizione dei post"; +$a->strings["Post Preview"] = "Anteprima dei post"; +$a->strings["Allow previewing posts and comments before publishing them"] = "Permetti di avere un'anteprima di messaggi e commenti prima di pubblicarli"; +$a->strings["Auto-mention Forums"] = "Auto-cita i Forum"; +$a->strings["Add/remove mention when a forum page is selected/deselected in ACL window."] = "Aggiunge/rimuove una menzione quando una pagina forum è selezionata/deselezionata nella finestra dei permessi."; +$a->strings["Network Sidebar Widgets"] = "Widget della barra laterale nella pagina Rete"; +$a->strings["Search by Date"] = "Cerca per data"; +$a->strings["Ability to select posts by date ranges"] = "Permette di filtrare i post per data"; +$a->strings["List Forums"] = "Elenco forum"; +$a->strings["Enable widget to display the forums your are connected with"] = "Abilita il widget che mostra i forum ai quali sei connesso"; +$a->strings["Group Filter"] = "Filtra gruppi"; +$a->strings["Enable widget to display Network posts only from selected group"] = "Abilita il widget per filtrare i post solo per il gruppo selezionato"; +$a->strings["Network Filter"] = "Filtro reti"; +$a->strings["Enable widget to display Network posts only from selected network"] = "Abilita il widget per mostrare i post solo per la rete selezionata"; +$a->strings["Saved Searches"] = "Ricerche salvate"; +$a->strings["Save search terms for re-use"] = "Salva i termini cercati per riutilizzarli"; +$a->strings["Network Tabs"] = "Schede pagina Rete"; +$a->strings["Network Personal Tab"] = "Scheda Personali"; +$a->strings["Enable tab to display only Network posts that you've interacted on"] = "Abilita la scheda per mostrare solo i post a cui hai partecipato"; +$a->strings["Network New Tab"] = "Scheda Nuovi"; +$a->strings["Enable tab to display only new Network posts (from the last 12 hours)"] = "Abilita la scheda per mostrare solo i post nuovi (nelle ultime 12 ore)"; +$a->strings["Network Shared Links Tab"] = "Scheda Link Condivisi"; +$a->strings["Enable tab to display only Network posts with links in them"] = "Abilita la scheda per mostrare solo i post che contengono link"; +$a->strings["Post/Comment Tools"] = "Strumenti per messaggi/commenti"; +$a->strings["Multiple Deletion"] = "Eliminazione multipla"; +$a->strings["Select and delete multiple posts/comments at once"] = "Seleziona ed elimina vari messaggi e commenti in una volta sola"; +$a->strings["Edit Sent Posts"] = "Modifica i post inviati"; +$a->strings["Edit and correct posts and comments after sending"] = "Modifica e correggi messaggi e commenti dopo averli inviati"; +$a->strings["Tagging"] = "Aggiunta tag"; +$a->strings["Ability to tag existing posts"] = "Permette di aggiungere tag ai post già esistenti"; +$a->strings["Post Categories"] = "Categorie post"; +$a->strings["Add categories to your posts"] = "Aggiungi categorie ai tuoi post"; +$a->strings["Saved Folders"] = "Cartelle Salvate"; +$a->strings["Ability to file posts under folders"] = "Permette di archiviare i post in cartelle"; +$a->strings["Dislike Posts"] = "Non mi piace"; +$a->strings["Ability to dislike posts/comments"] = "Permetti di inviare \"non mi piace\" ai messaggi"; +$a->strings["Star Posts"] = "Post preferiti"; +$a->strings["Ability to mark special posts with a star indicator"] = "Permette di segnare i post preferiti con una stella"; +$a->strings["Mute Post Notifications"] = "Silenzia le notifiche di nuovi post"; +$a->strings["Ability to mute notifications for a thread"] = "Permette di silenziare le notifiche di nuovi post in una discussione"; +$a->strings["Advanced Profile Settings"] = "Impostazioni Avanzate Profilo"; +$a->strings["Show visitors public community forums at the Advanced Profile Page"] = "Mostra ai visitatori i forum nella pagina Profilo Avanzato"; +$a->strings["Miscellaneous"] = "Varie"; +$a->strings["Birthday:"] = "Compleanno:"; +$a->strings["Age: "] = "Età : "; +$a->strings["YYYY-MM-DD or MM-DD"] = "AAAA-MM-GG o MM-GG"; +$a->strings["never"] = "mai"; +$a->strings["less than a second ago"] = "meno di un secondo fa"; +$a->strings["year"] = "anno"; +$a->strings["years"] = "anni"; +$a->strings["month"] = "mese"; +$a->strings["months"] = "mesi"; +$a->strings["week"] = "settimana"; +$a->strings["weeks"] = "settimane"; +$a->strings["day"] = "giorno"; +$a->strings["days"] = "giorni"; +$a->strings["hour"] = "ora"; +$a->strings["hours"] = "ore"; +$a->strings["minute"] = "minuto"; +$a->strings["minutes"] = "minuti"; +$a->strings["second"] = "secondo"; +$a->strings["seconds"] = "secondi"; +$a->strings["%1\$d %2\$s ago"] = "%1\$d %2\$s fa"; +$a->strings["%s's birthday"] = "Compleanno di %s"; +$a->strings["Happy Birthday %s"] = "Buon compleanno %s"; +$a->strings["Male"] = "Maschio"; +$a->strings["Female"] = "Femmina"; +$a->strings["Currently Male"] = "Al momento maschio"; +$a->strings["Currently Female"] = "Al momento femmina"; +$a->strings["Mostly Male"] = "Prevalentemente maschio"; +$a->strings["Mostly Female"] = "Prevalentemente femmina"; +$a->strings["Transgender"] = "Transgender"; +$a->strings["Intersex"] = "Intersex"; +$a->strings["Transsexual"] = "Transessuale"; +$a->strings["Hermaphrodite"] = "Ermafrodito"; +$a->strings["Neuter"] = "Neutro"; +$a->strings["Non-specific"] = "Non specificato"; +$a->strings["Other"] = "Altro"; +$a->strings["Undecided"] = array( + 0 => "Indeciso", + 1 => "Indecisi", +); +$a->strings["Males"] = "Maschi"; +$a->strings["Females"] = "Femmine"; +$a->strings["Gay"] = "Gay"; +$a->strings["Lesbian"] = "Lesbica"; +$a->strings["No Preference"] = "Nessuna preferenza"; +$a->strings["Bisexual"] = "Bisessuale"; +$a->strings["Autosexual"] = "Autosessuale"; +$a->strings["Abstinent"] = "Astinente"; +$a->strings["Virgin"] = "Vergine"; +$a->strings["Deviant"] = "Deviato"; +$a->strings["Fetish"] = "Fetish"; +$a->strings["Oodles"] = "Un sacco"; +$a->strings["Nonsexual"] = "Asessuato"; +$a->strings["Single"] = "Single"; +$a->strings["Lonely"] = "Solitario"; +$a->strings["Available"] = "Disponibile"; +$a->strings["Unavailable"] = "Non disponibile"; +$a->strings["Has crush"] = "è cotto/a"; +$a->strings["Infatuated"] = "infatuato/a"; +$a->strings["Dating"] = "Disponibile a un incontro"; +$a->strings["Unfaithful"] = "Infedele"; +$a->strings["Sex Addict"] = "Sesso-dipendente"; +$a->strings["Friends"] = "Amici"; +$a->strings["Friends/Benefits"] = "Amici con benefici"; +$a->strings["Casual"] = "Casual"; +$a->strings["Engaged"] = "Impegnato"; +$a->strings["Married"] = "Sposato"; +$a->strings["Imaginarily married"] = "immaginariamente sposato/a"; +$a->strings["Partners"] = "Partners"; +$a->strings["Cohabiting"] = "Coinquilino"; +$a->strings["Common law"] = "diritto comune"; +$a->strings["Happy"] = "Felice"; +$a->strings["Not looking"] = "Non guarda"; +$a->strings["Swinger"] = "Scambista"; +$a->strings["Betrayed"] = "Tradito"; +$a->strings["Separated"] = "Separato"; +$a->strings["Unstable"] = "Instabile"; +$a->strings["Divorced"] = "Divorziato"; +$a->strings["Imaginarily divorced"] = "immaginariamente divorziato/a"; +$a->strings["Widowed"] = "Vedovo"; +$a->strings["Uncertain"] = "Incerto"; +$a->strings["It's complicated"] = "E' complicato"; +$a->strings["Don't care"] = "Non interessa"; +$a->strings["Ask me"] = "Chiedimelo"; +$a->strings["A deleted group with this name was revived. Existing item permissions may apply to this group and any future members. If this is not what you intended, please create another group with a different name."] = "Un gruppo eliminato con questo nome è stato ricreato. I permessi esistenti su un elemento possono essere applicati a questo gruppo e tutti i membri futuri. Se questo non è ciò che si intende, si prega di creare un altro gruppo con un nome diverso."; +$a->strings["Default privacy group for new contacts"] = "Gruppo predefinito per i nuovi contatti"; +$a->strings["Everybody"] = "Tutti"; +$a->strings["edit"] = "modifica"; +$a->strings["Groups"] = "Gruppi"; +$a->strings["Edit groups"] = "Modifica gruppi"; +$a->strings["Edit group"] = "Modifica gruppo"; +$a->strings["Create a new group"] = "Crea un nuovo gruppo"; +$a->strings["Group Name: "] = "Nome del gruppo:"; +$a->strings["Contacts not in any group"] = "Contatti in nessun gruppo."; +$a->strings["add"] = "aggiungi"; $a->strings["Forums"] = "Forum"; $a->strings["External link to forum"] = "Link esterno al forum"; $a->strings["show more"] = "mostra di più"; @@ -24,18 +168,107 @@ $a->strings["%s is now friends with %s"] = "%s è ora amico di %s"; $a->strings["Friend Suggestion"] = "Amico suggerito"; $a->strings["Friend/Connect Request"] = "Richiesta amicizia/connessione"; $a->strings["New Follower"] = "Qualcuno inizia a seguirti"; -$a->strings["Wall Photos"] = "Foto della bacheca"; -$a->strings["(no subject)"] = "(nessun oggetto)"; +$a->strings["Logged out."] = "Uscita effettuata."; +$a->strings["Login failed."] = "Accesso fallito."; +$a->strings["We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID."] = "Abbiamo incontrato un problema mentre contattavamo il server OpenID che ci hai fornito. Controlla di averlo scritto giusto."; +$a->strings["The error message was:"] = "Il messaggio riportato era:"; +$a->strings["l F d, Y \\@ g:i A"] = "l d F Y \\@ G:i"; +$a->strings["Starts:"] = "Inizia:"; +$a->strings["Finishes:"] = "Finisce:"; +$a->strings["Location:"] = "Posizione:"; +$a->strings["Add New Contact"] = "Aggiungi nuovo contatto"; +$a->strings["Enter address or web location"] = "Inserisci posizione o indirizzo web"; +$a->strings["Example: bob@example.com, http://example.com/barbara"] = "Esempio: bob@example.com, http://example.com/barbara"; +$a->strings["Connect"] = "Connetti"; +$a->strings["%d invitation available"] = array( + 0 => "%d invito disponibile", + 1 => "%d inviti disponibili", +); +$a->strings["Find People"] = "Trova persone"; +$a->strings["Enter name or interest"] = "Inserisci un nome o un interesse"; +$a->strings["Connect/Follow"] = "Connetti/segui"; +$a->strings["Examples: Robert Morgenstein, Fishing"] = "Esempi: Mario Rossi, Pesca"; +$a->strings["Find"] = "Trova"; +$a->strings["Friend Suggestions"] = "Contatti suggeriti"; +$a->strings["Similar Interests"] = "Interessi simili"; +$a->strings["Random Profile"] = "Profilo causale"; +$a->strings["Invite Friends"] = "Invita amici"; +$a->strings["View Global Directory"] = "Vedi Directory Globale"; +$a->strings["Networks"] = "Reti"; +$a->strings["All Networks"] = "Tutte le Reti"; +$a->strings["Everything"] = "Tutto"; +$a->strings["Categories"] = "Categorie"; +$a->strings["%d contact in common"] = array( + 0 => "%d contatto in comune", + 1 => "%d contatti in comune", +); +$a->strings["Friendica Notification"] = "Notifica Friendica"; +$a->strings["Thank You,"] = "Grazie,"; +$a->strings["%s Administrator"] = "Amministratore %s"; +$a->strings["%1\$s, %2\$s Administrator"] = "%1\$s, amministratore di %2\$s"; $a->strings["noreply"] = "nessuna risposta"; -$a->strings["%1\$s likes %2\$s's %3\$s"] = "A %1\$s piace %3\$s di %2\$s"; -$a->strings["%1\$s doesn't like %2\$s's %3\$s"] = "A %1\$s non piace %3\$s di %2\$s"; -$a->strings["%1\$s is attending %2\$s's %3\$s"] = "%1\$s parteciperà a %3\$s di %2\$s"; -$a->strings["%1\$s is not attending %2\$s's %3\$s"] = "%1\$s non parteciperà a %3\$s di %2\$s"; -$a->strings["%1\$s may attend %2\$s's %3\$s"] = "%1\$s forse parteciperà a %3\$s di %2\$s"; -$a->strings["photo"] = "foto"; -$a->strings["status"] = "stato"; -$a->strings["event"] = "l'evento"; -$a->strings["[no subject]"] = "[nessun oggetto]"; +$a->strings["%s "] = "%s "; +$a->strings["[Friendica:Notify] New mail received at %s"] = "[Friendica:Notifica] Nuovo messaggio privato ricevuto su %s"; +$a->strings["%1\$s sent you a new private message at %2\$s."] = "%1\$s ti ha inviato un nuovo messaggio privato su %2\$s."; +$a->strings["%1\$s sent you %2\$s."] = "%1\$s ti ha inviato %2\$s"; +$a->strings["a private message"] = "un messaggio privato"; +$a->strings["Please visit %s to view and/or reply to your private messages."] = "Visita %s per vedere e/o rispondere ai tuoi messaggi privati."; +$a->strings["%1\$s commented on [url=%2\$s]a %3\$s[/url]"] = "%1\$s ha commentato [url=%2\$s]%3\$s[/url]"; +$a->strings["%1\$s commented on [url=%2\$s]%3\$s's %4\$s[/url]"] = "%1\$s ha commentato [url=%2\$s]%4\$s di %3\$s[/url]"; +$a->strings["%1\$s commented on [url=%2\$s]your %3\$s[/url]"] = "%1\$s ha commentato un [url=%2\$s]tuo %3\$s[/url]"; +$a->strings["[Friendica:Notify] Comment to conversation #%1\$d by %2\$s"] = "[Friendica:Notifica] Commento di %2\$s alla conversazione #%1\$d"; +$a->strings["%s commented on an item/conversation you have been following."] = "%s ha commentato un elemento che stavi seguendo."; +$a->strings["Please visit %s to view and/or reply to the conversation."] = "Visita %s per vedere e/o commentare la conversazione"; +$a->strings["[Friendica:Notify] %s posted to your profile wall"] = "[Friendica:Notifica] %s ha scritto sulla tua bacheca"; +$a->strings["%1\$s posted to your profile wall at %2\$s"] = "%1\$s ha scritto sulla tua bacheca su %2\$s"; +$a->strings["%1\$s posted to [url=%2\$s]your wall[/url]"] = "%1\$s ha inviato un messaggio sulla [url=%2\$s]tua bacheca[/url]"; +$a->strings["[Friendica:Notify] %s tagged you"] = "[Friendica:Notifica] %s ti ha taggato"; +$a->strings["%1\$s tagged you at %2\$s"] = "%1\$s ti ha taggato su %2\$s"; +$a->strings["%1\$s [url=%2\$s]tagged you[/url]."] = "%1\$s [url=%2\$s]ti ha taggato[/url]."; +$a->strings["[Friendica:Notify] %s shared a new post"] = "[Friendica:Notifica] %s ha condiviso un nuovo messaggio"; +$a->strings["%1\$s shared a new post at %2\$s"] = "%1\$s ha condiviso un nuovo messaggio su %2\$s"; +$a->strings["%1\$s [url=%2\$s]shared a post[/url]."] = "%1\$s [url=%2\$s]ha condiviso un messaggio[/url]."; +$a->strings["[Friendica:Notify] %1\$s poked you"] = "[Friendica:Notifica] %1\$s ti ha stuzzicato"; +$a->strings["%1\$s poked you at %2\$s"] = "%1\$s ti ha stuzzicato su %2\$s"; +$a->strings["%1\$s [url=%2\$s]poked you[/url]."] = "%1\$s [url=%2\$s]ti ha stuzzicato[/url]."; +$a->strings["[Friendica:Notify] %s tagged your post"] = "[Friendica:Notifica] %s ha taggato un tuo messaggio"; +$a->strings["%1\$s tagged your post at %2\$s"] = "%1\$s ha taggato il tuo post su %2\$s"; +$a->strings["%1\$s tagged [url=%2\$s]your post[/url]"] = "%1\$s ha taggato [url=%2\$s]il tuo post[/url]"; +$a->strings["[Friendica:Notify] Introduction received"] = "[Friendica:Notifica] Hai ricevuto una presentazione"; +$a->strings["You've received an introduction from '%1\$s' at %2\$s"] = "Hai ricevuto un'introduzione da '%1\$s' su %2\$s"; +$a->strings["You've received [url=%1\$s]an introduction[/url] from %2\$s."] = "Hai ricevuto [url=%1\$s]un'introduzione[/url] da %2\$s."; +$a->strings["You may visit their profile at %s"] = "Puoi visitare il suo profilo presso %s"; +$a->strings["Please visit %s to approve or reject the introduction."] = "Visita %s per approvare o rifiutare la presentazione."; +$a->strings["[Friendica:Notify] A new person is sharing with you"] = "[Friendica:Notifica] Una nuova persona sta condividendo con te"; +$a->strings["%1\$s is sharing with you at %2\$s"] = "%1\$s sta condividendo con te su %2\$s"; +$a->strings["[Friendica:Notify] You have a new follower"] = "[Friendica:Notifica] Una nuova persona ti segue"; +$a->strings["You have a new follower at %2\$s : %1\$s"] = "Un nuovo utente ha iniziato a seguirti su %2\$s : %1\$s"; +$a->strings["[Friendica:Notify] Friend suggestion received"] = "[Friendica:Notifica] Hai ricevuto un suggerimento di amicizia"; +$a->strings["You've received a friend suggestion from '%1\$s' at %2\$s"] = "Hai ricevuto un suggerimento di amicizia da '%1\$s' su %2\$s"; +$a->strings["You've received [url=%1\$s]a friend suggestion[/url] for %2\$s from %3\$s."] = "Hai ricevuto [url=%1\$s]un suggerimento di amicizia[/url] per %2\$s su %3\$s"; +$a->strings["Name:"] = "Nome:"; +$a->strings["Photo:"] = "Foto:"; +$a->strings["Please visit %s to approve or reject the suggestion."] = "Visita %s per approvare o rifiutare il suggerimento."; +$a->strings["[Friendica:Notify] Connection accepted"] = "[Friendica:Notifica] Connessione accettata"; +$a->strings["'%1\$s' has accepted your connection request at %2\$s"] = "'%1\$s' ha accettato la tua richiesta di connessione su %2\$s"; +$a->strings["%2\$s has accepted your [url=%1\$s]connection request[/url]."] = "%2\$s ha accettato la tua [url=%1\$s]richiesta di connessione[/url]"; +$a->strings["You are now mutual friends and may exchange status updates, photos, and email without restriction."] = "Ora siete amici reciproci e potete scambiarvi aggiornamenti di stato, foto e messaggi privati senza restrizioni."; +$a->strings["Please visit %s if you wish to make any changes to this relationship."] = "Visita %s se vuoi modificare questa relazione."; +$a->strings["'%1\$s' has chosen to accept you a \"fan\", which restricts some forms of communication - such as private messaging and some profile interactions. If this is a celebrity or community page, these settings were applied automatically."] = "'%1\$s' ha scelto di accettarti come \"fan\", il che limita alcune forme di comunicazione, come i messaggi privati, e alcune possibilità di interazione col profilo. Se è una pagina di una comunità o di una celebrità, queste impostazioni sono state applicate automaticamente."; +$a->strings["'%1\$s' may choose to extend this into a two-way or more permissive relationship in the future."] = "'%1\$s' può scegliere di estendere questa relazione in una relazione più permissiva in futuro."; +$a->strings["Please visit %s if you wish to make any changes to this relationship."] = "Visita %s se desideri modificare questo collegamento."; +$a->strings["[Friendica System:Notify] registration request"] = "[Friendica System:Notifica] richiesta di registrazione"; +$a->strings["You've received a registration request from '%1\$s' at %2\$s"] = "Hai ricevuto una richiesta di registrazione da '%1\$s' su %2\$s"; +$a->strings["You've received a [url=%1\$s]registration request[/url] from %2\$s."] = "Hai ricevuto una [url=%1\$s]richiesta di registrazione[/url] da %2\$s."; +$a->strings["Full Name:\t%1\$s\\nSite Location:\t%2\$s\\nLogin Name:\t%3\$s (%4\$s)"] = "Nome completo: %1\$s\nIndirizzo del sito: %2\$s\nNome utente: %3\$s (%4\$s)"; +$a->strings["Please visit %s to approve or reject the request."] = "Visita %s per approvare o rifiutare la richiesta."; +$a->strings["Embedded content"] = "Contenuto incorporato"; +$a->strings["Embedding disabled"] = "Embed disabilitato"; +$a->strings["Welcome "] = "Ciao"; +$a->strings["Please upload a profile photo."] = "Carica una foto per il profilo."; +$a->strings["Welcome back "] = "Ciao "; +$a->strings["The form security token was not correct. This probably happened because the form has been opened for too long (>3 hours) before submitting it."] = "Il token di sicurezza della form non era corretto. Probabilmente la form è rimasta aperta troppo a lungo (più di tre ore) prima di inviarla."; +$a->strings["Contact Photos"] = "Foto dei contatti"; $a->strings["Nothing new here"] = "Niente di nuovo qui"; $a->strings["Clear notifications"] = "Pulisci le notifiche"; $a->strings["@name, !forum, #tags, content"] = "@nome, !forum, #tag, contenuto"; @@ -101,87 +334,7 @@ $a->strings["Admin"] = "Amministrazione"; $a->strings["Site setup and configuration"] = "Configurazione del sito"; $a->strings["Navigation"] = "Navigazione"; $a->strings["Site map"] = "Mappa del sito"; -$a->strings["Click here to upgrade."] = "Clicca qui per aggiornare."; -$a->strings["This action exceeds the limits set by your subscription plan."] = "Questa azione eccede i limiti del tuo piano di sottoscrizione."; -$a->strings["This action is not available under your subscription plan."] = "Questa azione non è disponibile nel tuo piano di sottoscrizione."; -$a->strings["Male"] = "Maschio"; -$a->strings["Female"] = "Femmina"; -$a->strings["Currently Male"] = "Al momento maschio"; -$a->strings["Currently Female"] = "Al momento femmina"; -$a->strings["Mostly Male"] = "Prevalentemente maschio"; -$a->strings["Mostly Female"] = "Prevalentemente femmina"; -$a->strings["Transgender"] = "Transgender"; -$a->strings["Intersex"] = "Intersex"; -$a->strings["Transsexual"] = "Transessuale"; -$a->strings["Hermaphrodite"] = "Ermafrodito"; -$a->strings["Neuter"] = "Neutro"; -$a->strings["Non-specific"] = "Non specificato"; -$a->strings["Other"] = "Altro"; -$a->strings["Undecided"] = array( - 0 => "Indeciso", - 1 => "Indecisi", -); -$a->strings["Males"] = "Maschi"; -$a->strings["Females"] = "Femmine"; -$a->strings["Gay"] = "Gay"; -$a->strings["Lesbian"] = "Lesbica"; -$a->strings["No Preference"] = "Nessuna preferenza"; -$a->strings["Bisexual"] = "Bisessuale"; -$a->strings["Autosexual"] = "Autosessuale"; -$a->strings["Abstinent"] = "Astinente"; -$a->strings["Virgin"] = "Vergine"; -$a->strings["Deviant"] = "Deviato"; -$a->strings["Fetish"] = "Fetish"; -$a->strings["Oodles"] = "Un sacco"; -$a->strings["Nonsexual"] = "Asessuato"; -$a->strings["Single"] = "Single"; -$a->strings["Lonely"] = "Solitario"; -$a->strings["Available"] = "Disponibile"; -$a->strings["Unavailable"] = "Non disponibile"; -$a->strings["Has crush"] = "è cotto/a"; -$a->strings["Infatuated"] = "infatuato/a"; -$a->strings["Dating"] = "Disponibile a un incontro"; -$a->strings["Unfaithful"] = "Infedele"; -$a->strings["Sex Addict"] = "Sesso-dipendente"; -$a->strings["Friends"] = "Amici"; -$a->strings["Friends/Benefits"] = "Amici con benefici"; -$a->strings["Casual"] = "Casual"; -$a->strings["Engaged"] = "Impegnato"; -$a->strings["Married"] = "Sposato"; -$a->strings["Imaginarily married"] = "immaginariamente sposato/a"; -$a->strings["Partners"] = "Partners"; -$a->strings["Cohabiting"] = "Coinquilino"; -$a->strings["Common law"] = "diritto comune"; -$a->strings["Happy"] = "Felice"; -$a->strings["Not looking"] = "Non guarda"; -$a->strings["Swinger"] = "Scambista"; -$a->strings["Betrayed"] = "Tradito"; -$a->strings["Separated"] = "Separato"; -$a->strings["Unstable"] = "Instabile"; -$a->strings["Divorced"] = "Divorziato"; -$a->strings["Imaginarily divorced"] = "immaginariamente divorziato/a"; -$a->strings["Widowed"] = "Vedovo"; -$a->strings["Uncertain"] = "Incerto"; -$a->strings["It's complicated"] = "E' complicato"; -$a->strings["Don't care"] = "Non interessa"; -$a->strings["Ask me"] = "Chiedimelo"; -$a->strings["Welcome "] = "Ciao"; -$a->strings["Please upload a profile photo."] = "Carica una foto per il profilo."; -$a->strings["Welcome back "] = "Ciao "; -$a->strings["The form security token was not correct. This probably happened because the form has been opened for too long (>3 hours) before submitting it."] = "Il token di sicurezza della form non era corretto. Probabilmente la form è rimasta aperta troppo a lungo (più di tre ore) prima di inviarla."; -$a->strings["Error decoding account file"] = "Errore decodificando il file account"; -$a->strings["Error! No version data in file! This is not a Friendica account file?"] = "Errore! Nessuna informazione di versione nel file! Potrebbe non essere un file account di Friendica?"; -$a->strings["Error! Cannot check nickname"] = "Errore! Non posso controllare il nickname"; -$a->strings["User '%s' already exists on this server!"] = "L'utente '%s' esiste già su questo server!"; -$a->strings["User creation error"] = "Errore creando l'utente"; -$a->strings["User profile creation error"] = "Errore creando il profilo dell'utente"; -$a->strings["%d contact not imported"] = array( - 0 => "%d contatto non importato", - 1 => "%d contatti non importati", -); -$a->strings["Done. You can now login with your username and password"] = "Fatto. Ora puoi entrare con il tuo nome utente e la tua password"; $a->strings["View Profile"] = "Visualizza profilo"; -$a->strings["Connect/Follow"] = "Connetti/segui"; $a->strings["View Status"] = "Visualizza stato"; $a->strings["View Photos"] = "Visualizza foto"; $a->strings["Network Posts"] = "Post della Rete"; @@ -192,6 +345,7 @@ $a->strings["Poke"] = "Stuzzica"; $a->strings["Organisation"] = "Organizzazione"; $a->strings["News"] = "Notizie"; $a->strings["Forum"] = "Forum"; +$a->strings["Wall Photos"] = "Foto della bacheca"; $a->strings["Post to Email"] = "Invia a email"; $a->strings["Connectors disabled, since \"%s\" is enabled."] = "Connettore disabilitato, dato che \"%s\" è abilitato."; $a->strings["Hide your profile details from unknown viewers?"] = "Nascondi i dettagli del tuo profilo ai visitatori sconosciuti?"; @@ -205,14 +359,7 @@ $a->strings["Close"] = "Chiudi"; $a->strings["Daily posting limit of %d posts reached. The post was rejected."] = "Limite giornaliero di %d messaggi raggiunto. Il messaggio è stato rifiutato"; $a->strings["Weekly posting limit of %d posts reached. The post was rejected."] = "Limite settimanale di %d messaggi raggiunto. Il messaggio è stato rifiutato"; $a->strings["Monthly posting limit of %d posts reached. The post was rejected."] = "Limite mensile di %d messaggi raggiunto. Il messaggio è stato rifiutato"; -$a->strings["Logged out."] = "Uscita effettuata."; -$a->strings["Login failed."] = "Accesso fallito."; -$a->strings["We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID."] = "Abbiamo incontrato un problema mentre contattavamo il server OpenID che ci hai fornito. Controlla di averlo scritto giusto."; -$a->strings["The error message was:"] = "Il messaggio riportato era:"; -$a->strings["l F d, Y \\@ g:i A"] = "l d F Y \\@ G:i"; -$a->strings["Starts:"] = "Inizia:"; -$a->strings["Finishes:"] = "Finisce:"; -$a->strings["Location:"] = "Posizione:"; +$a->strings["Profile Photos"] = "Foto del profilo"; $a->strings["Image/photo"] = "Immagine/foto"; $a->strings["%2\$s %3\$s"] = "%2\$s %3\$s"; $a->strings["$1 wrote:"] = "$1 ha scritto:"; @@ -248,31 +395,11 @@ $a->strings["Diaspora Connector"] = "Connettore Diaspora"; $a->strings["GNU Social Connector"] = "Connettore GNU Social"; $a->strings["pnut"] = "pnut"; $a->strings["App.net"] = "App.net"; -$a->strings["Add New Contact"] = "Aggiungi nuovo contatto"; -$a->strings["Enter address or web location"] = "Inserisci posizione o indirizzo web"; -$a->strings["Example: bob@example.com, http://example.com/barbara"] = "Esempio: bob@example.com, http://example.com/barbara"; -$a->strings["Connect"] = "Connetti"; -$a->strings["%d invitation available"] = array( - 0 => "%d invito disponibile", - 1 => "%d inviti disponibili", -); -$a->strings["Find People"] = "Trova persone"; -$a->strings["Enter name or interest"] = "Inserisci un nome o un interesse"; -$a->strings["Examples: Robert Morgenstein, Fishing"] = "Esempi: Mario Rossi, Pesca"; -$a->strings["Find"] = "Trova"; -$a->strings["Friend Suggestions"] = "Contatti suggeriti"; -$a->strings["Similar Interests"] = "Interessi simili"; -$a->strings["Random Profile"] = "Profilo causale"; -$a->strings["Invite Friends"] = "Invita amici"; -$a->strings["Networks"] = "Reti"; -$a->strings["All Networks"] = "Tutte le Reti"; -$a->strings["Saved Folders"] = "Cartelle Salvate"; -$a->strings["Everything"] = "Tutto"; -$a->strings["Categories"] = "Categorie"; -$a->strings["%d contact in common"] = array( - 0 => "%d contatto in comune", - 1 => "%d contatti in comune", -); +$a->strings["event"] = "l'evento"; +$a->strings["status"] = "stato"; +$a->strings["photo"] = "foto"; +$a->strings["%1\$s likes %2\$s's %3\$s"] = "A %1\$s piace %3\$s di %2\$s"; +$a->strings["%1\$s doesn't like %2\$s's %3\$s"] = "A %1\$s non piace %3\$s di %2\$s"; $a->strings["%1\$s attends %2\$s's %3\$s"] = "%1\$s partecipa a %3\$s di %2\$s"; $a->strings["%1\$s doesn't attend %2\$s's %3\$s"] = "%1\$s non partecipa a %3\$s di %2\$s"; $a->strings["%1\$s attends maybe %2\$s's %3\$s"] = "%1\$s forse partecipa a %3\$s di %2\$s"; @@ -366,89 +493,18 @@ $a->strings["Not Attending"] = array( 0 => "Non partecipa", 1 => "Non partecipano", ); -$a->strings["Miscellaneous"] = "Varie"; -$a->strings["Birthday:"] = "Compleanno:"; -$a->strings["Age: "] = "Età : "; -$a->strings["YYYY-MM-DD or MM-DD"] = "AAAA-MM-GG o MM-GG"; -$a->strings["never"] = "mai"; -$a->strings["less than a second ago"] = "meno di un secondo fa"; -$a->strings["year"] = "anno"; -$a->strings["years"] = "anni"; -$a->strings["month"] = "mese"; -$a->strings["months"] = "mesi"; -$a->strings["week"] = "settimana"; -$a->strings["weeks"] = "settimane"; -$a->strings["day"] = "giorno"; -$a->strings["days"] = "giorni"; -$a->strings["hour"] = "ora"; -$a->strings["hours"] = "ore"; -$a->strings["minute"] = "minuto"; -$a->strings["minutes"] = "minuti"; -$a->strings["second"] = "secondo"; -$a->strings["seconds"] = "secondi"; -$a->strings["%1\$d %2\$s ago"] = "%1\$d %2\$s fa"; -$a->strings["%s's birthday"] = "Compleanno di %s"; -$a->strings["Happy Birthday %s"] = "Buon compleanno %s"; $a->strings["Cannot locate DNS info for database server '%s'"] = "Non trovo le informazioni DNS per il database server '%s'"; -$a->strings["Friendica Notification"] = "Notifica Friendica"; -$a->strings["Thank You,"] = "Grazie,"; -$a->strings["%s Administrator"] = "Amministratore %s"; -$a->strings["%1\$s, %2\$s Administrator"] = "%1\$s, amministratore di %2\$s"; -$a->strings["%s "] = "%s "; -$a->strings["[Friendica:Notify] New mail received at %s"] = "[Friendica:Notifica] Nuovo messaggio privato ricevuto su %s"; -$a->strings["%1\$s sent you a new private message at %2\$s."] = "%1\$s ti ha inviato un nuovo messaggio privato su %2\$s."; -$a->strings["%1\$s sent you %2\$s."] = "%1\$s ti ha inviato %2\$s"; -$a->strings["a private message"] = "un messaggio privato"; -$a->strings["Please visit %s to view and/or reply to your private messages."] = "Visita %s per vedere e/o rispondere ai tuoi messaggi privati."; -$a->strings["%1\$s commented on [url=%2\$s]a %3\$s[/url]"] = "%1\$s ha commentato [url=%2\$s]%3\$s[/url]"; -$a->strings["%1\$s commented on [url=%2\$s]%3\$s's %4\$s[/url]"] = "%1\$s ha commentato [url=%2\$s]%4\$s di %3\$s[/url]"; -$a->strings["%1\$s commented on [url=%2\$s]your %3\$s[/url]"] = "%1\$s ha commentato un [url=%2\$s]tuo %3\$s[/url]"; -$a->strings["[Friendica:Notify] Comment to conversation #%1\$d by %2\$s"] = "[Friendica:Notifica] Commento di %2\$s alla conversazione #%1\$d"; -$a->strings["%s commented on an item/conversation you have been following."] = "%s ha commentato un elemento che stavi seguendo."; -$a->strings["Please visit %s to view and/or reply to the conversation."] = "Visita %s per vedere e/o commentare la conversazione"; -$a->strings["[Friendica:Notify] %s posted to your profile wall"] = "[Friendica:Notifica] %s ha scritto sulla tua bacheca"; -$a->strings["%1\$s posted to your profile wall at %2\$s"] = "%1\$s ha scritto sulla tua bacheca su %2\$s"; -$a->strings["%1\$s posted to [url=%2\$s]your wall[/url]"] = "%1\$s ha inviato un messaggio sulla [url=%2\$s]tua bacheca[/url]"; -$a->strings["[Friendica:Notify] %s tagged you"] = "[Friendica:Notifica] %s ti ha taggato"; -$a->strings["%1\$s tagged you at %2\$s"] = "%1\$s ti ha taggato su %2\$s"; -$a->strings["%1\$s [url=%2\$s]tagged you[/url]."] = "%1\$s [url=%2\$s]ti ha taggato[/url]."; -$a->strings["[Friendica:Notify] %s shared a new post"] = "[Friendica:Notifica] %s ha condiviso un nuovo messaggio"; -$a->strings["%1\$s shared a new post at %2\$s"] = "%1\$s ha condiviso un nuovo messaggio su %2\$s"; -$a->strings["%1\$s [url=%2\$s]shared a post[/url]."] = "%1\$s [url=%2\$s]ha condiviso un messaggio[/url]."; -$a->strings["[Friendica:Notify] %1\$s poked you"] = "[Friendica:Notifica] %1\$s ti ha stuzzicato"; -$a->strings["%1\$s poked you at %2\$s"] = "%1\$s ti ha stuzzicato su %2\$s"; -$a->strings["%1\$s [url=%2\$s]poked you[/url]."] = "%1\$s [url=%2\$s]ti ha stuzzicato[/url]."; -$a->strings["[Friendica:Notify] %s tagged your post"] = "[Friendica:Notifica] %s ha taggato un tuo messaggio"; -$a->strings["%1\$s tagged your post at %2\$s"] = "%1\$s ha taggato il tuo post su %2\$s"; -$a->strings["%1\$s tagged [url=%2\$s]your post[/url]"] = "%1\$s ha taggato [url=%2\$s]il tuo post[/url]"; -$a->strings["[Friendica:Notify] Introduction received"] = "[Friendica:Notifica] Hai ricevuto una presentazione"; -$a->strings["You've received an introduction from '%1\$s' at %2\$s"] = "Hai ricevuto un'introduzione da '%1\$s' su %2\$s"; -$a->strings["You've received [url=%1\$s]an introduction[/url] from %2\$s."] = "Hai ricevuto [url=%1\$s]un'introduzione[/url] da %2\$s."; -$a->strings["You may visit their profile at %s"] = "Puoi visitare il suo profilo presso %s"; -$a->strings["Please visit %s to approve or reject the introduction."] = "Visita %s per approvare o rifiutare la presentazione."; -$a->strings["[Friendica:Notify] A new person is sharing with you"] = "[Friendica:Notifica] Una nuova persona sta condividendo con te"; -$a->strings["%1\$s is sharing with you at %2\$s"] = "%1\$s sta condividendo con te su %2\$s"; -$a->strings["[Friendica:Notify] You have a new follower"] = "[Friendica:Notifica] Una nuova persona ti segue"; -$a->strings["You have a new follower at %2\$s : %1\$s"] = "Un nuovo utente ha iniziato a seguirti su %2\$s : %1\$s"; -$a->strings["[Friendica:Notify] Friend suggestion received"] = "[Friendica:Notifica] Hai ricevuto un suggerimento di amicizia"; -$a->strings["You've received a friend suggestion from '%1\$s' at %2\$s"] = "Hai ricevuto un suggerimento di amicizia da '%1\$s' su %2\$s"; -$a->strings["You've received [url=%1\$s]a friend suggestion[/url] for %2\$s from %3\$s."] = "Hai ricevuto [url=%1\$s]un suggerimento di amicizia[/url] per %2\$s su %3\$s"; -$a->strings["Name:"] = "Nome:"; -$a->strings["Photo:"] = "Foto:"; -$a->strings["Please visit %s to approve or reject the suggestion."] = "Visita %s per approvare o rifiutare il suggerimento."; -$a->strings["[Friendica:Notify] Connection accepted"] = "[Friendica:Notifica] Connessione accettata"; -$a->strings["'%1\$s' has accepted your connection request at %2\$s"] = "'%1\$s' ha accettato la tua richiesta di connessione su %2\$s"; -$a->strings["%2\$s has accepted your [url=%1\$s]connection request[/url]."] = "%2\$s ha accettato la tua [url=%1\$s]richiesta di connessione[/url]"; -$a->strings["You are now mutual friends and may exchange status updates, photos, and email without restriction."] = "Ora siete amici reciproci e potete scambiarvi aggiornamenti di stato, foto e messaggi privati senza restrizioni."; -$a->strings["Please visit %s if you wish to make any changes to this relationship."] = "Visita %s se vuoi modificare questa relazione."; -$a->strings["'%1\$s' has chosen to accept you a \"fan\", which restricts some forms of communication - such as private messaging and some profile interactions. If this is a celebrity or community page, these settings were applied automatically."] = "'%1\$s' ha scelto di accettarti come \"fan\", il che limita alcune forme di comunicazione, come i messaggi privati, e alcune possibilità di interazione col profilo. Se è una pagina di una comunità o di una celebrità, queste impostazioni sono state applicate automaticamente."; -$a->strings["'%1\$s' may choose to extend this into a two-way or more permissive relationship in the future."] = "'%1\$s' può scegliere di estendere questa relazione in una relazione più permissiva in futuro."; -$a->strings["Please visit %s if you wish to make any changes to this relationship."] = "Visita %s se desideri modificare questo collegamento."; -$a->strings["[Friendica System:Notify] registration request"] = "[Friendica System:Notifica] richiesta di registrazione"; -$a->strings["You've received a registration request from '%1\$s' at %2\$s"] = "Hai ricevuto una richiesta di registrazione da '%1\$s' su %2\$s"; -$a->strings["You've received a [url=%1\$s]registration request[/url] from %2\$s."] = "Hai ricevuto una [url=%1\$s]richiesta di registrazione[/url] da %2\$s."; -$a->strings["Full Name:\t%1\$s\\nSite Location:\t%2\$s\\nLogin Name:\t%3\$s (%4\$s)"] = "Nome completo: %1\$s\nIndirizzo del sito: %2\$s\nNome utente: %3\$s (%4\$s)"; -$a->strings["Please visit %s to approve or reject the request."] = "Visita %s per approvare o rifiutare la richiesta."; +$a->strings["There are no tables on MyISAM."] = "Non ci sono tabelle MyISAM"; +$a->strings["\n\t\t\tThe friendica developers released update %s recently,\n\t\t\tbut when I tried to install it, something went terribly wrong.\n\t\t\tThis needs to be fixed soon and I can't do it alone. Please contact a\n\t\t\tfriendica developer if you can not help me on your own. My database might be invalid."] = "\nGli sviluppatori di Friendica hanno rilasciato l'aggiornamento %s\nrecentemente, ma quando ho provato a installarlo, qualcosa è \nandato terribilmente storto.\nBisogna sistemare le cose e non posso farlo da solo.\nContatta uno sviluppatore se non puoi aiutarmi da solo. Il mio database potrebbe essere invalido."; +$a->strings["The error message is\n[pre]%s[/pre]"] = "Il messaggio di errore è\n[pre]%s[/pre]"; +$a->strings["\nError %d occurred during database update:\n%s\n"] = "\nErrore %d durante l'aggiornamento del database:\n%s\n"; +$a->strings["Errors encountered performing database changes: "] = "Errori riscontrati eseguendo le modifiche al database:"; +$a->strings[": Database update"] = ": Aggiornamento database"; +$a->strings["%s: updating %s table."] = "%s: aggiornando la tabella %s."; +$a->strings["(no subject)"] = "(nessun oggetto)"; +$a->strings["%s\\'s birthday"] = "compleanno di %s"; +$a->strings["Sharing notification from Diaspora network"] = "Notifica di condivisione dal network Diaspora*"; +$a->strings["Attachments:"] = "Allegati:"; $a->strings["all-day"] = "tutto il giorno"; $a->strings["Sun"] = "Dom"; $a->strings["Mon"] = "Lun"; @@ -491,59 +547,16 @@ $a->strings["today"] = "oggi"; $a->strings["No events to display"] = "Nessun evento da mostrare"; $a->strings["l, F j"] = "l j F"; $a->strings["Edit event"] = "Modifica l'evento"; +$a->strings["Duplicate event"] = "Duplica evento"; $a->strings["Delete event"] = "Elimina evento"; $a->strings["link to source"] = "Collegamento all'originale"; $a->strings["Export"] = "Esporta"; $a->strings["Export calendar as ical"] = "Esporta il calendario in formato ical"; $a->strings["Export calendar as csv"] = "Esporta il calendario in formato csv"; -$a->strings["General Features"] = "Funzionalità generali"; -$a->strings["Multiple Profiles"] = "Profili multipli"; -$a->strings["Ability to create multiple profiles"] = "Possibilità di creare profili multipli"; -$a->strings["Photo Location"] = "Località Foto"; -$a->strings["Photo metadata is normally stripped. This extracts the location (if present) prior to stripping metadata and links it to a map."] = "I metadati delle foto vengono rimossi. Questa opzione estrae la località (se presenta) prima di rimuovere i metadati e la collega a una mappa."; -$a->strings["Export Public Calendar"] = "Esporta calendario pubblico"; -$a->strings["Ability for visitors to download the public calendar"] = "Permesso ai visitatori di scaricare il calendario pubblico"; -$a->strings["Post Composition Features"] = "Funzionalità di composizione dei post"; -$a->strings["Post Preview"] = "Anteprima dei post"; -$a->strings["Allow previewing posts and comments before publishing them"] = "Permetti di avere un'anteprima di messaggi e commenti prima di pubblicarli"; -$a->strings["Auto-mention Forums"] = "Auto-cita i Forum"; -$a->strings["Add/remove mention when a forum page is selected/deselected in ACL window."] = "Aggiunge/rimuove una menzione quando una pagina forum è selezionata/deselezionata nella finestra dei permessi."; -$a->strings["Network Sidebar Widgets"] = "Widget della barra laterale nella pagina Rete"; -$a->strings["Search by Date"] = "Cerca per data"; -$a->strings["Ability to select posts by date ranges"] = "Permette di filtrare i post per data"; -$a->strings["List Forums"] = "Elenco forum"; -$a->strings["Enable widget to display the forums your are connected with"] = "Abilita il widget che mostra i forum ai quali sei connesso"; -$a->strings["Group Filter"] = "Filtra gruppi"; -$a->strings["Enable widget to display Network posts only from selected group"] = "Abilita il widget per filtrare i post solo per il gruppo selezionato"; -$a->strings["Network Filter"] = "Filtro reti"; -$a->strings["Enable widget to display Network posts only from selected network"] = "Abilita il widget per mostrare i post solo per la rete selezionata"; -$a->strings["Saved Searches"] = "Ricerche salvate"; -$a->strings["Save search terms for re-use"] = "Salva i termini cercati per riutilizzarli"; -$a->strings["Network Tabs"] = "Schede pagina Rete"; -$a->strings["Network Personal Tab"] = "Scheda Personali"; -$a->strings["Enable tab to display only Network posts that you've interacted on"] = "Abilita la scheda per mostrare solo i post a cui hai partecipato"; -$a->strings["Network New Tab"] = "Scheda Nuovi"; -$a->strings["Enable tab to display only new Network posts (from the last 12 hours)"] = "Abilita la scheda per mostrare solo i post nuovi (nelle ultime 12 ore)"; -$a->strings["Network Shared Links Tab"] = "Scheda Link Condivisi"; -$a->strings["Enable tab to display only Network posts with links in them"] = "Abilita la scheda per mostrare solo i post che contengono link"; -$a->strings["Post/Comment Tools"] = "Strumenti per messaggi/commenti"; -$a->strings["Multiple Deletion"] = "Eliminazione multipla"; -$a->strings["Select and delete multiple posts/comments at once"] = "Seleziona ed elimina vari messaggi e commenti in una volta sola"; -$a->strings["Edit Sent Posts"] = "Modifica i post inviati"; -$a->strings["Edit and correct posts and comments after sending"] = "Modifica e correggi messaggi e commenti dopo averli inviati"; -$a->strings["Tagging"] = "Aggiunta tag"; -$a->strings["Ability to tag existing posts"] = "Permette di aggiungere tag ai post già esistenti"; -$a->strings["Post Categories"] = "Categorie post"; -$a->strings["Add categories to your posts"] = "Aggiungi categorie ai tuoi post"; -$a->strings["Ability to file posts under folders"] = "Permette di archiviare i post in cartelle"; -$a->strings["Dislike Posts"] = "Non mi piace"; -$a->strings["Ability to dislike posts/comments"] = "Permetti di inviare \"non mi piace\" ai messaggi"; -$a->strings["Star Posts"] = "Post preferiti"; -$a->strings["Ability to mark special posts with a star indicator"] = "Permette di segnare i post preferiti con una stella"; -$a->strings["Mute Post Notifications"] = "Silenzia le notifiche di nuovi post"; -$a->strings["Ability to mute notifications for a thread"] = "Permette di silenziare le notifiche di nuovi post in una discussione"; -$a->strings["Advanced Profile Settings"] = "Impostazioni Avanzate Profilo"; -$a->strings["Show visitors public community forums at the Advanced Profile Page"] = "Mostra ai visitatori i forum nella pagina Profilo Avanzato"; +$a->strings["D g:i A"] = ""; +$a->strings["g:i A"] = ""; +$a->strings["Show map"] = "Mostra mappa"; +$a->strings["Hide map"] = "Nascondi mappa"; $a->strings["Disallowed profile URL."] = "Indirizzo profilo non permesso."; $a->strings["Blocked domain"] = "Dominio bloccato"; $a->strings["Connect URL missing."] = "URL di connessione mancante."; @@ -557,17 +570,6 @@ $a->strings["Use mailto: in front of address to force email check."] = "Usa \"ma $a->strings["The profile address specified belongs to a network which has been disabled on this site."] = "L'indirizzo del profilo specificato appartiene a un network che è stato disabilitato su questo sito."; $a->strings["Limited profile. This person will be unable to receive direct/personal notifications from you."] = "Profilo limitato. Questa persona non sarà in grado di ricevere notifiche personali da te."; $a->strings["Unable to retrieve contact information."] = "Impossibile recuperare informazioni sul contatto."; -$a->strings["A deleted group with this name was revived. Existing item permissions may apply to this group and any future members. If this is not what you intended, please create another group with a different name."] = "Un gruppo eliminato con questo nome è stato ricreato. I permessi esistenti su un elemento possono essere applicati a questo gruppo e tutti i membri futuri. Se questo non è ciò che si intende, si prega di creare un altro gruppo con un nome diverso."; -$a->strings["Default privacy group for new contacts"] = "Gruppo predefinito per i nuovi contatti"; -$a->strings["Everybody"] = "Tutti"; -$a->strings["edit"] = "modifica"; -$a->strings["Groups"] = "Gruppi"; -$a->strings["Edit groups"] = "Modifica gruppi"; -$a->strings["Edit group"] = "Modifica gruppo"; -$a->strings["Create a new group"] = "Crea un nuovo gruppo"; -$a->strings["Group Name: "] = "Nome del gruppo:"; -$a->strings["Contacts not in any group"] = "Contatti in nessun gruppo."; -$a->strings["add"] = "aggiungi"; $a->strings["Requested account is not available."] = "L'account richiesto non è disponibile."; $a->strings["Requested profile is not available."] = "Profilo richiesto non disponibile."; $a->strings["Edit profile"] = "Modifica il profilo"; @@ -621,50 +623,17 @@ $a->strings["Profile Details"] = "Dettagli del profilo"; $a->strings["Photo Albums"] = "Album foto"; $a->strings["Personal Notes"] = "Note personali"; $a->strings["Only You Can See This"] = "Solo tu puoi vedere questo"; -$a->strings["view full size"] = "vedi a schermo intero"; -$a->strings["Embedded content"] = "Contenuto incorporato"; -$a->strings["Embedding disabled"] = "Embed disabilitato"; -$a->strings["Contact Photos"] = "Foto dei contatti"; -$a->strings["Passwords do not match. Password unchanged."] = "Le password non corrispondono. Password non cambiata."; -$a->strings["An invitation is required."] = "E' richiesto un invito."; -$a->strings["Invitation could not be verified."] = "L'invito non puo' essere verificato."; -$a->strings["Invalid OpenID url"] = "Url OpenID non valido"; -$a->strings["Please enter the required information."] = "Inserisci le informazioni richieste."; -$a->strings["Please use a shorter name."] = "Usa un nome più corto."; -$a->strings["Name too short."] = "Il nome è troppo corto."; -$a->strings["That doesn't appear to be your full (First Last) name."] = "Questo non sembra essere il tuo nome completo (Nome Cognome)."; -$a->strings["Your email domain is not among those allowed on this site."] = "Il dominio della tua email non è tra quelli autorizzati su questo sito."; -$a->strings["Not a valid email address."] = "L'indirizzo email non è valido."; -$a->strings["Cannot use that email."] = "Non puoi usare quell'email."; -$a->strings["Your \"nickname\" can only contain \"a-z\", \"0-9\" and \"_\"."] = "Il tuo nome utente può contenere solo \"a-z\", \"0-9\", e \"_\"."; -$a->strings["Nickname is already registered. Please choose another."] = "Nome utente già registrato. Scegline un altro."; -$a->strings["Nickname was once registered here and may not be re-used. Please choose another."] = "Questo nome utente stato già registrato. Per favore, sceglierne uno nuovo."; -$a->strings["SERIOUS ERROR: Generation of security keys failed."] = "ERRORE GRAVE: La generazione delle chiavi di sicurezza è fallita."; -$a->strings["An error occurred during registration. Please try again."] = "C'è stato un errore durante la registrazione. Prova ancora."; -$a->strings["default"] = "default"; -$a->strings["An error occurred creating your default profile. Please try again."] = "C'è stato un errore nella creazione del tuo profilo. Prova ancora."; -$a->strings["Profile Photos"] = "Foto del profilo"; -$a->strings["\n\t\tDear %1\$s,\n\t\t\tThank you for registering at %2\$s. Your account is pending for approval by the administrator.\n\t"] = "\nCaro %1\$s,\n Grazie per la tua registrazione su %2\$s. Il tuo account è in attesa di approvazione da parte di un amministratore.\n "; -$a->strings["Registration at %s"] = "Registrazione su %s"; -$a->strings["\n\t\tDear %1\$s,\n\t\t\tThank you for registering at %2\$s. Your account has been created.\n\t"] = "\nGentile %1\$s,\nGrazie per esserti registrato su %2\$s. Il tuo account è stato creato."; -$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."] = "\nI dettagli del tuo utente sono:\n Indirizzo del sito: %3\$s\n Nome utente: %1\$s\n Password: %5\$s\n\nPuoi cambiare la tua password dalla pagina delle impostazioni del tuo account dopo esserti autenticato.\n\nPer favore, prenditi qualche momento per esaminare tutte le impostazioni presenti.\n\nPotresti voler aggiungere qualche informazione di base al tuo profilo predefinito (nella pagina \"Profili\"), così che le altre persone possano trovarti più facilmente.\n\nTi raccomandiamo di inserire il tuo nome completo, aggiungere una foto, aggiungere qualche parola chiave del profilo (molto utili per trovare nuovi contatti), e magari in quale nazione vivi, se non vuoi essere più specifico di così.\n\nNoi rispettiamo appieno la tua privacy, e nessuna di queste informazioni è necessaria o obbligatoria.\nSe sei nuovo e non conosci nessuno qui, possono aiutarti a trovare qualche nuovo e interessante contatto.\n\nGrazie e benvenuto su %2\$s"; -$a->strings["Registration details for %s"] = "Dettagli della registrazione di %s"; -$a->strings["There are no tables on MyISAM."] = "Non ci sono tabelle MyISAM"; -$a->strings["\n\t\t\tThe friendica developers released update %s recently,\n\t\t\tbut when I tried to install it, something went terribly wrong.\n\t\t\tThis needs to be fixed soon and I can't do it alone. Please contact a\n\t\t\tfriendica developer if you can not help me on your own. My database might be invalid."] = "\nGli sviluppatori di Friendica hanno rilasciato l'aggiornamento %s\nrecentemente, ma quando ho provato a installarlo, qualcosa è \nandato terribilmente storto.\nBisogna sistemare le cose e non posso farlo da solo.\nContatta uno sviluppatore se non puoi aiutarmi da solo. Il mio database potrebbe essere invalido."; -$a->strings["The error message is\n[pre]%s[/pre]"] = "Il messaggio di errore è\n[pre]%s[/pre]"; -$a->strings["\nError %d occurred during database update:\n%s\n"] = "\nErrore %d durante l'aggiornamento del database:\n%s\n"; -$a->strings["Errors encountered performing database changes: "] = "Errori riscontrati eseguendo le modifiche al database:"; -$a->strings[": Database update"] = ": Aggiornamento database"; -$a->strings["%s: updating %s table."] = "%s: aggiornando la tabella %s."; -$a->strings["%s\\'s birthday"] = "compleanno di %s"; -$a->strings["Sharing notification from Diaspora network"] = "Notifica di condivisione dal network Diaspora*"; -$a->strings["Attachments:"] = "Allegati:"; $a->strings["[Name Withheld]"] = "[Nome Nascosto]"; $a->strings["Item not found."] = "Elemento non trovato."; $a->strings["Do you really want to delete this item?"] = "Vuoi veramente cancellare questo elemento?"; $a->strings["Yes"] = "Si"; $a->strings["Permission denied."] = "Permesso negato."; $a->strings["Archives"] = "Archivi"; +$a->strings["%1\$s is attending %2\$s's %3\$s"] = "%1\$s parteciperà a %3\$s di %2\$s"; +$a->strings["%1\$s is not attending %2\$s's %3\$s"] = "%1\$s non parteciperà a %3\$s di %2\$s"; +$a->strings["%1\$s may attend %2\$s's %3\$s"] = "%1\$s forse parteciperà a %3\$s di %2\$s"; +$a->strings["[no subject]"] = "[nessun oggetto]"; +$a->strings["view full size"] = "vedi a schermo intero"; $a->strings["%s is now following %s."] = "%s sta seguendo %s"; $a->strings["following"] = "segue"; $a->strings["%s stopped following %s."] = "%s ha smesso di seguire %s"; @@ -716,6 +685,8 @@ $a->strings["frustrated"] = "frustato"; $a->strings["motivated"] = "motivato"; $a->strings["relaxed"] = "rilassato"; $a->strings["surprised"] = "sorpreso"; +$a->strings["Sund"] = "Dom"; +$a->strings["Sep"] = "Set"; $a->strings["View Video"] = "Guarda Video"; $a->strings["bytes"] = "bytes"; $a->strings["Click to open/close"] = "Clicca per aprire/chiudere"; @@ -723,12 +694,45 @@ $a->strings["View on separate page"] = "Vedi in una pagina separata"; $a->strings["view on separate page"] = "vedi in una pagina separata"; $a->strings["activity"] = "attività"; $a->strings["comment"] = array( - 0 => "", - 1 => "commento", + 0 => "commento ", + 1 => "commenti", ); $a->strings["post"] = "messaggio"; $a->strings["Item filed"] = "Messaggio salvato"; -$a->strings["No friends to display."] = "Nessun amico da visualizzare."; +$a->strings["Error decoding account file"] = "Errore decodificando il file account"; +$a->strings["Error! No version data in file! This is not a Friendica account file?"] = "Errore! Nessuna informazione di versione nel file! Potrebbe non essere un file account di Friendica?"; +$a->strings["Error! Cannot check nickname"] = "Errore! Non posso controllare il nickname"; +$a->strings["User '%s' already exists on this server!"] = "L'utente '%s' esiste già su questo server!"; +$a->strings["User creation error"] = "Errore creando l'utente"; +$a->strings["User profile creation error"] = "Errore creando il profilo dell'utente"; +$a->strings["%d contact not imported"] = array( + 0 => "%d contatto non importato", + 1 => "%d contatti non importati", +); +$a->strings["Done. You can now login with your username and password"] = "Fatto. Ora puoi entrare con il tuo nome utente e la tua password"; +$a->strings["Passwords do not match. Password unchanged."] = "Le password non corrispondono. Password non cambiata."; +$a->strings["An invitation is required."] = "E' richiesto un invito."; +$a->strings["Invitation could not be verified."] = "L'invito non puo' essere verificato."; +$a->strings["Invalid OpenID url"] = "Url OpenID non valido"; +$a->strings["Please enter the required information."] = "Inserisci le informazioni richieste."; +$a->strings["Please use a shorter name."] = "Usa un nome più corto."; +$a->strings["Name too short."] = "Il nome è troppo corto."; +$a->strings["That doesn't appear to be your full (First Last) name."] = "Questo non sembra essere il tuo nome completo (Nome Cognome)."; +$a->strings["Your email domain is not among those allowed on this site."] = "Il dominio della tua email non è tra quelli autorizzati su questo sito."; +$a->strings["Not a valid email address."] = "L'indirizzo email non è valido."; +$a->strings["Cannot use that email."] = "Non puoi usare quell'email."; +$a->strings["Your \"nickname\" can only contain \"a-z\", \"0-9\" and \"_\"."] = "Il tuo nome utente può contenere solo \"a-z\", \"0-9\", e \"_\"."; +$a->strings["Nickname is already registered. Please choose another."] = "Nome utente già registrato. Scegline un altro."; +$a->strings["Nickname was once registered here and may not be re-used. Please choose another."] = "Questo nome utente stato già registrato. Per favore, sceglierne uno nuovo."; +$a->strings["SERIOUS ERROR: Generation of security keys failed."] = "ERRORE GRAVE: La generazione delle chiavi di sicurezza è fallita."; +$a->strings["An error occurred during registration. Please try again."] = "C'è stato un errore durante la registrazione. Prova ancora."; +$a->strings["default"] = "default"; +$a->strings["An error occurred creating your default profile. Please try again."] = "C'è stato un errore nella creazione del tuo profilo. Prova ancora."; +$a->strings["\n\t\tDear %1\$s,\n\t\t\tThank you for registering at %2\$s. Your account is pending for approval by the administrator.\n\t"] = "\nCaro %1\$s,\n Grazie per la tua registrazione su %2\$s. Il tuo account è in attesa di approvazione da parte di un amministratore.\n "; +$a->strings["Registration at %s"] = "Registrazione su %s"; +$a->strings["\n\t\tDear %1\$s,\n\t\t\tThank you for registering at %2\$s. Your account has been created.\n\t"] = "\nGentile %1\$s,\nGrazie per esserti registrato su %2\$s. Il tuo account è stato creato."; +$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."] = "\nI dettagli del tuo utente sono:\n Indirizzo del sito: %3\$s\n Nome utente: %1\$s\n Password: %5\$s\n\nPuoi cambiare la tua password dalla pagina delle impostazioni del tuo account dopo esserti autenticato.\n\nPer favore, prenditi qualche momento per esaminare tutte le impostazioni presenti.\n\nPotresti voler aggiungere qualche informazione di base al tuo profilo predefinito (nella pagina \"Profili\"), così che le altre persone possano trovarti più facilmente.\n\nTi raccomandiamo di inserire il tuo nome completo, aggiungere una foto, aggiungere qualche parola chiave del profilo (molto utili per trovare nuovi contatti), e magari in quale nazione vivi, se non vuoi essere più specifico di così.\n\nNoi rispettiamo appieno la tua privacy, e nessuna di queste informazioni è necessaria o obbligatoria.\nSe sei nuovo e non conosci nessuno qui, possono aiutarti a trovare qualche nuovo e interessante contatto.\n\nGrazie e benvenuto su %2\$s"; +$a->strings["Registration details for %s"] = "Dettagli della registrazione di %s"; $a->strings["Authorize application connection"] = "Autorizza la connessione dell'applicazione"; $a->strings["Return to your app and insert this Securty Code:"] = "Torna alla tua applicazione e inserisci questo codice di sicurezza:"; $a->strings["Please login to continue."] = "Effettua il login per continuare."; @@ -739,143 +743,20 @@ $a->strings["Applications"] = "Applicazioni"; $a->strings["No installed applications."] = "Nessuna applicazione installata."; $a->strings["Item not available."] = "Oggetto non disponibile."; $a->strings["Item was not found."] = "Oggetto non trovato."; -$a->strings["The post was created"] = "Il messaggio è stato creato"; +$a->strings["Source (bbcode) text:"] = "Testo sorgente (bbcode):"; +$a->strings["Source (Diaspora) text to convert to BBcode:"] = "Testo sorgente (da Diaspora) da convertire in BBcode:"; +$a->strings["Source input: "] = "Sorgente:"; +$a->strings["bb2html (raw HTML): "] = "bb2html (HTML grezzo):"; +$a->strings["bb2html: "] = "bb2html:"; +$a->strings["bb2html2bb: "] = "bb2html2bb: "; +$a->strings["bb2md: "] = "bb2md: "; +$a->strings["bb2md2html: "] = "bb2md2html: "; +$a->strings["bb2dia2bb: "] = "bb2dia2bb: "; +$a->strings["bb2md2html2bb: "] = "bb2md2html2bb: "; +$a->strings["Source input (Diaspora format): "] = "Sorgente (formato Diaspora):"; +$a->strings["diaspora2bb: "] = "diaspora2bb: "; $a->strings["No contacts in common."] = "Nessun contatto in comune."; $a->strings["Common Friends"] = "Amici in comune"; -$a->strings["%d contact edited."] = array( - 0 => "%d contatto modificato.", - 1 => "%d contatti modificati", -); -$a->strings["Could not access contact record."] = "Non è possibile accedere al contatto."; -$a->strings["Could not locate selected profile."] = "Non riesco a trovare il profilo selezionato."; -$a->strings["Contact updated."] = "Contatto aggiornato."; -$a->strings["Failed to update contact record."] = "Errore nell'aggiornamento del contatto."; -$a->strings["Contact has been blocked"] = "Il contatto è stato bloccato"; -$a->strings["Contact has been unblocked"] = "Il contatto è stato sbloccato"; -$a->strings["Contact has been ignored"] = "Il contatto è ignorato"; -$a->strings["Contact has been unignored"] = "Il contatto non è più ignorato"; -$a->strings["Contact has been archived"] = "Il contatto è stato archiviato"; -$a->strings["Contact has been unarchived"] = "Il contatto è stato dearchiviato"; -$a->strings["Drop contact"] = "Cancella contatto"; -$a->strings["Do you really want to delete this contact?"] = "Vuoi veramente cancellare questo contatto?"; -$a->strings["Contact has been removed."] = "Il contatto è stato rimosso."; -$a->strings["You are mutual friends with %s"] = "Sei amico reciproco con %s"; -$a->strings["You are sharing with %s"] = "Stai condividendo con %s"; -$a->strings["%s is sharing with you"] = "%s sta condividendo con te"; -$a->strings["Private communications are not available for this contact."] = "Le comunicazioni private non sono disponibili per questo contatto."; -$a->strings["Never"] = "Mai"; -$a->strings["(Update was successful)"] = "(L'aggiornamento è stato completato)"; -$a->strings["(Update was not successful)"] = "(L'aggiornamento non è stato completato)"; -$a->strings["Suggest friends"] = "Suggerisci amici"; -$a->strings["Network type: %s"] = "Tipo di rete: %s"; -$a->strings["Communications lost with this contact!"] = "Comunicazione con questo contatto persa!"; -$a->strings["Fetch further information for feeds"] = "Recupera maggiori informazioni per i feed"; -$a->strings["Disabled"] = "Disabilitato"; -$a->strings["Fetch information"] = "Recupera informazioni"; -$a->strings["Fetch information and keywords"] = "Recupera informazioni e parole chiave"; -$a->strings["Contact"] = "Contatto"; -$a->strings["Submit"] = "Invia"; -$a->strings["Profile Visibility"] = "Visibilità del profilo"; -$a->strings["Please choose the profile you would like to display to %s when viewing your profile securely."] = "Seleziona il profilo che vuoi mostrare a %s quando visita il tuo profilo in modo sicuro."; -$a->strings["Contact Information / Notes"] = "Informazioni / Note sul contatto"; -$a->strings["Edit contact notes"] = "Modifica note contatto"; -$a->strings["Visit %s's profile [%s]"] = "Visita il profilo di %s [%s]"; -$a->strings["Block/Unblock contact"] = "Blocca/Sblocca contatto"; -$a->strings["Ignore contact"] = "Ignora il contatto"; -$a->strings["Repair URL settings"] = "Impostazioni riparazione URL"; -$a->strings["View conversations"] = "Vedi conversazioni"; -$a->strings["Last update:"] = "Ultimo aggiornamento:"; -$a->strings["Update public posts"] = "Aggiorna messaggi pubblici"; -$a->strings["Update now"] = "Aggiorna adesso"; -$a->strings["Unblock"] = "Sblocca"; -$a->strings["Block"] = "Blocca"; -$a->strings["Unignore"] = "Non ignorare"; -$a->strings["Ignore"] = "Ignora"; -$a->strings["Currently blocked"] = "Bloccato"; -$a->strings["Currently ignored"] = "Ignorato"; -$a->strings["Currently archived"] = "Al momento archiviato"; -$a->strings["Hide this contact from others"] = "Nascondi questo contatto agli altri"; -$a->strings["Replies/likes to your public posts may still be visible"] = "Risposte ai tuoi post pubblici possono essere comunque visibili"; -$a->strings["Notification for new posts"] = "Notifica per i nuovi messaggi"; -$a->strings["Send a notification of every new post of this contact"] = "Invia una notifica per ogni nuovo messaggio di questo contatto"; -$a->strings["Blacklisted keywords"] = "Parole chiave in blacklist"; -$a->strings["Comma separated list of keywords that should not be converted to hashtags, when \"Fetch information and keywords\" is selected"] = "Lista separata da virgola di parole chiave che non dovranno essere convertite in hashtag, quando \"Recupera informazioni e parole chiave\" è selezionato"; -$a->strings["Profile URL"] = "URL Profilo"; -$a->strings["Actions"] = "Azioni"; -$a->strings["Contact Settings"] = "Impostazioni Contatto"; -$a->strings["Suggestions"] = "Suggerimenti"; -$a->strings["Suggest potential friends"] = "Suggerisci potenziali amici"; -$a->strings["All Contacts"] = "Tutti i contatti"; -$a->strings["Show all contacts"] = "Mostra tutti i contatti"; -$a->strings["Unblocked"] = "Sbloccato"; -$a->strings["Only show unblocked contacts"] = "Mostra solo contatti non bloccati"; -$a->strings["Blocked"] = "Bloccato"; -$a->strings["Only show blocked contacts"] = "Mostra solo contatti bloccati"; -$a->strings["Ignored"] = "Ignorato"; -$a->strings["Only show ignored contacts"] = "Mostra solo contatti ignorati"; -$a->strings["Archived"] = "Archiviato"; -$a->strings["Only show archived contacts"] = "Mostra solo contatti archiviati"; -$a->strings["Hidden"] = "Nascosto"; -$a->strings["Only show hidden contacts"] = "Mostra solo contatti nascosti"; -$a->strings["Search your contacts"] = "Cerca nei tuoi contatti"; -$a->strings["Results for: %s"] = "Risultati per: %s"; -$a->strings["Update"] = "Aggiorna"; -$a->strings["Archive"] = "Archivia"; -$a->strings["Unarchive"] = "Dearchivia"; -$a->strings["Batch Actions"] = "Azioni Batch"; -$a->strings["View all contacts"] = "Vedi tutti i contatti"; -$a->strings["View all common friends"] = "Vedi tutti gli amici in comune"; -$a->strings["Advanced Contact Settings"] = "Impostazioni avanzate Contatto"; -$a->strings["Mutual Friendship"] = "Amicizia reciproca"; -$a->strings["is a fan of yours"] = "è un tuo fan"; -$a->strings["you are a fan of"] = "sei un fan di"; -$a->strings["Edit contact"] = "Modifica contatto"; -$a->strings["Toggle Blocked status"] = "Inverti stato \"Blocca\""; -$a->strings["Toggle Ignored status"] = "Inverti stato \"Ignora\""; -$a->strings["Toggle Archive status"] = "Inverti stato \"Archiviato\""; -$a->strings["Delete contact"] = "Rimuovi contatto"; -$a->strings["No such group"] = "Nessun gruppo"; -$a->strings["Group is empty"] = "Il gruppo è vuoto"; -$a->strings["Group: %s"] = "Gruppo: %s"; -$a->strings["This entry was edited"] = "Questa voce è stata modificata"; -$a->strings["%d comment"] = array( - 0 => "%d commento", - 1 => "%d commenti", -); -$a->strings["Private Message"] = "Messaggio privato"; -$a->strings["I like this (toggle)"] = "Mi piace (clic per cambiare)"; -$a->strings["like"] = "mi piace"; -$a->strings["I don't like this (toggle)"] = "Non mi piace (clic per cambiare)"; -$a->strings["dislike"] = "non mi piace"; -$a->strings["Share this"] = "Condividi questo"; -$a->strings["share"] = "condividi"; -$a->strings["This is you"] = "Questo sei tu"; -$a->strings["Comment"] = "Commento"; -$a->strings["Bold"] = "Grassetto"; -$a->strings["Italic"] = "Corsivo"; -$a->strings["Underline"] = "Sottolineato"; -$a->strings["Quote"] = "Citazione"; -$a->strings["Code"] = "Codice"; -$a->strings["Image"] = "Immagine"; -$a->strings["Link"] = "Link"; -$a->strings["Video"] = "Video"; -$a->strings["Edit"] = "Modifica"; -$a->strings["add star"] = "aggiungi a speciali"; -$a->strings["remove star"] = "rimuovi da speciali"; -$a->strings["toggle star status"] = "Inverti stato preferito"; -$a->strings["starred"] = "preferito"; -$a->strings["add tag"] = "aggiungi tag"; -$a->strings["ignore thread"] = "ignora la discussione"; -$a->strings["unignore thread"] = "non ignorare la discussione"; -$a->strings["toggle ignore status"] = "inverti stato \"Ignora\""; -$a->strings["ignored"] = "ignorato"; -$a->strings["save to folder"] = "salva nella cartella"; -$a->strings["I will attend"] = "Parteciperò"; -$a->strings["I will not attend"] = "Non parteciperò"; -$a->strings["I might attend"] = "Forse parteciperò"; -$a->strings["to"] = "a"; -$a->strings["Wall-to-Wall"] = "Da bacheca a bacheca"; -$a->strings["via Wall-To-Wall:"] = "da bacheca a bacheca"; $a->strings["Credits"] = "Crediti"; $a->strings["Friendica is a community project, that would not be possible without the help of many people. Here is a list of those who have contributed to the code or the translation of Friendica. Thank you all!"] = "Friendica è un progetto comunitario, che non sarebbe stato possibile realizzare senza l'aiuto di molte persone.\nQuesta è una lista di chi ha contribuito al codice o alle traduzioni di Friendica. Grazie a tutti!"; $a->strings["Contact settings applied."] = "Contatto modificato."; @@ -888,6 +769,7 @@ $a->strings["Mirror as forwarded posting"] = "Duplica come messaggi ricondivisi" $a->strings["Mirror as my own posting"] = "Duplica come miei messaggi"; $a->strings["Return to contact editor"] = "Ritorna alla modifica contatto"; $a->strings["Refetch contact data"] = "Ricarica dati contatto"; +$a->strings["Submit"] = "Invia"; $a->strings["Remote Self"] = "Io remoto"; $a->strings["Mirror postings from this contact"] = "Ripeti i messaggi di questo contatto"; $a->strings["Mark this contact as remote_self, this will cause friendica to repost new entries from this contact."] = "Imposta questo contatto come 'io remoto', questo farà si che friendica re invii i nuovi messaggi da questo contatto."; @@ -900,90 +782,10 @@ $a->strings["Friend Confirm URL"] = "URL Conferma Amicizia"; $a->strings["Notification Endpoint URL"] = "URL Notifiche"; $a->strings["Poll/Feed URL"] = "URL Feed"; $a->strings["New photo from this URL"] = "Nuova foto da questo URL"; -$a->strings["No potential page delegates located."] = "Nessun potenziale delegato per la pagina è stato trovato."; -$a->strings["Delegates are able to manage all aspects of this account/page except for basic account settings. Please do not delegate your personal account to anybody that you do not trust completely."] = "I Delegati sono in grado di gestire tutti gli aspetti di questa pagina, tranne per le impostazioni di base dell'account. Non delegare il tuo account personale a nessuno di cui non ti fidi ciecamente."; -$a->strings["Existing Page Managers"] = "Gestori Pagina Esistenti"; -$a->strings["Existing Page Delegates"] = "Delegati Pagina Esistenti"; -$a->strings["Potential Delegates"] = "Delegati Potenziali"; -$a->strings["Remove"] = "Rimuovi"; -$a->strings["Add"] = "Aggiungi"; -$a->strings["No entries."] = "Nessuna voce."; -$a->strings["%1\$s welcomes %2\$s"] = "%s dà il benvenuto a %s"; -$a->strings["Public access denied."] = "Accesso negato."; -$a->strings["Global Directory"] = "Elenco globale"; -$a->strings["Find on this site"] = "Cerca nel sito"; -$a->strings["Results for:"] = "Risultati per:"; -$a->strings["Site Directory"] = "Elenco del sito"; -$a->strings["No entries (some entries may be hidden)."] = "Nessuna voce (qualche voce potrebbe essere nascosta)."; -$a->strings["Access to this profile has been restricted."] = "L'accesso a questo profilo è stato limitato."; -$a->strings["Item has been removed."] = "L'oggetto è stato rimosso."; -$a->strings["Item not found"] = "Oggetto non trovato"; -$a->strings["Edit post"] = "Modifica messaggio"; -$a->strings["Files"] = "File"; -$a->strings["Not Found"] = "Non trovato"; $a->strings["- select -"] = "- seleziona -"; -$a->strings["Friend suggestion sent."] = "Suggerimento di amicizia inviato."; -$a->strings["Suggest Friends"] = "Suggerisci amici"; -$a->strings["Suggest a friend for %s"] = "Suggerisci un amico a %s"; -$a->strings["No profile"] = "Nessun profilo"; -$a->strings["Help:"] = "Guida:"; -$a->strings["Page not found."] = "Pagina non trovata."; -$a->strings["Welcome to %s"] = "Benvenuto su %s"; -$a->strings["Total invitation limit exceeded."] = "Limite totale degli inviti superato."; -$a->strings["%s : Not a valid email address."] = "%s: non è un indirizzo email valido."; -$a->strings["Please join us on Friendica"] = "Unisciti a noi su Friendica"; -$a->strings["Invitation limit exceeded. Please contact your site administrator."] = "Limite degli inviti superato. Contatta l'amministratore del tuo sito."; -$a->strings["%s : Message delivery failed."] = "%s: la consegna del messaggio fallita."; -$a->strings["%d message sent."] = array( - 0 => "%d messaggio inviato.", - 1 => "%d messaggi inviati.", -); -$a->strings["You have no more invitations available"] = "Non hai altri inviti disponibili"; -$a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "Visita %s per una lista di siti pubblici a cui puoi iscriverti. I membri Friendica su altri siti possono collegarsi uno con l'altro, come con membri di molti altri social network."; -$a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "Per accettare questo invito, visita e registrati su %s o su un'altro sito web Friendica aperto al pubblico."; -$a->strings["Friendica sites all inter-connect to create a huge privacy-enhanced social web that is owned and controlled by its members. They can also connect with many traditional social networks. See %s for a list of alternate Friendica sites you can join."] = "I siti Friendica son tutti collegati tra loro per creare una grossa rete sociale rispettosa della privacy, posseduta e controllata dai suoi membri. I siti Friendica possono anche collegarsi a molti altri social network tradizionali. Vai su %s per una lista di siti Friendica alternativi a cui puoi iscriverti."; -$a->strings["Our apologies. This system is not currently configured to connect with other public sites or invite members."] = "Ci scusiamo, questo sistema non è configurato per collegarsi con altri siti pubblici o per invitare membri."; -$a->strings["Send invitations"] = "Invia inviti"; -$a->strings["Enter email addresses, one per line:"] = "Inserisci gli indirizzi email, uno per riga:"; -$a->strings["Your message:"] = "Il tuo messaggio:"; -$a->strings["You are cordially invited to join me and other close friends on Friendica - and help us to create a better social web."] = "Sei cordialmente invitato/a ad unirti a me e ad altri amici su Friendica, e ad aiutarci a creare una rete sociale migliore."; -$a->strings["You will need to supply this invitation code: \$invite_code"] = "Sarà necessario fornire questo codice invito: \$invite_code"; -$a->strings["Once you have registered, please connect with me via my profile page at:"] = "Una volta registrato, connettiti con me dal mio profilo:"; -$a->strings["For more information about the Friendica project and why we feel it is important, please visit http://friendica.com"] = "Per maggiori informazioni sul progetto Friendica e perché pensiamo sia importante, visita http://friendica.com"; -$a->strings["Time Conversion"] = "Conversione Ora"; -$a->strings["Friendica provides this service for sharing events with other networks and friends in unknown timezones."] = "Friendica fornisce questo servizio per la condivisione di eventi con altre reti e amici in fusi orari sconosciuti."; -$a->strings["UTC time: %s"] = "Ora UTC: %s"; -$a->strings["Current timezone: %s"] = "Fuso orario corrente: %s"; -$a->strings["Converted localtime: %s"] = "Ora locale convertita: %s"; -$a->strings["Please select your timezone:"] = "Selezionare il tuo fuso orario:"; $a->strings["Remote privacy information not available."] = "Informazioni remote sulla privacy non disponibili."; $a->strings["Visible to:"] = "Visibile a:"; -$a->strings["No valid account found."] = "Nessun account valido trovato."; -$a->strings["Password reset request issued. Check your email."] = "La richiesta per reimpostare la password è stata inviata. Controlla la tua email."; -$a->strings["\n\t\tDear %1\$s,\n\t\t\tA request was recently received at \"%2\$s\" to reset your account\n\t\tpassword. In order to confirm this request, please select the verification link\n\t\tbelow or paste it into your web browser address bar.\n\n\t\tIf you did NOT request this change, please DO NOT follow the link\n\t\tprovided and ignore and/or delete this email.\n\n\t\tYour password will not be changed unless we can verify that you\n\t\tissued this request."] = "\nGentile %1\$s,\n abbiamo ricevuto su \"%2\$s\" una richiesta di resettare la password del tuo account. Per confermare questa richiesta, selezionate il link di conferma qui sotto o incollatelo nella barra indirizzo del vostro browser.\n\nSe NON hai richiesto questa modifica, NON selezionare il link e ignora o cancella questa email.\n\nLa tua password non verrà modificata a meno che non possiamo verificare che tu abbia effettivamente richiesto la modifica."; -$a->strings["\n\t\tFollow this link to verify your identity:\n\n\t\t%1\$s\n\n\t\tYou will then receive a follow-up message containing the new password.\n\t\tYou may change that password from your account settings page after logging in.\n\n\t\tThe login details are as follows:\n\n\t\tSite Location:\t%2\$s\n\t\tLogin Name:\t%3\$s"] = "\nSegui questo link per verificare la tua identità:\n\n%1\$s\n\nRiceverai in un successivo messaggio la nuova password.\nPotrai cambiarla dalla pagina \"Impostazioni\" del tuo account dopo esserti autenticato.\n\nI dettagli del tuo account sono:\n Indirizzo del sito: %2\$s\n Nome utente: %3\$s"; -$a->strings["Password reset requested at %s"] = "Richiesta reimpostazione password su %s"; -$a->strings["Request could not be verified. (You may have previously submitted it.) Password reset failed."] = "La richiesta non può essere verificata. (Puoi averla già richiesta precedentemente). Reimpostazione password fallita."; -$a->strings["Password Reset"] = "Reimpostazione password"; -$a->strings["Your password has been reset as requested."] = "La tua password è stata reimpostata come richiesto."; -$a->strings["Your new password is"] = "La tua nuova password è"; -$a->strings["Save or copy your new password - and then"] = "Salva o copia la tua nuova password, quindi"; -$a->strings["click here to login"] = "clicca qui per entrare"; -$a->strings["Your password may be changed from the Settings page after successful login."] = "Puoi cambiare la tua password dalla pagina Impostazioni dopo aver effettuato l'accesso."; -$a->strings["\n\t\t\t\tDear %1\$s,\n\t\t\t\t\tYour password has been changed as requested. Please retain this\n\t\t\t\tinformation for your records (or change your password immediately to\n\t\t\t\tsomething that you will remember).\n\t\t\t"] = "\nGentile %1\$s,\n La tua password è stata modificata come richiesto.\nSalva questa password, o sostituiscila immediatamente con qualcosa che puoi ricordare."; -$a->strings["\n\t\t\t\tYour login details are as follows:\n\n\t\t\t\tSite Location:\t%1\$s\n\t\t\t\tLogin Name:\t%2\$s\n\t\t\t\tPassword:\t%3\$s\n\n\t\t\t\tYou may change that password from your account settings page after logging in.\n\t\t\t"] = "\nI dettagli del tuo account sono:\n\n Indirizzo del sito: %1\$s\n Nome utente: %2\$s\n Password: %3\$s\n\nPuoi cambiare questa password dalla pagina \"Impostazioni\" del tuo account dopo esserti autenticato."; -$a->strings["Your password has been changed at %s"] = "La tua password presso %s è stata cambiata"; -$a->strings["Forgot your Password?"] = "Hai dimenticato la password?"; -$a->strings["Enter your email address and submit to have your password reset. Then check your email for further instructions."] = "Inserisci il tuo indirizzo email per reimpostare la password."; -$a->strings["Nickname or Email: "] = "Nome utente o email: "; -$a->strings["Reset"] = "Reimposta"; $a->strings["System down for maintenance"] = "Sistema in manutenzione"; -$a->strings["No keywords to match. Please add keywords to your default profile."] = "Nessuna parola chiave per l'abbinamento. Aggiungi parole chiave al tuo profilo predefinito."; -$a->strings["is interested in:"] = "è interessato a:"; -$a->strings["Profile Match"] = "Profili corrispondenti"; -$a->strings["No matches"] = "Nessun risultato"; -$a->strings["Mood"] = "Umore"; -$a->strings["Set your current mood and tell your friends"] = "Condividi il tuo umore con i tuoi amici"; $a->strings["Welcome to Friendica"] = "Benvenuto su Friendica"; $a->strings["New Member Checklist"] = "Cose da fare per i Nuovi Utenti"; $a->strings["We would like to offer some tips and links to help make your experience enjoyable. Click any item to visit the relevant page. A link to this page will be visible from your home page for two weeks after your initial registration and then will quietly disappear."] = "Vorremmo offrirti qualche trucco e dei link alla guida per aiutarti ad avere un'esperienza divertente. Clicca su un qualsiasi elemento per visitare la relativa pagina. Un link a questa pagina sarà visibile nella tua home per due settimane dopo la tua registrazione."; @@ -1015,62 +817,20 @@ $a->strings["Friendica respects your privacy. By default, your posts will only s $a->strings["Getting Help"] = "Ottenere Aiuto"; $a->strings["Go to the Help Section"] = "Vai alla sezione Guida"; $a->strings["Our help pages may be consulted for detail on other program features and resources."] = "Le nostre pagine della guida possono essere consultate per avere dettagli su altre caratteristiche del programma e altre risorse."; +$a->strings["Visit %s's profile [%s]"] = "Visita il profilo di %s [%s]"; +$a->strings["Edit contact"] = "Modifica contatto"; $a->strings["Contacts who are not members of a group"] = "Contatti che non sono membri di un gruppo"; -$a->strings["No more system notifications."] = "Nessuna nuova notifica di sistema."; -$a->strings["System Notifications"] = "Notifiche di sistema"; -$a->strings["Post successful."] = "Inviato!"; -$a->strings["Subscribing to OStatus contacts"] = "Iscrizione a contatti OStatus"; -$a->strings["No contact provided."] = "Nessun contatto disponibile."; -$a->strings["Couldn't fetch information for contact."] = "Non è stato possibile recuperare le informazioni del contatto."; -$a->strings["Couldn't fetch friends for contact."] = "Non è stato possibile recuperare gli amici del contatto."; -$a->strings["Done"] = "Fatto"; -$a->strings["success"] = "successo"; -$a->strings["failed"] = "fallito"; -$a->strings["Keep this window open until done."] = "Tieni questa finestra aperta fino a che ha finito."; -$a->strings["Not Extended"] = "Not Extended"; -$a->strings["Poke/Prod"] = "Tocca/Pungola"; -$a->strings["poke, prod or do other things to somebody"] = "tocca, pungola o fai altre cose a qualcuno"; -$a->strings["Recipient"] = "Destinatario"; -$a->strings["Choose what you wish to do to recipient"] = "Scegli cosa vuoi fare al destinatario"; -$a->strings["Make this post private"] = "Rendi questo post privato"; -$a->strings["Image uploaded but image cropping failed."] = "L'immagine è stata caricata, ma il non è stato possibile ritagliarla."; -$a->strings["Image size reduction [%s] failed."] = "Il ridimensionamento dell'immagine [%s] è fallito."; -$a->strings["Shift-reload the page or clear browser cache if the new photo does not display immediately."] = "Ricarica la pagina con shift+F5 o cancella la cache del browser se la nuova foto non viene mostrata immediatamente."; -$a->strings["Unable to process image"] = "Impossibile elaborare l'immagine"; -$a->strings["Image exceeds size limit of %s"] = "La dimensione dell'immagine supera il limite di %s"; -$a->strings["Unable to process image."] = "Impossibile caricare l'immagine."; -$a->strings["Upload File:"] = "Carica un file:"; -$a->strings["Select a profile:"] = "Seleziona un profilo:"; -$a->strings["Upload"] = "Carica"; -$a->strings["or"] = "o"; -$a->strings["skip this step"] = "salta questo passaggio"; -$a->strings["select a photo from your photo albums"] = "seleziona una foto dai tuoi album"; -$a->strings["Crop Image"] = "Ritaglia immagine"; -$a->strings["Please adjust the image cropping for optimum viewing."] = "Ritaglia l'immagine per una visualizzazione migliore."; -$a->strings["Done Editing"] = "Finito"; -$a->strings["Image uploaded successfully."] = "Immagine caricata con successo."; -$a->strings["Image upload failed."] = "Caricamento immagine fallito."; $a->strings["Permission denied"] = "Permesso negato"; $a->strings["Invalid profile identifier."] = "Identificativo del profilo non valido."; $a->strings["Profile Visibility Editor"] = "Modifica visibilità del profilo"; $a->strings["Click on a contact to add or remove."] = "Clicca su un contatto per aggiungerlo o rimuoverlo."; $a->strings["Visible To"] = "Visibile a"; $a->strings["All Contacts (with secure profile access)"] = "Tutti i contatti (con profilo ad accesso sicuro)"; -$a->strings["Account approved."] = "Account approvato."; -$a->strings["Registration revoked for %s"] = "Registrazione revocata per %s"; -$a->strings["Please login."] = "Accedi."; -$a->strings["Remove My Account"] = "Rimuovi il mio account"; -$a->strings["This will completely remove your account. Once this has been done it is not recoverable."] = "Questo comando rimuoverà completamente il tuo account. Una volta rimosso non potrai più recuperarlo."; -$a->strings["Please enter your password for verification:"] = "Inserisci la tua password per verifica:"; -$a->strings["Resubscribing to OStatus contacts"] = "Risottoscrivi i contatti OStatus"; -$a->strings["Error"] = "Errore"; -$a->strings["%1\$s is following %2\$s's %3\$s"] = "%1\$s sta seguendo %3\$s di %2\$s"; -$a->strings["Do you really want to delete this suggestion?"] = "Vuoi veramente cancellare questo suggerimento?"; -$a->strings["No suggestions available. If this is a new site, please try again in 24 hours."] = "Nessun suggerimento disponibile. Se questo è un sito nuovo, riprova tra 24 ore."; -$a->strings["Ignore/Hide"] = "Ignora / Nascondi"; -$a->strings["Tag removed"] = "Tag rimosso"; -$a->strings["Remove Item Tag"] = "Rimuovi il tag"; -$a->strings["Select a tag to remove: "] = "Seleziona un tag da rimuovere: "; +$a->strings["[Embedded content - reload page to view]"] = "[Contenuto incorporato - ricarica la pagina per visualizzarlo correttamente]"; +$a->strings["Public access denied."] = "Accesso negato."; +$a->strings["No contacts."] = "Nessun contatto."; +$a->strings["Access denied."] = "Accesso negato."; +$a->strings["Only logged in users are permitted to perform a probing."] = "Solo agli utenti loggati è permesso effettuare un probe."; $a->strings["This site has exceeded the number of allowed daily account registrations. Please try again tomorrow."] = "Questo sito ha superato il numero di registrazioni giornaliere consentite. Prova di nuovo domani."; $a->strings["Import"] = "Importa"; $a->strings["Move account"] = "Muovi account"; @@ -1079,37 +839,11 @@ $a->strings["You need to export your account from the old server and upload it h $a->strings["This feature is experimental. We can't import contacts from the OStatus network (GNU Social/Statusnet) or from Diaspora"] = "Questa funzione è sperimentale. Non possiamo importare i contatti dalla rete OStatus (GNU Social/Statusnet) o da Diaspora"; $a->strings["Account file"] = "File account"; $a->strings["To export your account, go to \"Settings->Export your personal data\" and select \"Export account\""] = "Per esportare il tuo account, vai su \"Impostazioni -> Esporta i tuoi dati personali\" e seleziona \"Esporta account\""; -$a->strings["[Embedded content - reload page to view]"] = "[Contenuto incorporato - ricarica la pagina per visualizzarlo correttamente]"; -$a->strings["No contacts."] = "Nessun contatto."; -$a->strings["Access denied."] = "Accesso negato."; -$a->strings["Invalid request."] = "Richiesta non valida."; -$a->strings["Sorry, maybe your upload is bigger than the PHP configuration allows"] = "Mi spiace, forse il file che stai caricando è più grosso di quanto la configurazione di PHP permetta"; -$a->strings["Or - did you try to upload an empty file?"] = "O.. non avrai provato a caricare un file vuoto?"; -$a->strings["File exceeds size limit of %s"] = "Il file supera la dimensione massima di %s"; -$a->strings["File upload failed."] = "Caricamento del file non riuscito."; -$a->strings["Number of daily wall messages for %s exceeded. Message failed."] = "Numero giornaliero di messaggi per %s superato. Invio fallito."; -$a->strings["No recipient selected."] = "Nessun destinatario selezionato."; -$a->strings["Unable to check your home location."] = "Impossibile controllare la tua posizione di origine."; -$a->strings["Message could not be sent."] = "Il messaggio non può essere inviato."; -$a->strings["Message collection failure."] = "Errore recuperando il messaggio."; -$a->strings["Message sent."] = "Messaggio inviato."; -$a->strings["No recipient."] = "Nessun destinatario."; -$a->strings["Send Private Message"] = "Invia un messaggio privato"; -$a->strings["If you wish for %s to respond, please check that the privacy settings on your site allow private mail from unknown senders."] = "Se vuoi che %s ti risponda, controlla che le tue impostazioni di privacy permettano la ricezione di messaggi privati da mittenti sconosciuti."; -$a->strings["To:"] = "A:"; -$a->strings["Subject:"] = "Oggetto:"; -$a->strings["Source (bbcode) text:"] = "Testo sorgente (bbcode):"; -$a->strings["Source (Diaspora) text to convert to BBcode:"] = "Testo sorgente (da Diaspora) da convertire in BBcode:"; -$a->strings["Source input: "] = "Sorgente:"; -$a->strings["bb2html (raw HTML): "] = "bb2html (HTML grezzo):"; -$a->strings["bb2html: "] = "bb2html:"; -$a->strings["bb2html2bb: "] = "bb2html2bb: "; -$a->strings["bb2md: "] = "bb2md: "; -$a->strings["bb2md2html: "] = "bb2md2html: "; -$a->strings["bb2dia2bb: "] = "bb2dia2bb: "; -$a->strings["bb2md2html2bb: "] = "bb2md2html2bb: "; -$a->strings["Source input (Diaspora format): "] = "Sorgente (formato Diaspora):"; -$a->strings["diaspora2bb: "] = "diaspora2bb: "; +$a->strings["Not available."] = "Non disponibile."; +$a->strings["No results."] = "Nessun risultato."; +$a->strings["No friends to display."] = "Nessun amico da visualizzare."; +$a->strings["The post was created"] = "Il messaggio è stato creato"; +$a->strings["Access to this profile has been restricted."] = "L'accesso a questo profilo è stato limitato."; $a->strings["View"] = "Mostra"; $a->strings["Previous"] = "Precedente"; $a->strings["Next"] = "Successivo"; @@ -1118,26 +852,7 @@ $a->strings["User not found"] = "Utente non trovato"; $a->strings["This calendar format is not supported"] = "Questo formato di calendario non è supportato"; $a->strings["No exportable data found"] = "Nessun dato esportabile trovato"; $a->strings["calendar"] = "calendario"; -$a->strings["Not available."] = "Non disponibile."; -$a->strings["No results."] = "Nessun risultato."; -$a->strings["Profile not found."] = "Profilo non trovato."; -$a->strings["This may occasionally happen if contact was requested by both persons and it has already been approved."] = "Questo può accadere occasionalmente se la richiesta di contatto era stata inviata da entrambe le persone e già approvata."; -$a->strings["Response from remote site was not understood."] = "Errore di comunicazione con l'altro sito."; -$a->strings["Unexpected response from remote site: "] = "La risposta dell'altro sito non può essere gestita: "; -$a->strings["Confirmation completed successfully."] = "Conferma completata con successo."; -$a->strings["Remote site reported: "] = "Il sito remoto riporta: "; -$a->strings["Temporary failure. Please wait and try again."] = "Problema temporaneo. Attendi e riprova."; -$a->strings["Introduction failed or was revoked."] = "La presentazione ha generato un errore o è stata revocata."; -$a->strings["Unable to set contact photo."] = "Impossibile impostare la foto del contatto."; -$a->strings["No user record found for '%s' "] = "Nessun utente trovato '%s'"; -$a->strings["Our site encryption key is apparently messed up."] = "La nostra chiave di criptazione del sito sembra essere corrotta."; -$a->strings["Empty site URL was provided or URL could not be decrypted by us."] = "E' stato fornito un indirizzo vuoto o non possiamo decrittare l'indirizzo."; -$a->strings["Contact record was not found for you on our site."] = "Il contatto non è stato trovato sul nostro sito."; -$a->strings["Site public key not available in contact record for URL %s."] = "La chiave pubblica del sito non è disponibile per l'URL %s"; -$a->strings["The ID provided by your system is a duplicate on our system. It should work if you try again."] = "L'ID fornito dal tuo sistema è duplicato sul nostro sistema. Se riprovi dovrebbe funzionare."; -$a->strings["Unable to set your contact credentials on our system."] = "Impossibile impostare le credenziali del tuo contatto sul nostro sistema."; -$a->strings["Unable to update your contact profile details on our system"] = "Impossibile aggiornare i dettagli del tuo contatto sul nostro sistema"; -$a->strings["%1\$s has joined %2\$s"] = "%1\$s si è unito a %2\$s"; +$a->strings["%1\$s welcomes %2\$s"] = "%s dà il benvenuto a %s"; $a->strings["This introduction has already been accepted."] = "Questa presentazione è già stata accettata."; $a->strings["Profile location is not valid or does not contain profile information."] = "L'indirizzo del profilo non è valido o non contiene un profilo."; $a->strings["Warning: profile location has no identifiable owner name."] = "Attenzione: l'indirizzo del profilo non riporta il nome del proprietario."; @@ -1158,6 +873,7 @@ $a->strings["This account has not been configured for email. Request failed."] = $a->strings["You have already introduced yourself here."] = "Ti sei già presentato qui."; $a->strings["Apparently you are already friends with %s."] = "Pare che tu e %s siate già amici."; $a->strings["Invalid profile URL."] = "Indirizzo profilo non valido."; +$a->strings["Failed to update contact record."] = "Errore nell'aggiornamento del contatto."; $a->strings["Your introduction has been sent."] = "La tua presentazione è stata inviata."; $a->strings["Remote subscription can't be done for your network. Please subscribe directly on your system."] = "La richiesta di connessione remota non può essere effettuata per la tua rete. Invia la richiesta direttamente sul nostro sistema."; $a->strings["Please login to confirm introduction."] = "Accedi per confermare la presentazione."; @@ -1177,8 +893,701 @@ $a->strings["StatusNet/Federated Social Web"] = "StatusNet/Federated Social Web" $a->strings[" - please do not use this form. Instead, enter %s into your Diaspora search bar."] = " - per favore non usare questa form. Invece, inserisci %s nella tua barra di ricerca su Diaspora."; $a->strings["Your Identity Address:"] = "L'indirizzo della tua identità:"; $a->strings["Submit Request"] = "Invia richiesta"; +$a->strings["Item not found"] = "Oggetto non trovato"; +$a->strings["Edit post"] = "Modifica messaggio"; +$a->strings["Not Found"] = "Non trovato"; +$a->strings["Contact added"] = "Contatto aggiunto"; +$a->strings["You already added this contact."] = "Hai già aggiunto questo contatto."; +$a->strings["Diaspora support isn't enabled. Contact can't be added."] = "Il supporto Diaspora non è abilitato. Il contatto non può essere aggiunto."; +$a->strings["OStatus support is disabled. Contact can't be added."] = "Il supporto OStatus non è abilitato. Il contatto non può essere aggiunto."; +$a->strings["The network type couldn't be detected. Contact can't be added."] = "Non è possibile rilevare il tipo di rete. Il contatto non può essere aggiunto."; +$a->strings["Profile URL"] = "URL Profilo"; +$a->strings["Group created."] = "Gruppo creato."; +$a->strings["Could not create group."] = "Impossibile creare il gruppo."; +$a->strings["Group not found."] = "Gruppo non trovato."; +$a->strings["Group name changed."] = "Il nome del gruppo è cambiato."; +$a->strings["Save Group"] = "Salva gruppo"; +$a->strings["Create a group of contacts/friends."] = "Crea un gruppo di amici/contatti."; +$a->strings["Group removed."] = "Gruppo rimosso."; +$a->strings["Unable to remove group."] = "Impossibile rimuovere il gruppo."; +$a->strings["Delete Group"] = "Elimina Gruppo"; +$a->strings["Group Editor"] = "Modifica gruppo"; +$a->strings["Edit Group Name"] = "Modifica Nome Gruppo"; +$a->strings["Members"] = "Membri"; +$a->strings["All Contacts"] = "Tutti i contatti"; +$a->strings["Group is empty"] = "Il gruppo è vuoto"; +$a->strings["Remove Contact"] = "Rimuovi Contatto"; +$a->strings["Add Contact"] = "Aggiungi Contatto"; +$a->strings["No profile"] = "Nessun profilo"; +$a->strings["Help:"] = "Guida:"; +$a->strings["Page not found."] = "Pagina non trovata."; +$a->strings["Welcome to %s"] = "Benvenuto su %s"; +$a->strings["Total invitation limit exceeded."] = "Limite totale degli inviti superato."; +$a->strings["%s : Not a valid email address."] = "%s: non è un indirizzo email valido."; +$a->strings["Please join us on Friendica"] = "Unisciti a noi su Friendica"; +$a->strings["Invitation limit exceeded. Please contact your site administrator."] = "Limite degli inviti superato. Contatta l'amministratore del tuo sito."; +$a->strings["%s : Message delivery failed."] = "%s: la consegna del messaggio fallita."; +$a->strings["%d message sent."] = array( + 0 => "%d messaggio inviato.", + 1 => "%d messaggi inviati.", +); +$a->strings["You have no more invitations available"] = "Non hai altri inviti disponibili"; +$a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "Visita %s per una lista di siti pubblici a cui puoi iscriverti. I membri Friendica su altri siti possono collegarsi uno con l'altro, come con membri di molti altri social network."; +$a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "Per accettare questo invito, visita e registrati su %s o su un'altro sito web Friendica aperto al pubblico."; +$a->strings["Friendica sites all inter-connect to create a huge privacy-enhanced social web that is owned and controlled by its members. They can also connect with many traditional social networks. See %s for a list of alternate Friendica sites you can join."] = "I siti Friendica son tutti collegati tra loro per creare una grossa rete sociale rispettosa della privacy, posseduta e controllata dai suoi membri. I siti Friendica possono anche collegarsi a molti altri social network tradizionali. Vai su %s per una lista di siti Friendica alternativi a cui puoi iscriverti."; +$a->strings["Our apologies. This system is not currently configured to connect with other public sites or invite members."] = "Ci scusiamo, questo sistema non è configurato per collegarsi con altri siti pubblici o per invitare membri."; +$a->strings["To accept this invitation, please visit and register at %s."] = "Per accettare questo invito, visita e registrati su %s"; +$a->strings["Friendica sites all inter-connect to create a huge privacy-enhanced social web that is owned and controlled by its members. They can also connect with many traditional social networks."] = ""; +$a->strings["Send invitations"] = "Invia inviti"; +$a->strings["Enter email addresses, one per line:"] = "Inserisci gli indirizzi email, uno per riga:"; +$a->strings["Your message:"] = "Il tuo messaggio:"; +$a->strings["You are cordially invited to join me and other close friends on Friendica - and help us to create a better social web."] = "Sei cordialmente invitato/a ad unirti a me e ad altri amici su Friendica, e ad aiutarci a creare una rete sociale migliore."; +$a->strings["You will need to supply this invitation code: \$invite_code"] = "Sarà necessario fornire questo codice invito: \$invite_code"; +$a->strings["Once you have registered, please connect with me via my profile page at:"] = "Una volta registrato, connettiti con me dal mio profilo:"; +$a->strings["For more information about the Friendica project and why we feel it is important, please visit http://friendi.ca"] = "Per maggiori informazioni sul progetto Friendica e perchè pensiamo sia importante, visita http://friendi.ca "; +$a->strings["Time Conversion"] = "Conversione Ora"; +$a->strings["Friendica provides this service for sharing events with other networks and friends in unknown timezones."] = "Friendica fornisce questo servizio per la condivisione di eventi con altre reti e amici in fusi orari sconosciuti."; +$a->strings["UTC time: %s"] = "Ora UTC: %s"; +$a->strings["Current timezone: %s"] = "Fuso orario corrente: %s"; +$a->strings["Converted localtime: %s"] = "Ora locale convertita: %s"; +$a->strings["Please select your timezone:"] = "Selezionare il tuo fuso orario:"; +$a->strings["No valid account found."] = "Nessun account valido trovato."; +$a->strings["Password reset request issued. Check your email."] = "La richiesta per reimpostare la password è stata inviata. Controlla la tua email."; +$a->strings["\n\t\tDear %1\$s,\n\t\t\tA request was recently received at \"%2\$s\" to reset your account\n\t\tpassword. In order to confirm this request, please select the verification link\n\t\tbelow or paste it into your web browser address bar.\n\n\t\tIf you did NOT request this change, please DO NOT follow the link\n\t\tprovided and ignore and/or delete this email.\n\n\t\tYour password will not be changed unless we can verify that you\n\t\tissued this request."] = "\nGentile %1\$s,\n abbiamo ricevuto su \"%2\$s\" una richiesta di resettare la password del tuo account. Per confermare questa richiesta, selezionate il link di conferma qui sotto o incollatelo nella barra indirizzo del vostro browser.\n\nSe NON hai richiesto questa modifica, NON selezionare il link e ignora o cancella questa email.\n\nLa tua password non verrà modificata a meno che non possiamo verificare che tu abbia effettivamente richiesto la modifica."; +$a->strings["\n\t\tFollow this link to verify your identity:\n\n\t\t%1\$s\n\n\t\tYou will then receive a follow-up message containing the new password.\n\t\tYou may change that password from your account settings page after logging in.\n\n\t\tThe login details are as follows:\n\n\t\tSite Location:\t%2\$s\n\t\tLogin Name:\t%3\$s"] = "\nSegui questo link per verificare la tua identità:\n\n%1\$s\n\nRiceverai in un successivo messaggio la nuova password.\nPotrai cambiarla dalla pagina \"Impostazioni\" del tuo account dopo esserti autenticato.\n\nI dettagli del tuo account sono:\n Indirizzo del sito: %2\$s\n Nome utente: %3\$s"; +$a->strings["Password reset requested at %s"] = "Richiesta reimpostazione password su %s"; +$a->strings["Request could not be verified. (You may have previously submitted it.) Password reset failed."] = "La richiesta non può essere verificata. (Puoi averla già richiesta precedentemente). Reimpostazione password fallita."; +$a->strings["Password Reset"] = "Reimpostazione password"; +$a->strings["Your password has been reset as requested."] = "La tua password è stata reimpostata come richiesto."; +$a->strings["Your new password is"] = "La tua nuova password è"; +$a->strings["Save or copy your new password - and then"] = "Salva o copia la tua nuova password, quindi"; +$a->strings["click here to login"] = "clicca qui per entrare"; +$a->strings["Your password may be changed from the Settings page after successful login."] = "Puoi cambiare la tua password dalla pagina Impostazioni dopo aver effettuato l'accesso."; +$a->strings["\n\t\t\t\tDear %1\$s,\n\t\t\t\t\tYour password has been changed as requested. Please retain this\n\t\t\t\tinformation for your records (or change your password immediately to\n\t\t\t\tsomething that you will remember).\n\t\t\t"] = "\nGentile %1\$s,\n La tua password è stata modificata come richiesto.\nSalva questa password, o sostituiscila immediatamente con qualcosa che puoi ricordare."; +$a->strings["\n\t\t\t\tYour login details are as follows:\n\n\t\t\t\tSite Location:\t%1\$s\n\t\t\t\tLogin Name:\t%2\$s\n\t\t\t\tPassword:\t%3\$s\n\n\t\t\t\tYou may change that password from your account settings page after logging in.\n\t\t\t"] = "\nI dettagli del tuo account sono:\n\n Indirizzo del sito: %1\$s\n Nome utente: %2\$s\n Password: %3\$s\n\nPuoi cambiare questa password dalla pagina \"Impostazioni\" del tuo account dopo esserti autenticato."; +$a->strings["Your password has been changed at %s"] = "La tua password presso %s è stata cambiata"; +$a->strings["Forgot your Password?"] = "Hai dimenticato la password?"; +$a->strings["Enter your email address and submit to have your password reset. Then check your email for further instructions."] = "Inserisci il tuo indirizzo email per reimpostare la password."; +$a->strings["Nickname or Email: "] = "Nome utente o email: "; +$a->strings["Reset"] = "Reimposta"; +$a->strings["Manage Identities and/or Pages"] = "Gestisci identità e/o pagine"; +$a->strings["Toggle between different identities or community/group pages which share your account details or which you have been granted \"manage\" permissions"] = "Cambia tra differenti identità o pagine comunità/gruppi che condividono il tuo account o per cui hai i permessi di gestione"; +$a->strings["Select an identity to manage: "] = "Seleziona un'identità da gestire:"; +$a->strings["No keywords to match. Please add keywords to your default profile."] = "Nessuna parola chiave per l'abbinamento. Aggiungi parole chiave al tuo profilo predefinito."; +$a->strings["is interested in:"] = "è interessato a:"; +$a->strings["Profile Match"] = "Profili corrispondenti"; +$a->strings["No matches"] = "Nessun risultato"; +$a->strings["No recipient selected."] = "Nessun destinatario selezionato."; +$a->strings["Unable to locate contact information."] = "Impossibile trovare le informazioni del contatto."; +$a->strings["Message could not be sent."] = "Il messaggio non può essere inviato."; +$a->strings["Message collection failure."] = "Errore recuperando il messaggio."; +$a->strings["Message sent."] = "Messaggio inviato."; +$a->strings["Do you really want to delete this message?"] = "Vuoi veramente cancellare questo messaggio?"; +$a->strings["Message deleted."] = "Messaggio eliminato."; +$a->strings["Conversation removed."] = "Conversazione rimossa."; +$a->strings["Send Private Message"] = "Invia un messaggio privato"; +$a->strings["To:"] = "A:"; +$a->strings["Subject:"] = "Oggetto:"; +$a->strings["No messages."] = "Nessun messaggio."; +$a->strings["Message not available."] = "Messaggio non disponibile."; +$a->strings["Delete message"] = "Elimina il messaggio"; +$a->strings["Delete conversation"] = "Elimina la conversazione"; +$a->strings["No secure communications available. You may be able to respond from the sender's profile page."] = "Nessuna comunicazione sicura disponibile, Potresti essere in grado di rispondere dalla pagina del profilo del mittente."; +$a->strings["Send Reply"] = "Invia la risposta"; +$a->strings["Unknown sender - %s"] = "Mittente sconosciuto - %s"; +$a->strings["You and %s"] = "Tu e %s"; +$a->strings["%s and You"] = "%s e Tu"; +$a->strings["D, d M Y - g:i A"] = "D d M Y - G:i"; +$a->strings["%d message"] = array( + 0 => "%d messaggio", + 1 => "%d messaggi", +); +$a->strings["Invalid request identifier."] = "L'identificativo della richiesta non è valido."; +$a->strings["Discard"] = "Scarta"; +$a->strings["Ignore"] = "Ignora"; +$a->strings["Network Notifications"] = "Notifiche dalla rete"; +$a->strings["System Notifications"] = "Notifiche di sistema"; +$a->strings["Personal Notifications"] = "Notifiche personali"; +$a->strings["Home Notifications"] = "Notifiche bacheca"; +$a->strings["Show Ignored Requests"] = "Mostra richieste ignorate"; +$a->strings["Hide Ignored Requests"] = "Nascondi richieste ignorate"; +$a->strings["Notification type: "] = "Tipo di notifica: "; +$a->strings["suggested by %s"] = "suggerito da %s"; +$a->strings["Hide this contact from others"] = "Nascondi questo contatto agli altri"; +$a->strings["Post a new friend activity"] = "Invia una attività \"è ora amico con\""; +$a->strings["if applicable"] = "se applicabile"; +$a->strings["Approve"] = "Approva"; +$a->strings["Claims to be known to you: "] = "Dice di conoscerti: "; +$a->strings["yes"] = "si"; +$a->strings["no"] = "no"; +$a->strings["Shall your connection be bidirectional or not?"] = "La connessione dovrà essere bidirezionale o no?"; +$a->strings["Accepting %s as a friend allows %s to subscribe to your posts, and you will also receive updates from them in your news feed."] = "Accettando %s come amico permette a %s di seguire i tuoi post, e a te di riceverne gli aggiornamenti."; +$a->strings["Accepting %s as a subscriber allows them to subscribe to your posts, but you will not receive updates from them in your news feed."] = "Accentrando %s come abbonato gli permette di abbonarsi ai tuoi messaggi, ma tu non riceverai aggiornamenti da lui."; +$a->strings["Accepting %s as a sharer allows them to subscribe to your posts, but you will not receive updates from them in your news feed."] = "Accentando %s come condivisore, gli permetti di abbonarsi ai tuoi messaggi, ma tu non riceverai nessun aggiornamento da loro."; +$a->strings["Friend"] = "Amico"; +$a->strings["Sharer"] = "Condivisore"; +$a->strings["Subscriber"] = "Abbonato"; +$a->strings["No introductions."] = "Nessuna presentazione."; +$a->strings["Show unread"] = "Mostra non letti"; +$a->strings["Show all"] = "Mostra tutti"; +$a->strings["No more %s notifications."] = "Nessun'altra notifica %s."; +$a->strings["No more system notifications."] = "Nessuna nuova notifica di sistema."; +$a->strings["Post successful."] = "Inviato!"; +$a->strings["OpenID protocol error. No ID returned."] = "Errore protocollo OpenID. Nessun ID ricevuto."; +$a->strings["Account not found and OpenID registration is not permitted on this site."] = "L'account non è stato trovato, e la registrazione via OpenID non è permessa su questo sito."; +$a->strings["Not Extended"] = "Not Extended"; +$a->strings["Tips for New Members"] = "Consigli per i Nuovi Utenti"; +$a->strings["Remove My Account"] = "Rimuovi il mio account"; +$a->strings["This will completely remove your account. Once this has been done it is not recoverable."] = "Questo comando rimuoverà completamente il tuo account. Una volta rimosso non potrai più recuperarlo."; +$a->strings["Please enter your password for verification:"] = "Inserisci la tua password per verifica:"; +$a->strings["Resubscribing to OStatus contacts"] = "Risottoscrivi i contatti OStatus"; +$a->strings["Error"] = "Errore"; +$a->strings["Done"] = "Fatto"; +$a->strings["Keep this window open until done."] = "Tieni questa finestra aperta fino a che ha finito."; +$a->strings["%1\$s is following %2\$s's %3\$s"] = "%1\$s sta seguendo %3\$s di %2\$s"; +$a->strings["Tag removed"] = "Tag rimosso"; +$a->strings["Remove Item Tag"] = "Rimuovi il tag"; +$a->strings["Select a tag to remove: "] = "Seleziona un tag da rimuovere: "; +$a->strings["Remove"] = "Rimuovi"; +$a->strings["Export account"] = "Esporta account"; +$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."] = "Esporta le informazioni del tuo account e dei contatti. Usa questa funzione per fare un backup del tuo account o per spostarlo in un altro server."; +$a->strings["Export all"] = "Esporta tutto"; +$a->strings["Export your accout info, contacts and all your items as json. Could be a very big file, and could take a lot of time. Use this to make a full backup of your account (photos are not exported)"] = "Esporta le informazioni del tuo account, i tuoi contatti e tutti i tuoi elementi in json. Può diventare un file veramente molto grosso e metterci un sacco di tempo. Usa questa funzione per fare un backup completo del tuo account (le foto non sono esportate)"; +$a->strings["Export personal data"] = "Esporta dati personali"; +$a->strings["Number of daily wall messages for %s exceeded. Message failed."] = "Numero giornaliero di messaggi per %s superato. Invio fallito."; +$a->strings["Unable to check your home location."] = "Impossibile controllare la tua posizione di origine."; +$a->strings["No recipient."] = "Nessun destinatario."; +$a->strings["If you wish for %s to respond, please check that the privacy settings on your site allow private mail from unknown senders."] = "Se vuoi che %s ti risponda, controlla che le tue impostazioni di privacy permettano la ricezione di messaggi privati da mittenti sconosciuti."; +$a->strings["No potential page delegates located."] = "Nessun potenziale delegato per la pagina è stato trovato."; +$a->strings["Delegates are able to manage all aspects of this account/page except for basic account settings. Please do not delegate your personal account to anybody that you do not trust completely."] = "I Delegati sono in grado di gestire tutti gli aspetti di questa pagina, tranne per le impostazioni di base dell'account. Non delegare il tuo account personale a nessuno di cui non ti fidi ciecamente."; +$a->strings["Existing Page Managers"] = "Gestori Pagina Esistenti"; +$a->strings["Existing Page Delegates"] = "Delegati Pagina Esistenti"; +$a->strings["Potential Delegates"] = "Delegati Potenziali"; +$a->strings["Add"] = "Aggiungi"; +$a->strings["No entries."] = "Nessuna voce."; +$a->strings["Do you really want to delete this suggestion?"] = "Vuoi veramente cancellare questo suggerimento?"; +$a->strings["No suggestions available. If this is a new site, please try again in 24 hours."] = "Nessun suggerimento disponibile. Se questo è un sito nuovo, riprova tra 24 ore."; +$a->strings["Ignore/Hide"] = "Ignora / Nascondi"; +$a->strings["Global Directory"] = "Elenco globale"; +$a->strings["Find on this site"] = "Cerca nel sito"; +$a->strings["Results for:"] = "Risultati per:"; +$a->strings["Site Directory"] = "Elenco del sito"; +$a->strings["No entries (some entries may be hidden)."] = "Nessuna voce (qualche voce potrebbe essere nascosta)."; +$a->strings["Files"] = "File"; +$a->strings["This is Friendica, version"] = "Questo è Friendica, versione"; +$a->strings["running at web location"] = "in esecuzione all'indirizzo web"; +$a->strings["Please visit Friendi.ca to learn more about the Friendica project."] = "Visita Friendi.ca per saperne di più sul progetto Friendica."; +$a->strings["Bug reports and issues: please visit"] = "Segnalazioni di bug e problemi: visita"; +$a->strings["the bugtracker at github"] = "il bugtracker su github"; +$a->strings["Suggestions, praise, donations, etc. - please email \"Info\" at Friendica - dot com"] = "Suggerimenti, lodi, donazioni, ecc - e-mail a \"Info\" at Friendica punto com"; +$a->strings["Installed plugins/addons/apps:"] = "Plugin/componenti aggiuntivi/applicazioni installate"; +$a->strings["No installed plugins/addons/apps"] = "Nessun plugin/componente aggiuntivo/applicazione installata"; +$a->strings["On this server the following remote servers are blocked."] = "In questo server i seguenti server remoti sono bloccati."; +$a->strings["Reason for the block"] = "Motivazione del blocco"; +$a->strings["Friendica Communications Server - Setup"] = "Friendica Comunicazione Server - Impostazioni"; +$a->strings["Could not connect to database."] = " Impossibile collegarsi con il database."; +$a->strings["Could not create table."] = "Impossibile creare le tabelle."; +$a->strings["Your Friendica site database has been installed."] = "Il tuo Friendica è stato installato."; +$a->strings["You may need to import the file \"database.sql\" manually using phpmyadmin or mysql."] = "Potresti dover importare il file \"database.sql\" manualmente con phpmyadmin o mysql"; +$a->strings["Please see the file \"INSTALL.txt\"."] = "Leggi il file \"INSTALL.txt\"."; +$a->strings["Database already in use."] = "Database già in uso."; +$a->strings["System check"] = "Controllo sistema"; +$a->strings["Check again"] = "Controlla ancora"; +$a->strings["Database connection"] = "Connessione al database"; +$a->strings["In order to install Friendica we need to know how to connect to your database."] = "Per installare Friendica dobbiamo sapere come collegarci al tuo database."; +$a->strings["Please contact your hosting provider or site administrator if you have questions about these settings."] = "Contatta il tuo fornitore di hosting o l'amministratore del sito se hai domande su queste impostazioni."; +$a->strings["The database you specify below should already exist. If it does not, please create it before continuing."] = "Il database dovrà già esistere. Se non esiste, crealo prima di continuare."; +$a->strings["Database Server Name"] = "Nome del database server"; +$a->strings["Database Login Name"] = "Nome utente database"; +$a->strings["Database Login Password"] = "Password utente database"; +$a->strings["For security reasons the password must not be empty"] = "Per motivi di sicurezza la password non puo' essere vuota."; +$a->strings["Database Name"] = "Nome database"; +$a->strings["Site administrator email address"] = "Indirizzo email dell'amministratore del sito"; +$a->strings["Your account email address must match this in order to use the web admin panel."] = "Il tuo indirizzo email deve corrispondere a questo per poter usare il pannello di amministrazione web."; +$a->strings["Please select a default timezone for your website"] = "Seleziona il fuso orario predefinito per il tuo sito web"; +$a->strings["Site settings"] = "Impostazioni sito"; +$a->strings["System Language:"] = "Lingua di Sistema:"; +$a->strings["Set the default language for your Friendica installation interface and to send emails."] = "Imposta la lingua di default per l'interfaccia e l'invio delle email."; +$a->strings["Could not find a command line version of PHP in the web server PATH."] = "Non riesco a trovare la versione di PHP da riga di comando nel PATH del server web"; +$a->strings["If you don't have a command line version of PHP installed on server, you will not be able to run the background processing. See 'Setup the poller'"] = "Se non hai la versione a riga di comando di PHP installata sul tuo server, non sarai in grado di eseguire i processi in background. Vedi 'Setup the poller'"; +$a->strings["PHP executable path"] = "Percorso eseguibile PHP"; +$a->strings["Enter full path to php executable. You can leave this blank to continue the installation."] = "Inserisci il percorso completo all'eseguibile di php. Puoi lasciare bianco questo campo per continuare l'installazione."; +$a->strings["Command line PHP"] = "PHP da riga di comando"; +$a->strings["PHP executable is not the php cli binary (could be cgi-fgci version)"] = "L'eseguibile PHP non è il binario php cli (potrebbe essere la versione cgi-fcgi)"; +$a->strings["Found PHP version: "] = "Versione PHP:"; +$a->strings["PHP cli binary"] = "Binario PHP cli"; +$a->strings["The command line version of PHP on your system does not have \"register_argc_argv\" enabled."] = "La versione da riga di comando di PHP nel sistema non ha abilitato \"register_argc_argv\"."; +$a->strings["This is required for message delivery to work."] = "E' obbligatorio per far funzionare la consegna dei messaggi."; +$a->strings["PHP register_argc_argv"] = "PHP register_argc_argv"; +$a->strings["Error: the \"openssl_pkey_new\" function on this system is not able to generate encryption keys"] = "Errore: la funzione \"openssl_pkey_new\" in questo sistema non è in grado di generare le chiavi di criptazione"; +$a->strings["If running under Windows, please see \"http://www.php.net/manual/en/openssl.installation.php\"."] = "Se stai eseguendo friendika su windows, guarda \"http://www.php.net/manual/en/openssl.installation.php\"."; +$a->strings["Generate encryption keys"] = "Genera chiavi di criptazione"; +$a->strings["libCurl PHP module"] = "modulo PHP libCurl"; +$a->strings["GD graphics PHP module"] = "modulo PHP GD graphics"; +$a->strings["OpenSSL PHP module"] = "modulo PHP OpenSSL"; +$a->strings["PDO or MySQLi PHP module"] = "modulo PHP PDO o MySQLi"; +$a->strings["mb_string PHP module"] = "modulo PHP mb_string"; +$a->strings["XML PHP module"] = "Modulo PHP XML"; +$a->strings["iconv module"] = "modulo iconv"; +$a->strings["Apache mod_rewrite module"] = "Modulo mod_rewrite di Apache"; +$a->strings["Error: Apache webserver mod-rewrite module is required but not installed."] = "Errore: E' il modulo mod-rewrite di Apache è richiesto, ma non risulta installato"; +$a->strings["Error: libCURL PHP module required but not installed."] = "Errore: il modulo libCURL di PHP è richiesto, ma non risulta installato."; +$a->strings["Error: GD graphics PHP module with JPEG support required but not installed."] = "Errore: Il modulo GD graphics di PHP con supporto a JPEG è richiesto, ma non risulta installato."; +$a->strings["Error: openssl PHP module required but not installed."] = "Errore: il modulo openssl di PHP è richiesto, ma non risulta installato."; +$a->strings["Error: PDO or MySQLi PHP module required but not installed."] = "Errore: uno dei due moduli PHP PDO o MySQLi è richiesto ma non installato."; +$a->strings["Error: The MySQL driver for PDO is not installed."] = "Errore: il driver MySQL per PDO non è installato."; +$a->strings["Error: mb_string PHP module required but not installed."] = "Errore: il modulo PHP mb_string è richiesto, ma non risulta installato."; +$a->strings["Error: iconv PHP module required but not installed."] = "Errore: il modulo PHP iconv è richiesto ma non installato."; +$a->strings["Error, XML PHP module required but not installed."] = "Errore, il modulo PHP XML è richiesto ma non installato."; +$a->strings["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."] = "L'installazione web deve poter creare un file chiamato \".htconfig.php\" nella cartella principale del tuo web server ma non è in grado di farlo."; +$a->strings["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."] = "Ciò è dovuto spesso a impostazioni di permessi, dato che il web server può non essere in grado di scrivere il file nella tua cartella, anche se tu puoi."; +$a->strings["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."] = "Alla fine di questa procedura, di daremo un testo da salvare in un file chiamato .htconfig.php nella tua cartella principale di Friendica"; +$a->strings["You can alternatively skip this procedure and perform a manual installation. Please see the file \"INSTALL.txt\" for instructions."] = "Puoi in alternativa saltare questa procedura ed eseguire l'installazione manualmente. Vedi il file \"INSTALL.txt\" per le istruzioni."; +$a->strings[".htconfig.php is writable"] = ".htconfig.php è scrivibile"; +$a->strings["Friendica uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering."] = "Friendica usa il motore di template Smarty3 per renderizzare le sue pagine web. Smarty3 compila i template in PHP per velocizzare il rendering."; +$a->strings["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."] = "Per salvare questi template compilati, il server werb ha bisogno dell'accesso in scrittura alla cartella view/smarty3/ nella cartella principale dei Friendica."; +$a->strings["Please ensure that the user that your web server runs as (e.g. www-data) has write access to this folder."] = "Per favore, controlla che l'utente con cui il tuo server web gira (es www-data) ha accesso in scrittura a questa cartella."; +$a->strings["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."] = "Nota: come misura di sicurezza, dovresti dare accesso in scrittura solo alla cartella view/smarty3, non ai template (.tpl) che contiene."; +$a->strings["view/smarty3 is writable"] = "view/smarty3 è scrivibile"; +$a->strings["Url rewrite in .htaccess is not working. Check your server configuration."] = "La riscrittura degli url in .htaccess non funziona. Controlla la configurazione del tuo server."; +$a->strings["Url rewrite is working"] = "La riscrittura degli url funziona"; +$a->strings["ImageMagick PHP extension is not installed"] = "L'estensione PHP ImageMagick non è installata"; +$a->strings["ImageMagick PHP extension is installed"] = "L'estensione PHP ImageMagick è installata"; +$a->strings["ImageMagick supports GIF"] = "ImageMagick supporta i GIF"; +$a->strings["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."] = "Il file di configurazione del database \".htconfig.php\" non può essere scritto. Usa il testo qui di seguito per creare un file di configurazione nella cartella principale del tuo sito."; +$a->strings["

What next

"] = "

Cosa fare ora

"; +$a->strings["IMPORTANT: You will need to [manually] setup a scheduled task for the poller."] = "IMPORTANTE: Devi impostare [manualmente] la pianificazione del poller."; +$a->strings["Remove term"] = "Rimuovi termine"; +$a->strings["Only logged in users are permitted to perform a search."] = "Solo agli utenti autenticati è permesso eseguire ricerche."; +$a->strings["Too Many Requests"] = "Troppe richieste"; +$a->strings["Only one search per minute is permitted for not logged in users."] = "Solo una ricerca al minuto è permessa agli utenti non autenticati."; +$a->strings["Items tagged with: %s"] = "Elementi taggati con: %s"; +$a->strings["Results for: %s"] = "Risultati per: %s"; +$a->strings["Contact wasn't found or can't be unfollowed."] = ""; +$a->strings["Contact unfollowed"] = ""; +$a->strings["You aren't a friend of this contact."] = "Non sei un amico di questo contatto"; +$a->strings["Unfollowing is currently not supported by your network."] = ""; +$a->strings["Disconnect/Unfollow"] = "Disconnetti/Non Seguire"; +$a->strings["Theme settings updated."] = "Impostazioni del tema aggiornate."; +$a->strings["Site"] = "Sito"; +$a->strings["Users"] = "Utenti"; +$a->strings["Plugins"] = "Plugin"; +$a->strings["Themes"] = "Temi"; +$a->strings["Additional features"] = "Funzionalità aggiuntive"; +$a->strings["DB updates"] = "Aggiornamenti Database"; +$a->strings["Inspect Queue"] = "Ispeziona Coda di invio"; +$a->strings["Server Blocklist"] = "Server Blocklist"; +$a->strings["Federation Statistics"] = "Statistiche sulla Federazione"; +$a->strings["Delete Item"] = "Rimuovi elemento"; +$a->strings["Logs"] = "Log"; +$a->strings["View Logs"] = "Vedi i log"; +$a->strings["probe address"] = "controlla indirizzo"; +$a->strings["check webfinger"] = "verifica webfinger"; +$a->strings["Plugin Features"] = "Impostazioni Plugins"; +$a->strings["diagnostics"] = "diagnostiche"; +$a->strings["User registrations waiting for confirmation"] = "Utenti registrati in attesa di conferma"; +$a->strings["The blocked domain"] = "Il dominio bloccato"; +$a->strings["The reason why you blocked this domain."] = "Le ragioni per cui blocchi questo dominio."; +$a->strings["Delete domain"] = "Elimina dominio"; +$a->strings["Check to delete this entry from the blocklist"] = "Seleziona per eliminare questa voce dalla blocklist"; +$a->strings["Administration"] = "Amministrazione"; +$a->strings["This page can be used to define a black list of servers from the federated network that are not allowed to interact with your node. For all entered domains you should also give a reason why you have blocked the remote server."] = "Questa pagina puo' essere usata per definire una black list di server dal network federato a cui nono è permesso interagire col tuo nodo. Per ogni dominio inserito, dovresti anche riportare una ragione per cui hai bloccato il server remoto."; +$a->strings["The list of blocked servers will be made publically available on the /friendica page so that your users and people investigating communication problems can find the reason easily."] = "La lista di server bloccati sarà resa disponibile pubblicamente sulla pagina /friendica, così che i tuoi utenti e le persone che indagano su problemi di comunicazione possano trovarne la ragione facilmente."; +$a->strings["Add new entry to block list"] = "Aggiungi una nuova voce alla blocklist"; +$a->strings["Server Domain"] = "Dominio del Server"; +$a->strings["The domain of the new server to add to the block list. Do not include the protocol."] = "Il dominio del server da aggiungere alla blocklist. Non includere il protocollo."; +$a->strings["Block reason"] = "Ragione blocco"; +$a->strings["Add Entry"] = "Aggiungi Voce"; +$a->strings["Save changes to the blocklist"] = "Salva modifiche alla blocklist"; +$a->strings["Current Entries in the Blocklist"] = "Voci correnti nella blocklist"; +$a->strings["Delete entry from blocklist"] = "Elimina voce dalla blocklist"; +$a->strings["Delete entry from blocklist?"] = "Eliminare la voce dalla blocklist?"; +$a->strings["Server added to blocklist."] = "Server aggiunto alla blocklist."; +$a->strings["Site blocklist updated."] = "Blocklist del sito aggiornata."; +$a->strings["Delete this Item"] = "Rimuovi questo elemento"; +$a->strings["On this page you can delete an item from your node. If the item is a top level posting, the entire thread will be deleted."] = ""; +$a->strings["You need to know the GUID of the item. You can find it e.g. by looking at the display URL. The last part of http://example.com/display/123456 is the GUID, here 123456."] = ""; +$a->strings["GUID"] = ""; +$a->strings["The GUID of the item you want to delete."] = ""; +$a->strings["Item marked for deletion."] = ""; +$a->strings["unknown"] = "sconosciuto"; +$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."] = "Questa pagina offre alcuni numeri riguardo la porzione del social network federato di cui il tuo nodo Friendica fa parte. Questi numeri non sono completi ma riflettono esclusivamente la porzione di rete di cui il tuo nodo e' a conoscenza."; +$a->strings["The Auto Discovered Contact Directory feature is not enabled, it will improve the data displayed here."] = "La funzione Elenco Contatti Scoperto Automaticamente non è abilitata, migliorerà i dati visualizzati qui."; +$a->strings["Currently this node is aware of %d nodes from the following platforms:"] = "Attualmente questo nodo conosce %d nodi dalle seguenti piattaforme:"; +$a->strings["ID"] = "ID"; +$a->strings["Recipient Name"] = "Nome Destinatario"; +$a->strings["Recipient Profile"] = "Profilo Destinatario"; +$a->strings["Created"] = "Creato"; +$a->strings["Last Tried"] = "Ultimo Tentativo"; +$a->strings["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."] = "Questa pagina elenca il contenuto della coda di invio dei post. Questi sono post la cui consegna è fallita. Verranno inviati nuovamente più tardi ed eventualmente cancellati se la consegna continua a fallire."; +$a->strings["Your DB still runs with MyISAM tables. You should change the engine type to InnoDB. As Friendica will use InnoDB only features in the future, you should change this! See here for a guide that may be helpful converting the table engines. You may also use the command php include/dbstructure.php toinnodb of your Friendica installation for an automatic conversion.
"] = "Il tuo database contiene ancora tabelle MyISAM. Dovresti cambiare il motore a InnoDB. Siccome Friendica userà esclusivamente InnoDB nelle versioni a venire, dovresti cambiarle! Vedi qui per una guida che puo' essere d'aiuto nel convertire il motore delle tabelle. Puoi anche usare il comando php include/dbstructure.php toinnodb nella tua installazione Friendica per eseguire la conversione automaticamente.
"; +$a->strings["There is a new version of Friendica available for download. Your current version is %1\$s, upstream version is %2\$s"] = ""; +$a->strings["The database update failed. Please run \"php include/dbstructure.php update\" from the command line and have a look at the errors that might appear."] = ""; +$a->strings["The worker was never executed. Please check your database structure!"] = ""; +$a->strings["The last worker execution was on %s UTC. This is older than one hour. Please check your crontab settings."] = ""; +$a->strings["Normal Account"] = "Account normale"; +$a->strings["Automatic Follower Account"] = ""; +$a->strings["Public Forum Account"] = ""; +$a->strings["Automatic Friend Account"] = "Account per amicizia automatizzato"; +$a->strings["Blog Account"] = "Account Blog"; +$a->strings["Private Forum Account"] = ""; +$a->strings["Message queues"] = "Code messaggi"; +$a->strings["Summary"] = "Sommario"; +$a->strings["Registered users"] = "Utenti registrati"; +$a->strings["Pending registrations"] = "Registrazioni in attesa"; +$a->strings["Version"] = "Versione"; +$a->strings["Active plugins"] = "Plugin attivi"; +$a->strings["Can not parse base url. Must have at least ://"] = "Impossibile analizzare l'url base. Deve avere almeno [schema]://[dominio]"; +$a->strings["Site settings updated."] = "Impostazioni del sito aggiornate."; +$a->strings["No special theme for mobile devices"] = "Nessun tema speciale per i dispositivi mobili"; +$a->strings["No community page"] = "Nessuna pagina Comunità"; +$a->strings["Public postings from users of this site"] = "Messaggi pubblici dagli utenti di questo sito"; +$a->strings["Global community page"] = "Pagina Comunità globale"; +$a->strings["Never"] = "Mai"; +$a->strings["At post arrival"] = "All'arrivo di un messaggio"; +$a->strings["Disabled"] = "Disabilitato"; +$a->strings["Users, Global Contacts"] = "Utenti, Contatti Globali"; +$a->strings["Users, Global Contacts/fallback"] = "Utenti, Contatti Globali/fallback"; +$a->strings["One month"] = "Un mese"; +$a->strings["Three months"] = "Tre mesi"; +$a->strings["Half a year"] = "Sei mesi"; +$a->strings["One year"] = "Un anno"; +$a->strings["Multi user instance"] = "Istanza multi utente"; +$a->strings["Closed"] = "Chiusa"; +$a->strings["Requires approval"] = "Richiede l'approvazione"; +$a->strings["Open"] = "Aperta"; +$a->strings["No SSL policy, links will track page SSL state"] = "Nessuna gestione SSL, i link seguiranno lo stato SSL della pagina"; +$a->strings["Force all links to use SSL"] = "Forza tutti i link ad usare SSL"; +$a->strings["Self-signed certificate, use SSL for local links only (discouraged)"] = "Certificato auto-firmato, usa SSL solo per i link locali (sconsigliato)"; +$a->strings["Don't check"] = ""; +$a->strings["check the stable version"] = ""; +$a->strings["check the development version"] = ""; +$a->strings["Save Settings"] = "Salva Impostazioni"; +$a->strings["Republish users to directory"] = ""; +$a->strings["Registration"] = "Registrazione"; +$a->strings["File upload"] = "Caricamento file"; +$a->strings["Policies"] = "Politiche"; +$a->strings["Auto Discovered Contact Directory"] = "Elenco Contatti Scoperto Automaticamente"; +$a->strings["Performance"] = "Performance"; +$a->strings["Worker"] = "Worker"; +$a->strings["Relocate - WARNING: advanced function. Could make this server unreachable."] = "Trasloca - ATTENZIONE: funzione avanzata! Può rendere questo server irraggiungibile."; +$a->strings["Site name"] = "Nome del sito"; +$a->strings["Host name"] = "Nome host"; +$a->strings["Sender Email"] = "Mittente email"; +$a->strings["The email address your server shall use to send notification emails from."] = "L'indirizzo email che il tuo server dovrà usare per inviare notifiche via email."; +$a->strings["Banner/Logo"] = "Banner/Logo"; +$a->strings["Shortcut icon"] = "Icona shortcut"; +$a->strings["Link to an icon that will be used for browsers."] = "Link verso un'icona che verrà usata dai browser."; +$a->strings["Touch icon"] = "Icona touch"; +$a->strings["Link to an icon that will be used for tablets and mobiles."] = "Link verso un'icona che verrà usata dai tablet e i telefonini."; +$a->strings["Additional Info"] = "Informazioni aggiuntive"; +$a->strings["For public servers: you can add additional information here that will be listed at %s/siteinfo."] = "Per server pubblici: puoi aggiungere informazioni extra che verrano mostrate su %s/siteinfo."; +$a->strings["System language"] = "Lingua di sistema"; +$a->strings["System theme"] = "Tema di sistema"; +$a->strings["Default system theme - may be over-ridden by user profiles - change theme settings"] = "Tema di sistema - può essere sovrascritto dalle impostazioni utente - cambia le impostazioni del tema"; +$a->strings["Mobile system theme"] = "Tema mobile di sistema"; +$a->strings["Theme for mobile devices"] = "Tema per dispositivi mobili"; +$a->strings["SSL link policy"] = "Gestione link SSL"; +$a->strings["Determines whether generated links should be forced to use SSL"] = "Determina se i link generati devono essere forzati a usare SSL"; +$a->strings["Force SSL"] = "Forza SSL"; +$a->strings["Force all Non-SSL requests to SSL - Attention: on some systems it could lead to endless loops."] = "Forza tutte le richieste non SSL su SSL - Attenzione: su alcuni sistemi può portare a loop senza fine"; +$a->strings["Hide help entry from navigation menu"] = "Nascondi la voce 'Guida' dal menu di navigazione"; +$a->strings["Hides the menu entry for the Help pages from the navigation menu. You can still access it calling /help directly."] = "Nasconde la voce per le pagine della guida dal menu di navigazione. E' comunque possibile accedervi richiamando /help direttamente."; +$a->strings["Single user instance"] = "Istanza a singolo utente"; +$a->strings["Make this instance multi-user or single-user for the named user"] = "Rendi questa istanza multi utente o a singolo utente per l'utente selezionato"; +$a->strings["Maximum image size"] = "Massima dimensione immagini"; +$a->strings["Maximum size in bytes of uploaded images. Default is 0, which means no limits."] = "Massima dimensione in byte delle immagini caricate. Il default è 0, cioè nessun limite."; +$a->strings["Maximum image length"] = "Massima lunghezza immagine"; +$a->strings["Maximum length in pixels of the longest side of uploaded images. Default is -1, which means no limits."] = "Massima lunghezza in pixel del lato più lungo delle immagini caricate. Predefinito a -1, ovvero nessun limite."; +$a->strings["JPEG image quality"] = "Qualità immagini JPEG"; +$a->strings["Uploaded JPEGS will be saved at this quality setting [0-100]. Default is 100, which is full quality."] = "Le immagini JPEG caricate verranno salvate con questa qualità [0-100]. Predefinito è 100, ovvero qualità piena."; +$a->strings["Register policy"] = "Politica di registrazione"; +$a->strings["Maximum Daily Registrations"] = "Massime registrazioni giornaliere"; +$a->strings["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."] = "Se la registrazione è permessa, qui si definisce il massimo numero di nuovi utenti registrati da accettare giornalmente. Se la registrazione è chiusa, questa impostazione non ha effetto."; +$a->strings["Register text"] = "Testo registrazione"; +$a->strings["Will be displayed prominently on the registration page."] = "Sarà mostrato ben visibile nella pagina di registrazione."; +$a->strings["Accounts abandoned after x days"] = "Account abbandonati dopo x giorni"; +$a->strings["Will not waste system resources polling external sites for abandonded accounts. Enter 0 for no time limit."] = "Non spreca risorse di sistema controllando siti esterni per gli account abbandonati. Immettere 0 per nessun limite di tempo."; +$a->strings["Allowed friend domains"] = "Domini amici consentiti"; +$a->strings["Comma separated list of domains which are allowed to establish friendships with this site. Wildcards are accepted. Empty to allow any domains"] = "Elenco separato da virgola dei domini che possono stabilire amicizie con questo sito. Sono accettati caratteri jolly. Vuoto per accettare qualsiasi dominio."; +$a->strings["Allowed email domains"] = "Domini email consentiti"; +$a->strings["Comma separated list of domains which are allowed in email addresses for registrations to this site. Wildcards are accepted. Empty to allow any domains"] = "Elenco separato da virgola dei domini permessi come indirizzi email in fase di registrazione a questo sito. Sono accettati caratteri jolly. Lascalo vuoto per accettare qualsiasi dominio."; +$a->strings["Block public"] = "Blocca pagine pubbliche"; +$a->strings["Check to block public access to all otherwise public personal pages on this site unless you are currently logged in."] = "Seleziona per bloccare l'accesso pubblico a tutte le pagine personali di questo sito, a meno di essere loggato."; +$a->strings["Force publish"] = "Forza pubblicazione"; +$a->strings["Check to force all profiles on this site to be listed in the site directory."] = "Seleziona per forzare tutti i profili di questo sito ad essere compresi nell'elenco di questo sito."; +$a->strings["Global directory URL"] = "URL della directory globale"; +$a->strings["URL to the global directory. If this is not set, the global directory is completely unavailable to the application."] = "URL dell'elenco globale. Se vuoto, l'elenco globale sarà completamente disabilitato."; +$a->strings["Allow threaded items"] = "Permetti commenti nidificati"; +$a->strings["Allow infinite level threading for items on this site."] = "Permette un infinito livello di nidificazione dei commenti su questo sito."; +$a->strings["Private posts by default for new users"] = "Post privati di default per i nuovi utenti"; +$a->strings["Set default post permissions for all new members to the default privacy group rather than public."] = "Imposta i permessi predefiniti dei post per tutti i nuovi utenti come privati per il gruppo predefinito, invece che pubblici."; +$a->strings["Don't include post content in email notifications"] = "Non includere il contenuto dei post nelle notifiche via email"; +$a->strings["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."] = "Non include il contenuti del post/commento/messaggio privato/etc. nelle notifiche email che sono inviate da questo sito, per privacy"; +$a->strings["Disallow public access to addons listed in the apps menu."] = "Disabilita l'accesso pubblico ai plugin raccolti nel menu apps."; +$a->strings["Checking this box will restrict addons listed in the apps menu to members only."] = "Selezionando questo box si limiterà ai soli membri l'accesso ai componenti aggiuntivi nel menu applicazioni"; +$a->strings["Don't embed private images in posts"] = "Non inglobare immagini private nei post"; +$a->strings["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."] = "Non sostituire le foto locali nei post con una copia incorporata dell'immagine. Questo significa che i contatti che riceveranno i post contenenti foto private dovranno autenticarsi e caricare ogni immagine, cosa che può richiedere un po' di tempo."; +$a->strings["Allow Users to set remote_self"] = "Permetti agli utenti di impostare 'io remoto'"; +$a->strings["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."] = "Selezionando questo, a tutti gli utenti sarà permesso di impostare qualsiasi contatto come 'io remoto' nella pagina di modifica del contatto. Impostare questa opzione fa si che tutti i messaggi di quel contatto vengano ripetuti nello stream dell'utente."; +$a->strings["Block multiple registrations"] = "Blocca registrazioni multiple"; +$a->strings["Disallow users to register additional accounts for use as pages."] = "Non permette all'utente di registrare account extra da usare come pagine."; +$a->strings["OpenID support"] = "Supporto OpenID"; +$a->strings["OpenID support for registration and logins."] = "Supporta OpenID per la registrazione e il login"; +$a->strings["Fullname check"] = "Controllo nome completo"; +$a->strings["Force users to register with a space between firstname and lastname in Full name, as an antispam measure"] = "Forza gli utenti a registrarsi con uno spazio tra il nome e il cognome in \"Nome completo\", come misura anti spam"; +$a->strings["Community Page Style"] = "Stile pagina Comunità"; +$a->strings["Type of community page to show. 'Global community' shows every public posting from an open distributed network that arrived on this server."] = "Tipo di pagina Comunità da mostrare. 'Comunità Globale' mostra tutti i messaggi pubblici arrivati su questo server da network aperti distribuiti."; +$a->strings["Posts per user on community page"] = "Messaggi per utente nella pagina Comunità"; +$a->strings["The maximum number of posts per user on the community page. (Not valid for 'Global Community')"] = "Il numero massimo di messaggi per utente mostrato nella pagina Comunità (non valido per 'Comunità globale')"; +$a->strings["Enable OStatus support"] = "Abilita supporto OStatus"; +$a->strings["Provide built-in OStatus (StatusNet, GNU Social etc.) compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed."] = "Fornisce la compatibilità integrata a OStatus (StatusNet, Gnu Social, etc.). Tutte le comunicazioni su OStatus sono pubbliche, quindi un avviso di privacy verrà mostrato occasionalmente."; +$a->strings["Only import OStatus threads from our contacts"] = "Importa conversazioni OStatus solo dai nostri contatti."; +$a->strings["Normally we import every content from our OStatus contacts. With this option we only store threads that are started by a contact that is known on our system."] = "Normalmente importiamo tutto il contenuto dai contatti OStatus. Con questa opzione salviamo solo le conversazioni iniziate da un contatto è conosciuto a questo nodo."; +$a->strings["OStatus support can only be enabled if threading is enabled."] = "Il supporto OStatus può essere abilitato solo se è abilitato il threading."; +$a->strings["Diaspora support can't be enabled because Friendica was installed into a sub directory."] = "Il supporto a Diaspora non può essere abilitato perché Friendica è stato installato in una sotto directory."; +$a->strings["Enable Diaspora support"] = "Abilita il supporto a Diaspora"; +$a->strings["Provide built-in Diaspora network compatibility."] = "Fornisce compatibilità con il network Diaspora."; +$a->strings["Only allow Friendica contacts"] = "Permetti solo contatti Friendica"; +$a->strings["All contacts must use Friendica protocols. All other built-in communication protocols disabled."] = "Tutti i contatti devono usare il protocollo di Friendica. Tutti gli altri protocolli sono disabilitati."; +$a->strings["Verify SSL"] = "Verifica SSL"; +$a->strings["If you wish, you can turn on strict certificate checking. This will mean you cannot connect (at all) to self-signed SSL sites."] = "Se vuoi, puoi abilitare il controllo rigoroso dei certificati.Questo significa che non potrai collegarti (del tutto) con siti con certificati SSL auto-firmati."; +$a->strings["Proxy user"] = "Utente Proxy"; +$a->strings["Proxy URL"] = "URL Proxy"; +$a->strings["Network timeout"] = "Timeout rete"; +$a->strings["Value is in seconds. Set to 0 for unlimited (not recommended)."] = "Valore in secondi. Imposta a 0 per illimitato (non raccomandato)."; +$a->strings["Maximum Load Average"] = "Massimo carico medio"; +$a->strings["Maximum system load before delivery and poll processes are deferred - default 50."] = "Massimo carico di sistema prima che i processi di invio e di poll siano ritardati. Predefinito a 50."; +$a->strings["Maximum Load Average (Frontend)"] = "Media Massimo Carico (Frontend)"; +$a->strings["Maximum system load before the frontend quits service - default 50."] = "Massimo carico di sistema prima che il frontend fermi il servizio - default 50."; +$a->strings["Minimal Memory"] = "Memoria Minima"; +$a->strings["Minimal free memory in MB for the poller. Needs access to /proc/meminfo - default 0 (deactivated)."] = "Minima memoria libera in MB per il poller. Necessita di avere accesso a /proc/meminfo - default 0 (disabilitato)."; +$a->strings["Maximum table size for optimization"] = "Dimensione massima della tabella per l'ottimizzazione"; +$a->strings["Maximum table size (in MB) for the automatic optimization - default 100 MB. Enter -1 to disable it."] = "La dimensione massima (in MB) per l'ottimizzazione automatica - default 100 MB. Inserisci -1 per disabilitarlo."; +$a->strings["Minimum level of fragmentation"] = "Livello minimo di frammentazione"; +$a->strings["Minimum fragmenation level to start the automatic optimization - default value is 30%."] = "Livello minimo di frammentazione per iniziare la procedura di ottimizzazione automatica - il valore di default è 30%."; +$a->strings["Periodical check of global contacts"] = "Check periodico dei contatti globali"; +$a->strings["If enabled, the global contacts are checked periodically for missing or outdated data and the vitality of the contacts and servers."] = "Se abilitato, i contatti globali sono controllati periodicamente per verificare dati mancanti o sorpassati e la vitalità dei contatti e dei server."; +$a->strings["Days between requery"] = "Giorni tra le richieste"; +$a->strings["Number of days after which a server is requeried for his contacts."] = "Numero di giorni dopo i quali al server vengono richiesti i suoi contatti."; +$a->strings["Discover contacts from other servers"] = "Trova contatti dagli altri server"; +$a->strings["Periodically query other servers for contacts. You can choose between 'users': the users on the remote system, 'Global Contacts': active contacts that are known on the system. The fallback is meant for Redmatrix servers and older friendica servers, where global contacts weren't available. The fallback increases the server load, so the recommened setting is 'Users, Global Contacts'."] = "Richiede periodicamente contatti agli altri server. Puoi scegliere tra 'utenti', gli utenti sul sistema remoto, o 'contatti globali', i contatti attivi che sono conosciuti dal sistema. Il fallback è pensato per i server Redmatrix e i vecchi server Friendica, dove i contatti globali non sono disponibili. Il fallback incrementa il carico di sistema, per cui l'impostazione consigliata è \"Utenti, Contatti Globali\"."; +$a->strings["Timeframe for fetching global contacts"] = "Termine per il recupero contatti globali"; +$a->strings["When the discovery is activated, this value defines the timeframe for the activity of the global contacts that are fetched from other servers."] = "Quando si attiva la scoperta, questo valore definisce il periodo di tempo per l'attività dei contatti globali che vengono prelevati da altri server."; +$a->strings["Search the local directory"] = "Cerca la directory locale"; +$a->strings["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."] = "Cerca nella directory locale invece che nella directory globale. Durante la ricerca a livello locale, ogni ricerca verrà eseguita sulla directory globale in background. Ciò migliora i risultati della ricerca quando la ricerca viene ripetuta."; +$a->strings["Publish server information"] = "Pubblica informazioni server"; +$a->strings["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 profiles, number of posts and the activated protocols and connectors. See the-federation.info for details."] = "Se abilitata, saranno pubblicati i dati generali del server e i dati di utilizzo. I dati contengono il nome e la versione del server, il numero di utenti con profili pubblici, numero dei posti e dei protocolli e connettori attivati. Per informazioni, vedere the-federation.info ."; +$a->strings["Check upstream version"] = ""; +$a->strings["Enables checking for new Friendica versions at github. If there is a new version, you will be informed in the admin panel overview."] = ""; +$a->strings["Suppress Tags"] = "Sopprimi Tags"; +$a->strings["Suppress showing a list of hashtags at the end of the posting."] = "Non mostra la lista di hashtag in coda al messaggio"; +$a->strings["Path to item cache"] = "Percorso cache elementi"; +$a->strings["The item caches buffers generated bbcode and external images."] = "La cache degli elementi memorizza il bbcode generato e le immagini esterne."; +$a->strings["Cache duration in seconds"] = "Durata della cache in secondi"; +$a->strings["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."] = "Quanto a lungo devono essere mantenuti i file di cache? Il valore predefinito è 86400 secondi (un giorno). Per disabilitare la cache, imposta il valore a -1."; +$a->strings["Maximum numbers of comments per post"] = "Numero massimo di commenti per post"; +$a->strings["How much comments should be shown for each post? Default value is 100."] = "Quanti commenti devono essere mostrati per ogni post? Default : 100."; +$a->strings["Temp path"] = "Percorso file temporanei"; +$a->strings["If you have a restricted system where the webserver can't access the system temp path, enter another path here."] = "Se si dispone di un sistema ristretto in cui il server web non può accedere al percorso temporaneo di sistema, inserire un altro percorso qui."; +$a->strings["Base path to installation"] = "Percorso base all'installazione"; +$a->strings["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."] = "Se il sistema non è in grado di rilevare il percorso corretto per l'installazione, immettere il percorso corretto qui. Questa impostazione deve essere inserita solo se si utilizza un sistema limitato e/o collegamenti simbolici al tuo webroot."; +$a->strings["Disable picture proxy"] = "Disabilita il proxy immagini"; +$a->strings["The picture proxy increases performance and privacy. It shouldn't be used on systems with very low bandwith."] = "Il proxy immagini aumenta le performance e la privacy. Non dovrebbe essere usato su server con poca banda disponibile."; +$a->strings["Only search in tags"] = "Cerca solo nei tag"; +$a->strings["On large systems the text search can slow down the system extremely."] = "Su server con molti dati, la ricerca nel testo può estremamente rallentare il sistema."; +$a->strings["New base url"] = "Nuovo url base"; +$a->strings["Change base url for this server. Sends relocate message to all Friendica and Diaspora* contacts of all users."] = ""; +$a->strings["RINO Encryption"] = "Crittografia RINO"; +$a->strings["Encryption layer between nodes."] = "Crittografia delle comunicazioni tra nodi."; +$a->strings["Maximum number of parallel workers"] = "Massimo numero di lavori in parallelo"; +$a->strings["On shared hosters set this to 2. On larger systems, values of 10 are great. Default value is 4."] = "Su host condivisi imposta a 2. Su sistemi più grandi, valori fino a 10 vanno bene. Il valore di default è 4."; +$a->strings["Don't use 'proc_open' with the worker"] = "Non usare 'proc_open' con il worker"; +$a->strings["Enable this if your system doesn't allow the use of 'proc_open'. This can happen on shared hosters. If this is enabled you should increase the frequency of poller calls in your crontab."] = "Abilita se il tuo sistema non consente l'utilizzo di 'proc_open'. Può succedere con gli hosting condivisi. Se abiliti questa opzione, dovresti aumentare la frequenza delle chiamate al poller nel tuo crontab."; +$a->strings["Enable fastlane"] = "Abilita fastlane"; +$a->strings["When enabed, the fastlane mechanism starts an additional worker if processes with higher priority are blocked by processes of lower priority."] = "Quando abilitato, il meccanismo di fastlane avvia processi aggiuntivi se processi con priorità più alta sono bloccati da processi con priorità più bassa."; +$a->strings["Enable frontend worker"] = "Abilita worker da frontend"; +$a->strings["When enabled the Worker process is triggered when backend access is performed (e.g. messages being delivered). On smaller sites you might want to call %s/worker on a regular basis via an external cron job. You should only enable this option if you cannot utilize cron/scheduled jobs on your server."] = ""; +$a->strings["Update has been marked successful"] = "L'aggiornamento è stato segnato come di successo"; +$a->strings["Database structure update %s was successfully applied."] = "Aggiornamento struttura database %s applicata con successo."; +$a->strings["Executing of database structure update %s failed with error: %s"] = "Aggiornamento struttura database %s fallita con errore: %s"; +$a->strings["Executing %s failed with error: %s"] = "Esecuzione di %s fallita con errore: %s"; +$a->strings["Update %s was successfully applied."] = "L'aggiornamento %s è stato applicato con successo"; +$a->strings["Update %s did not return a status. Unknown if it succeeded."] = "L'aggiornamento %s non ha riportato uno stato. Non so se è andato a buon fine."; +$a->strings["There was no additional update function %s that needed to be called."] = "Non ci sono altre funzioni di aggiornamento %s da richiamare."; +$a->strings["No failed updates."] = "Nessun aggiornamento fallito."; +$a->strings["Check database structure"] = "Controlla struttura database"; +$a->strings["Failed Updates"] = "Aggiornamenti falliti"; +$a->strings["This does not include updates prior to 1139, which did not return a status."] = "Questo non include gli aggiornamenti prima del 1139, che non ritornano lo stato."; +$a->strings["Mark success (if update was manually applied)"] = "Segna completato (se l'update è stato applicato manualmente)"; +$a->strings["Attempt to execute this update step automatically"] = "Cerco di eseguire questo aggiornamento in automatico"; +$a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "\nGentile %1\$s,\n l'amministratore di %2\$s ha impostato un account per te."; +$a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "\nI dettagli del tuo utente sono:\n Indirizzo del sito: %1\$s\n Nome utente: %2\$s\n Password: %3\$s\n\nPuoi cambiare la tua password dalla pagina delle impostazioni del tuo account dopo esserti autenticato.\n\nPer favore, prenditi qualche momento per esaminare tutte le impostazioni presenti.\n\nPotresti voler aggiungere qualche informazione di base al tuo profilo predefinito (nella pagina \"Profili\"), così che le altre persone possano trovarti più facilmente.\n\nTi raccomandiamo di inserire il tuo nome completo, aggiungere una foto, aggiungere qualche parola chiave del profilo (molto utili per trovare nuovi contatti), e magari in quale nazione vivi, se non vuoi essere più specifico di così.\n\nNoi rispettiamo appieno la tua privacy, e nessuna di queste informazioni è necessaria o obbligatoria.\nSe sei nuovo e non conosci nessuno qui, possono aiutarti a trovare qualche nuovo e interessante contatto.\n\nGrazie e benvenuto su %4\$s"; +$a->strings["%s user blocked/unblocked"] = array( + 0 => "%s utente bloccato/sbloccato", + 1 => "%s utenti bloccati/sbloccati", +); +$a->strings["%s user deleted"] = array( + 0 => "%s utente cancellato", + 1 => "%s utenti cancellati", +); +$a->strings["User '%s' deleted"] = "Utente '%s' cancellato"; +$a->strings["User '%s' unblocked"] = "Utente '%s' sbloccato"; +$a->strings["User '%s' blocked"] = "Utente '%s' bloccato"; +$a->strings["Register date"] = "Data registrazione"; +$a->strings["Last login"] = "Ultimo accesso"; +$a->strings["Last item"] = "Ultimo elemento"; +$a->strings["Account"] = "Account"; +$a->strings["Add User"] = "Aggiungi utente"; +$a->strings["select all"] = "seleziona tutti"; +$a->strings["User registrations waiting for confirm"] = "Richieste di registrazione in attesa di conferma"; +$a->strings["User waiting for permanent deletion"] = "Utente in attesa di cancellazione definitiva"; +$a->strings["Request date"] = "Data richiesta"; +$a->strings["No registrations."] = "Nessuna registrazione."; +$a->strings["Note from the user"] = "Nota dall'utente"; +$a->strings["Deny"] = "Nega"; +$a->strings["Block"] = "Blocca"; +$a->strings["Unblock"] = "Sblocca"; +$a->strings["Site admin"] = "Amministrazione sito"; +$a->strings["Account expired"] = "Account scaduto"; +$a->strings["New User"] = "Nuovo Utente"; +$a->strings["Deleted since"] = "Rimosso da"; +$a->strings["Selected users will be deleted!\\n\\nEverything these users had posted on this site will be permanently deleted!\\n\\nAre you sure?"] = "Gli utenti selezionati saranno cancellati!\\n\\nTutto quello che gli utenti hanno inviato su questo sito sarà permanentemente canellato!\\n\\nSei sicuro?"; +$a->strings["The user {0} will be deleted!\\n\\nEverything this user has posted on this site will be permanently deleted!\\n\\nAre you sure?"] = "L'utente {0} sarà cancellato!\\n\\nTutto quello che ha inviato su questo sito sarà permanentemente cancellato!\\n\\nSei sicuro?"; +$a->strings["Name of the new user."] = "Nome del nuovo utente."; +$a->strings["Nickname"] = "Nome utente"; +$a->strings["Nickname of the new user."] = "Nome utente del nuovo utente."; +$a->strings["Email address of the new user."] = "Indirizzo Email del nuovo utente."; +$a->strings["Plugin %s disabled."] = "Plugin %s disabilitato."; +$a->strings["Plugin %s enabled."] = "Plugin %s abilitato."; +$a->strings["Disable"] = "Disabilita"; +$a->strings["Enable"] = "Abilita"; +$a->strings["Toggle"] = "Inverti"; +$a->strings["Author: "] = "Autore: "; +$a->strings["Maintainer: "] = "Manutentore: "; +$a->strings["Reload active plugins"] = "Ricarica i plugin attivi"; +$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"] = "Non sono disponibili componenti aggiuntivi sul tuo nodo. Puoi trovare il repository ufficiale dei plugin su %1\$s e potresti trovare altri plugin interessanti nell'open plugin repository su %2\$s"; +$a->strings["No themes found."] = "Nessun tema trovato."; +$a->strings["Screenshot"] = "Anteprima"; +$a->strings["Reload active themes"] = "Ricarica i temi attivi"; +$a->strings["No themes found on the system. They should be paced in %1\$s"] = "Non sono stati trovati temi sul tuo sistema. Dovrebbero essere in %1\$s"; +$a->strings["[Experimental]"] = "[Sperimentale]"; +$a->strings["[Unsupported]"] = "[Non supportato]"; +$a->strings["Log settings updated."] = "Impostazioni Log aggiornate."; +$a->strings["PHP log currently enabled."] = "Log PHP abilitato."; +$a->strings["PHP log currently disabled."] = "Log PHP disabilitato"; +$a->strings["Clear"] = "Pulisci"; +$a->strings["Enable Debugging"] = "Abilita Debugging"; +$a->strings["Log file"] = "File di Log"; +$a->strings["Must be writable by web server. Relative to your Friendica top-level directory."] = "Il server web deve avere i permessi di scrittura. Relativo alla tua directory Friendica."; +$a->strings["Log level"] = "Livello di Log"; +$a->strings["PHP logging"] = "Log PHP"; +$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."] = "Per abilitare il log degli errori e degli avvisi di PHP puoi aggiungere le seguenti righe al file .htconfig.php nella tua installazione. La posizione del file impostato in 'error_log' è relativa alla directory principale della tua installazione Friendica e il server web deve avere i permessi di scrittura sul file. Il valore '1' per 'log_errors' e 'display_errors' abilita le opzioni, imposta '0' per disabilitarle."; +$a->strings["Off"] = "Spento"; +$a->strings["On"] = "Acceso"; +$a->strings["Lock feature %s"] = "Blocca funzionalità %s"; +$a->strings["Manage Additional Features"] = "Gestisci Funzionalità Aggiuntive"; +$a->strings["%d contact edited."] = array( + 0 => "%d contatto modificato.", + 1 => "%d contatti modificati", +); +$a->strings["Could not access contact record."] = "Non è possibile accedere al contatto."; +$a->strings["Could not locate selected profile."] = "Non riesco a trovare il profilo selezionato."; +$a->strings["Contact updated."] = "Contatto aggiornato."; +$a->strings["Contact has been blocked"] = "Il contatto è stato bloccato"; +$a->strings["Contact has been unblocked"] = "Il contatto è stato sbloccato"; +$a->strings["Contact has been ignored"] = "Il contatto è ignorato"; +$a->strings["Contact has been unignored"] = "Il contatto non è più ignorato"; +$a->strings["Contact has been archived"] = "Il contatto è stato archiviato"; +$a->strings["Contact has been unarchived"] = "Il contatto è stato dearchiviato"; +$a->strings["Drop contact"] = "Cancella contatto"; +$a->strings["Do you really want to delete this contact?"] = "Vuoi veramente cancellare questo contatto?"; +$a->strings["Contact has been removed."] = "Il contatto è stato rimosso."; +$a->strings["You are mutual friends with %s"] = "Sei amico reciproco con %s"; +$a->strings["You are sharing with %s"] = "Stai condividendo con %s"; +$a->strings["%s is sharing with you"] = "%s sta condividendo con te"; +$a->strings["Private communications are not available for this contact."] = "Le comunicazioni private non sono disponibili per questo contatto."; +$a->strings["(Update was successful)"] = "(L'aggiornamento è stato completato)"; +$a->strings["(Update was not successful)"] = "(L'aggiornamento non è stato completato)"; +$a->strings["Suggest friends"] = "Suggerisci amici"; +$a->strings["Network type: %s"] = "Tipo di rete: %s"; +$a->strings["Communications lost with this contact!"] = "Comunicazione con questo contatto persa!"; +$a->strings["Fetch further information for feeds"] = "Recupera maggiori informazioni per i feed"; +$a->strings["Fetch information"] = "Recupera informazioni"; +$a->strings["Fetch information and keywords"] = "Recupera informazioni e parole chiave"; +$a->strings["Contact"] = "Contatto"; +$a->strings["Profile Visibility"] = "Visibilità del profilo"; +$a->strings["Please choose the profile you would like to display to %s when viewing your profile securely."] = "Seleziona il profilo che vuoi mostrare a %s quando visita il tuo profilo in modo sicuro."; +$a->strings["Contact Information / Notes"] = "Informazioni / Note sul contatto"; +$a->strings["Their personal note"] = ""; +$a->strings["Edit contact notes"] = "Modifica note contatto"; +$a->strings["Block/Unblock contact"] = "Blocca/Sblocca contatto"; +$a->strings["Ignore contact"] = "Ignora il contatto"; +$a->strings["Repair URL settings"] = "Impostazioni riparazione URL"; +$a->strings["View conversations"] = "Vedi conversazioni"; +$a->strings["Last update:"] = "Ultimo aggiornamento:"; +$a->strings["Update public posts"] = "Aggiorna messaggi pubblici"; +$a->strings["Update now"] = "Aggiorna adesso"; +$a->strings["Unignore"] = "Non ignorare"; +$a->strings["Currently blocked"] = "Bloccato"; +$a->strings["Currently ignored"] = "Ignorato"; +$a->strings["Currently archived"] = "Al momento archiviato"; +$a->strings["Replies/likes to your public posts may still be visible"] = "Risposte ai tuoi post pubblici possono essere comunque visibili"; +$a->strings["Notification for new posts"] = "Notifica per i nuovi messaggi"; +$a->strings["Send a notification of every new post of this contact"] = "Invia una notifica per ogni nuovo messaggio di questo contatto"; +$a->strings["Blacklisted keywords"] = "Parole chiave in blacklist"; +$a->strings["Comma separated list of keywords that should not be converted to hashtags, when \"Fetch information and keywords\" is selected"] = "Lista separata da virgola di parole chiave che non dovranno essere convertite in hashtag, quando \"Recupera informazioni e parole chiave\" è selezionato"; +$a->strings["Actions"] = "Azioni"; +$a->strings["Contact Settings"] = "Impostazioni Contatto"; +$a->strings["Suggestions"] = "Suggerimenti"; +$a->strings["Suggest potential friends"] = "Suggerisci potenziali amici"; +$a->strings["Show all contacts"] = "Mostra tutti i contatti"; +$a->strings["Unblocked"] = "Sbloccato"; +$a->strings["Only show unblocked contacts"] = "Mostra solo contatti non bloccati"; +$a->strings["Blocked"] = "Bloccato"; +$a->strings["Only show blocked contacts"] = "Mostra solo contatti bloccati"; +$a->strings["Ignored"] = "Ignorato"; +$a->strings["Only show ignored contacts"] = "Mostra solo contatti ignorati"; +$a->strings["Archived"] = "Archiviato"; +$a->strings["Only show archived contacts"] = "Mostra solo contatti archiviati"; +$a->strings["Hidden"] = "Nascosto"; +$a->strings["Only show hidden contacts"] = "Mostra solo contatti nascosti"; +$a->strings["Search your contacts"] = "Cerca nei tuoi contatti"; +$a->strings["Update"] = "Aggiorna"; +$a->strings["Archive"] = "Archivia"; +$a->strings["Unarchive"] = "Dearchivia"; +$a->strings["Batch Actions"] = "Azioni Batch"; +$a->strings["View all contacts"] = "Vedi tutti i contatti"; +$a->strings["View all common friends"] = "Vedi tutti gli amici in comune"; +$a->strings["Advanced Contact Settings"] = "Impostazioni avanzate Contatto"; +$a->strings["Mutual Friendship"] = "Amicizia reciproca"; +$a->strings["is a fan of yours"] = "è un tuo fan"; +$a->strings["you are a fan of"] = "sei un fan di"; +$a->strings["Toggle Blocked status"] = "Inverti stato \"Blocca\""; +$a->strings["Toggle Ignored status"] = "Inverti stato \"Ignora\""; +$a->strings["Toggle Archive status"] = "Inverti stato \"Archiviato\""; +$a->strings["Delete contact"] = "Rimuovi contatto"; +$a->strings["Profile not found."] = "Profilo non trovato."; +$a->strings["This may occasionally happen if contact was requested by both persons and it has already been approved."] = "Questo può accadere occasionalmente se la richiesta di contatto era stata inviata da entrambe le persone e già approvata."; +$a->strings["Response from remote site was not understood."] = "Errore di comunicazione con l'altro sito."; +$a->strings["Unexpected response from remote site: "] = "La risposta dell'altro sito non può essere gestita: "; +$a->strings["Confirmation completed successfully."] = "Conferma completata con successo."; +$a->strings["Remote site reported: "] = "Il sito remoto riporta: "; +$a->strings["Temporary failure. Please wait and try again."] = "Problema temporaneo. Attendi e riprova."; +$a->strings["Introduction failed or was revoked."] = "La presentazione ha generato un errore o è stata revocata."; +$a->strings["Unable to set contact photo."] = "Impossibile impostare la foto del contatto."; +$a->strings["No user record found for '%s' "] = "Nessun utente trovato '%s'"; +$a->strings["Our site encryption key is apparently messed up."] = "La nostra chiave di criptazione del sito sembra essere corrotta."; +$a->strings["Empty site URL was provided or URL could not be decrypted by us."] = "E' stato fornito un indirizzo vuoto o non possiamo decrittare l'indirizzo."; +$a->strings["Contact record was not found for you on our site."] = "Il contatto non è stato trovato sul nostro sito."; +$a->strings["Site public key not available in contact record for URL %s."] = "La chiave pubblica del sito non è disponibile per l'URL %s"; +$a->strings["The ID provided by your system is a duplicate on our system. It should work if you try again."] = "L'ID fornito dal tuo sistema è duplicato sul nostro sistema. Se riprovi dovrebbe funzionare."; +$a->strings["Unable to set your contact credentials on our system."] = "Impossibile impostare le credenziali del tuo contatto sul nostro sistema."; +$a->strings["Unable to update your contact profile details on our system"] = "Impossibile aggiornare i dettagli del tuo contatto sul nostro sistema"; +$a->strings["%1\$s has joined %2\$s"] = "%1\$s si è unito a %2\$s"; $a->strings["People Search - %s"] = "Cerca persone - %s"; $a->strings["Forum Search - %s"] = "Ricerca Forum - %s"; +$a->strings["Item has been removed."] = "L'oggetto è stato rimosso."; $a->strings["Event can not end before it has started."] = "Un evento non può finire prima di iniziare."; $a->strings["Event title and start time are required."] = "Titolo e ora di inizio dell'evento sono richiesti."; $a->strings["Create New Event"] = "Crea un nuovo evento"; @@ -1194,62 +1603,25 @@ $a->strings["Title:"] = "Titolo:"; $a->strings["Share this event"] = "Condividi questo evento"; $a->strings["Failed to remove event"] = "Rimozione evento fallita."; $a->strings["Event removed"] = "Evento rimosso"; -$a->strings["You already added this contact."] = "Hai già aggiunto questo contatto."; -$a->strings["Diaspora support isn't enabled. Contact can't be added."] = "Il supporto Diaspora non è abilitato. Il contatto non può essere aggiunto."; -$a->strings["OStatus support is disabled. Contact can't be added."] = "Il supporto OStatus non è abilitato. Il contatto non può essere aggiunto."; -$a->strings["The network type couldn't be detected. Contact can't be added."] = "Non è possibile rilevare il tipo di rete. Il contatto non può essere aggiunto."; -$a->strings["Contact added"] = "Contatto aggiunto"; -$a->strings["This is Friendica, version"] = "Questo è Friendica, versione"; -$a->strings["running at web location"] = "in esecuzione all'indirizzo web"; -$a->strings["Please visit Friendica.com to learn more about the Friendica project."] = "Visita Friendica.com per saperne di più sul progetto Friendica."; -$a->strings["Bug reports and issues: please visit"] = "Segnalazioni di bug e problemi: visita"; -$a->strings["the bugtracker at github"] = "il bugtracker su github"; -$a->strings["Suggestions, praise, donations, etc. - please email \"Info\" at Friendica - dot com"] = "Suggerimenti, lodi, donazioni, ecc - e-mail a \"Info\" at Friendica punto com"; -$a->strings["Installed plugins/addons/apps:"] = "Plugin/componenti aggiuntivi/applicazioni installate"; -$a->strings["No installed plugins/addons/apps"] = "Nessun plugin/componente aggiuntivo/applicazione installata"; -$a->strings["On this server the following remote servers are blocked."] = "In questo server i seguenti server remoti sono bloccati."; -$a->strings["Reason for the block"] = "Motivazione del blocco"; -$a->strings["Group created."] = "Gruppo creato."; -$a->strings["Could not create group."] = "Impossibile creare il gruppo."; -$a->strings["Group not found."] = "Gruppo non trovato."; -$a->strings["Group name changed."] = "Il nome del gruppo è cambiato."; -$a->strings["Save Group"] = "Salva gruppo"; -$a->strings["Create a group of contacts/friends."] = "Crea un gruppo di amici/contatti."; -$a->strings["Group removed."] = "Gruppo rimosso."; -$a->strings["Unable to remove group."] = "Impossibile rimuovere il gruppo."; -$a->strings["Delete Group"] = "Elimina Gruppo"; -$a->strings["Group Editor"] = "Modifica gruppo"; -$a->strings["Edit Group Name"] = "Modifica Nome Gruppo"; -$a->strings["Members"] = "Membri"; -$a->strings["Remove Contact"] = "Rimuovi Contatto"; -$a->strings["Add Contact"] = "Aggiungi Contatto"; -$a->strings["Manage Identities and/or Pages"] = "Gestisci identità e/o pagine"; -$a->strings["Toggle between different identities or community/group pages which share your account details or which you have been granted \"manage\" permissions"] = "Cambia tra differenti identità o pagine comunità/gruppi che condividono il tuo account o per cui hai i permessi di gestione"; -$a->strings["Select an identity to manage: "] = "Seleziona un'identità da gestire:"; -$a->strings["Unable to locate contact information."] = "Impossibile trovare le informazioni del contatto."; -$a->strings["Do you really want to delete this message?"] = "Vuoi veramente cancellare questo messaggio?"; -$a->strings["Message deleted."] = "Messaggio eliminato."; -$a->strings["Conversation removed."] = "Conversazione rimossa."; -$a->strings["No messages."] = "Nessun messaggio."; -$a->strings["Message not available."] = "Messaggio non disponibile."; -$a->strings["Delete message"] = "Elimina il messaggio"; -$a->strings["Delete conversation"] = "Elimina la conversazione"; -$a->strings["No secure communications available. You may be able to respond from the sender's profile page."] = "Nessuna comunicazione sicura disponibile, Potresti essere in grado di rispondere dalla pagina del profilo del mittente."; -$a->strings["Send Reply"] = "Invia la risposta"; -$a->strings["Unknown sender - %s"] = "Mittente sconosciuto - %s"; -$a->strings["You and %s"] = "Tu e %s"; -$a->strings["%s and You"] = "%s e Tu"; -$a->strings["D, d M Y - g:i A"] = "D d M Y - G:i"; -$a->strings["%d message"] = array( - 0 => "%d messaggio", - 1 => "%d messaggi", -); -$a->strings["Remove term"] = "Rimuovi termine"; +$a->strings["Friend suggestion sent."] = "Suggerimento di amicizia inviato."; +$a->strings["Suggest Friends"] = "Suggerisci amici"; +$a->strings["Suggest a friend for %s"] = "Suggerisci un amico a %s"; +$a->strings["Unable to locate original post."] = "Impossibile trovare il messaggio originale."; +$a->strings["Empty post discarded."] = "Messaggio vuoto scartato."; +$a->strings["System error. Post not saved."] = "Errore di sistema. Messaggio non salvato."; +$a->strings["This message was sent to you by %s, a member of the Friendica social network."] = "Questo messaggio ti è stato inviato da %s, un membro del social network Friendica."; +$a->strings["You may visit them online at %s"] = "Puoi visitarli online su %s"; +$a->strings["Please contact the sender by replying to this post if you do not wish to receive these messages."] = "Contatta il mittente rispondendo a questo post se non vuoi ricevere questi messaggi."; +$a->strings["%s posted an update."] = "%s ha inviato un aggiornamento."; +$a->strings["Mood"] = "Umore"; +$a->strings["Set your current mood and tell your friends"] = "Condividi il tuo umore con i tuoi amici"; $a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = array( 0 => "Attenzione: Questo gruppo contiene %s membro da una rete che non permette la ricezione di messaggi non pubblici.", 1 => "Attenzione: Questo gruppo contiene %s membri da reti che non permettono la ricezione di messaggi non pubblici.", ); $a->strings["Messages in this group won't be send to these receivers."] = "I messaggi in questo gruppo non saranno inviati ai quei contatti."; +$a->strings["No such group"] = "Nessun gruppo"; +$a->strings["Group: %s"] = "Gruppo: %s"; $a->strings["Private messages to this person are at risk of public disclosure."] = "I messaggi privati a questa persona potrebbero risultare visibili anche pubblicamente."; $a->strings["Invalid contact."] = "Contatto non valido."; $a->strings["Commented Order"] = "Ordina per commento"; @@ -1263,8 +1635,13 @@ $a->strings["Shared Links"] = "Links condivisi"; $a->strings["Interesting Links"] = "Link Interessanti"; $a->strings["Starred"] = "Preferiti"; $a->strings["Favourite Posts"] = "Messaggi preferiti"; -$a->strings["OpenID protocol error. No ID returned."] = "Errore protocollo OpenID. Nessun ID ricevuto."; -$a->strings["Account not found and OpenID registration is not permitted on this site."] = "L'account non è stato trovato, e la registrazione via OpenID non è permessa su questo sito."; +$a->strings["Subscribing to OStatus contacts"] = "Iscrizione a contatti OStatus"; +$a->strings["No contact provided."] = "Nessun contatto disponibile."; +$a->strings["Couldn't fetch information for contact."] = "Non è stato possibile recuperare le informazioni del contatto."; +$a->strings["Couldn't fetch friends for contact."] = "Non è stato possibile recuperare gli amici del contatto."; +$a->strings["success"] = "successo"; +$a->strings["failed"] = "fallito"; +$a->strings["ignored"] = "ignorato"; $a->strings["Recent Photos"] = "Foto recenti"; $a->strings["Upload New Photos"] = "Carica nuove foto"; $a->strings["everybody"] = "tutti"; @@ -1276,10 +1653,12 @@ $a->strings["Delete Photo"] = "Rimuovi foto"; $a->strings["Do you really want to delete this photo?"] = "Vuoi veramente cancellare questa foto?"; $a->strings["%1\$s was tagged in %2\$s by %3\$s"] = "%1\$s è stato taggato in %2\$s da %3\$s"; $a->strings["a photo"] = "una foto"; +$a->strings["Image exceeds size limit of %s"] = "La dimensione dell'immagine supera il limite di %s"; $a->strings["Image file is empty."] = "Il file dell'immagine è vuoto."; +$a->strings["Unable to process image."] = "Impossibile caricare l'immagine."; +$a->strings["Image upload failed."] = "Caricamento immagine fallito."; $a->strings["No photos selected"] = "Nessuna foto selezionata"; $a->strings["Access to this item is restricted."] = "Questo oggetto non è visibile a tutti."; -$a->strings["You have used %1$.2f Mbytes of %2$.2f Mbytes photo storage."] = "Hai usato %1$.2f MBytes su %2$.2f disponibili."; $a->strings["Upload Photos"] = "Carica foto"; $a->strings["New album name: "] = "Nome nuovo album: "; $a->strings["or existing album name: "] = "o nome di un album esistente: "; @@ -1297,6 +1676,7 @@ $a->strings["Photo not available"] = "Foto non disponibile"; $a->strings["View photo"] = "Vedi foto"; $a->strings["Edit photo"] = "Modifica foto"; $a->strings["Use as profile photo"] = "Usa come foto del profilo"; +$a->strings["Private Message"] = "Messaggio privato"; $a->strings["View Full Size"] = "Vedi dimensione intera"; $a->strings["Tags: "] = "Tag: "; $a->strings["[Remove any tag]"] = "[Rimuovi tutti i tag]"; @@ -1309,10 +1689,34 @@ $a->strings["Rotate CW (right)"] = "Ruota a destra"; $a->strings["Rotate CCW (left)"] = "Ruota a sinistra"; $a->strings["Private photo"] = "Foto privata"; $a->strings["Public photo"] = "Foto pubblica"; +$a->strings["I like this (toggle)"] = "Mi piace (clic per cambiare)"; +$a->strings["I don't like this (toggle)"] = "Non mi piace (clic per cambiare)"; +$a->strings["This is you"] = "Questo sei tu"; +$a->strings["Comment"] = "Commento"; $a->strings["Map"] = "Mappa"; $a->strings["View Album"] = "Sfoglia l'album"; -$a->strings["Only logged in users are permitted to perform a probing."] = "Solo agli utenti loggati è permesso effettuare un probe."; -$a->strings["Tips for New Members"] = "Consigli per i Nuovi Utenti"; +$a->strings["{0} wants to be your friend"] = "{0} vuole essere tuo amico"; +$a->strings["{0} sent you a message"] = "{0} ti ha inviato un messaggio"; +$a->strings["{0} requested registration"] = "{0} chiede la registrazione"; +$a->strings["Poke/Prod"] = "Tocca/Pungola"; +$a->strings["poke, prod or do other things to somebody"] = "tocca, pungola o fai altre cose a qualcuno"; +$a->strings["Recipient"] = "Destinatario"; +$a->strings["Choose what you wish to do to recipient"] = "Scegli cosa vuoi fare al destinatario"; +$a->strings["Make this post private"] = "Rendi questo post privato"; +$a->strings["Image uploaded but image cropping failed."] = "L'immagine è stata caricata, ma il non è stato possibile ritagliarla."; +$a->strings["Image size reduction [%s] failed."] = "Il ridimensionamento dell'immagine [%s] è fallito."; +$a->strings["Shift-reload the page or clear browser cache if the new photo does not display immediately."] = "Ricarica la pagina con shift+F5 o cancella la cache del browser se la nuova foto non viene mostrata immediatamente."; +$a->strings["Unable to process image"] = "Impossibile elaborare l'immagine"; +$a->strings["Upload File:"] = "Carica un file:"; +$a->strings["Select a profile:"] = "Seleziona un profilo:"; +$a->strings["Upload"] = "Carica"; +$a->strings["or"] = "o"; +$a->strings["skip this step"] = "salta questo passaggio"; +$a->strings["select a photo from your photo albums"] = "seleziona una foto dai tuoi album"; +$a->strings["Crop Image"] = "Ritaglia immagine"; +$a->strings["Please adjust the image cropping for optimum viewing."] = "Ritaglia l'immagine per una visualizzazione migliore."; +$a->strings["Done Editing"] = "Finito"; +$a->strings["Image uploaded successfully."] = "Immagine caricata con successo."; $a->strings["Profile deleted."] = "Profilo eliminato."; $a->strings["Profile-"] = "Profilo-"; $a->strings["New profile created."] = "Il nuovo profilo è stato creato."; @@ -1399,7 +1803,6 @@ $a->strings["Note for the admin"] = "Nota per l'amministratore"; $a->strings["Leave a message for the admin, why you want to join this node"] = "Lascia un messaggio per l'amministratore, per esempio perché vuoi registrarti su questo nodo"; $a->strings["Membership on this site is by invitation only."] = "La registrazione su questo sito è solo su invito."; $a->strings["Your invitation ID: "] = "L'ID del tuo invito:"; -$a->strings["Registration"] = "Registrazione"; $a->strings["Your Full Name (e.g. Joe Smith, real or real-looking): "] = "Il tuo nome completo (es. Mario Rossi, vero o che sembri vero): "; $a->strings["Your Email Address: "] = "Il tuo indirizzo email: "; $a->strings["New Password:"] = "Nuova password:"; @@ -1408,17 +1811,12 @@ $a->strings["Confirm:"] = "Conferma:"; $a->strings["Choose a profile nickname. This must begin with a text character. Your profile address on this site will then be 'nickname@\$sitename'."] = "Scegli un nome utente. Deve cominciare con una lettera. L'indirizzo del tuo profilo sarà 'soprannome@\$sitename'."; $a->strings["Choose a nickname: "] = "Scegli un nome utente: "; $a->strings["Import your profile to this friendica instance"] = "Importa il tuo profilo in questo server friendica"; -$a->strings["Only logged in users are permitted to perform a search."] = "Solo agli utenti autenticati è permesso eseguire ricerche."; -$a->strings["Too Many Requests"] = "Troppe richieste"; -$a->strings["Only one search per minute is permitted for not logged in users."] = "Solo una ricerca al minuto è permessa agli utenti non autenticati."; -$a->strings["Items tagged with: %s"] = "Elementi taggati con: %s"; -$a->strings["Account"] = "Account"; -$a->strings["Additional features"] = "Funzionalità aggiuntive"; +$a->strings["Account approved."] = "Account approvato."; +$a->strings["Registration revoked for %s"] = "Registrazione revocata per %s"; +$a->strings["Please login."] = "Accedi."; $a->strings["Display"] = "Visualizzazione"; $a->strings["Social Networks"] = "Social Networks"; -$a->strings["Plugins"] = "Plugin"; $a->strings["Connected apps"] = "Applicazioni collegate"; -$a->strings["Export personal data"] = "Esporta dati personali"; $a->strings["Remove account"] = "Rimuovi account"; $a->strings["Missing some important data!"] = "Mancano alcuni dati importanti!"; $a->strings["Failed to connect with email account using the settings provided."] = "Impossibile collegarsi all'account email con i parametri forniti."; @@ -1438,20 +1836,18 @@ $a->strings["Private forum has no privacy permissions. Using default privacy gro $a->strings["Private forum has no privacy permissions and no default privacy group."] = "Il gruppo privato non ha permessi di privacy e nessun gruppo di privacy predefinito."; $a->strings["Settings updated."] = "Impostazioni aggiornate."; $a->strings["Add application"] = "Aggiungi applicazione"; -$a->strings["Save Settings"] = "Salva Impostazioni"; $a->strings["Consumer Key"] = "Consumer Key"; $a->strings["Consumer Secret"] = "Consumer Secret"; $a->strings["Redirect"] = "Redirect"; $a->strings["Icon url"] = "Url icona"; $a->strings["You can't edit this application."] = "Non puoi modificare questa applicazione."; $a->strings["Connected Apps"] = "Applicazioni Collegate"; +$a->strings["Edit"] = "Modifica"; $a->strings["Client key starts with"] = "Chiave del client inizia con"; $a->strings["No name"] = "Nessun nome"; $a->strings["Remove authorization"] = "Rimuovi l'autorizzazione"; $a->strings["No Plugin settings configured"] = "Nessun plugin ha impostazioni modificabili"; $a->strings["Plugin Settings"] = "Impostazioni plugin"; -$a->strings["Off"] = "Spento"; -$a->strings["On"] = "Acceso"; $a->strings["Additional Features"] = "Funzionalità aggiuntive"; $a->strings["General Social Media Settings"] = "Impostazioni Media Sociali"; $a->strings["Disable intelligent shortening"] = "Disabilita accorciamento intelligente"; @@ -1481,7 +1877,6 @@ $a->strings["Send public posts to all email contacts:"] = "Invia i messaggi pubb $a->strings["Action after import:"] = "Azione post importazione:"; $a->strings["Move to folder"] = "Sposta nella cartella"; $a->strings["Move to folder:"] = "Sposta nella cartella:"; -$a->strings["No special theme for mobile devices"] = "Nessun tema speciale per i dispositivi mobili"; $a->strings["Display Settings"] = "Impostazioni Grafiche"; $a->strings["Display Theme:"] = "Tema:"; $a->strings["Mobile Theme:"] = "Tema mobile:"; @@ -1498,6 +1893,7 @@ $a->strings["Beginning of week:"] = "Inizio della settimana:"; $a->strings["Don't show notices"] = "Non mostrare gli avvisi"; $a->strings["Infinite scroll"] = "Scroll infinito"; $a->strings["Automatic updates only at the top of the network page"] = "Aggiornamenti automatici solo in cima alla pagina \"rete\""; +$a->strings["When disabled, the network page is updated all the time, which could be confusing while reading."] = ""; $a->strings["Bandwith Saver Mode"] = "Modalità Salva Banda"; $a->strings["When enabled, embedded content is not displayed on automatic updates, they only show on page reload."] = "Quando abilitato, il contenuto embeddato non è mostrato quando la pagina si aggiorna automaticamente, ma solo quando la pagina viene ricaricata."; $a->strings["General Theme Settings"] = "Opzioni Generali Tema"; @@ -1508,23 +1904,23 @@ $a->strings["Account Types"] = "Tipi di Account"; $a->strings["Personal Page Subtypes"] = "Sottotipi di Pagine Personali"; $a->strings["Community Forum Subtypes"] = "Sottotipi di Community Forum"; $a->strings["Personal Page"] = "Pagina Personale"; -$a->strings["This account is a regular personal profile"] = "Questo account è un profilo personale regolare"; +$a->strings["Account for a personal profile."] = ""; $a->strings["Organisation Page"] = "Pagina Organizzazione"; -$a->strings["This account is a profile for an organisation"] = "Questo account è il profilo per un'organizzazione"; +$a->strings["Account for an organisation that automatically approves contact requests as \"Followers\"."] = ""; $a->strings["News Page"] = "Pagina Notizie"; -$a->strings["This account is a news account/reflector"] = "Questo account è un account di notizie"; +$a->strings["Account for a news reflector that automatically approves contact requests as \"Followers\"."] = ""; $a->strings["Community Forum"] = "Community Forum"; -$a->strings["This account is a community forum where people can discuss with each other"] = "Questo account è un forum comunitario dove le persone possono discutere tra loro"; +$a->strings["Account for community discussions."] = ""; $a->strings["Normal Account Page"] = "Pagina Account Normale"; -$a->strings["This account is a normal personal profile"] = "Questo account è un normale profilo personale"; +$a->strings["Account for a regular personal profile that requires manual approval of \"Friends\" and \"Followers\"."] = ""; $a->strings["Soapbox Page"] = "Pagina Sandbox"; -$a->strings["Automatically approve all connection/friend requests as read-only fans"] = "Chi richiede la connessione/amicizia sarà accettato automaticamente come fan che potrà solamente leggere la bacheca"; +$a->strings["Account for a public profile that automatically approves contact requests as \"Followers\"."] = ""; $a->strings["Public Forum"] = "Forum Pubblico"; -$a->strings["Automatically approve all contact requests"] = "Approva automaticamente tutte le richieste di contatto"; +$a->strings["Automatically approves all contact requests."] = ""; $a->strings["Automatic Friend Page"] = "Pagina con amicizia automatica"; -$a->strings["Automatically approve all connection/friend requests as friends"] = "Chi richiede la connessione/amicizia sarà accettato automaticamente come amico"; +$a->strings["Account for a popular profile that automatically approves contact requests as \"Friends\"."] = ""; $a->strings["Private Forum [Experimental]"] = "Forum privato [sperimentale]"; -$a->strings["Private forum - approved members only"] = "Forum privato - solo membri approvati"; +$a->strings["Requires manual approval of contact requests."] = ""; $a->strings["OpenID:"] = "OpenID:"; $a->strings["(Optional) Allow this OpenID to login to this account."] = "(Opzionale) Consente di loggarti in questo account con questo OpenID"; $a->strings["Publish your default profile in your local site directory?"] = "Pubblica il tuo profilo predefinito nell'elenco locale del sito"; @@ -1587,423 +1983,56 @@ $a->strings["Activate desktop notifications"] = "Attiva notifiche desktop"; $a->strings["Show desktop popup on new notifications"] = "Mostra un popup di notifica sul desktop all'arrivo di nuove notifiche"; $a->strings["Text-only notification emails"] = "Email di notifica in solo testo"; $a->strings["Send text only notification emails, without the html part"] = "Invia le email di notifica in solo testo, senza la parte in html"; +$a->strings["Show detailled notifications"] = ""; +$a->strings["Per default the notificiation are condensed to a single notification per item. When enabled, every notification is displayed."] = ""; $a->strings["Advanced Account/Page Type Settings"] = "Impostazioni avanzate Account/Tipo di pagina"; $a->strings["Change the behaviour of this account for special situations"] = "Modifica il comportamento di questo account in situazioni speciali"; $a->strings["Relocate"] = "Trasloca"; $a->strings["If you have moved this profile from another server, and some of your contacts don't receive your updates, try pushing this button."] = "Se hai spostato questo profilo da un'altro server, e alcuni dei tuoi contatti non ricevono i tuoi aggiornamenti, prova a premere questo bottone."; $a->strings["Resend relocate message to contacts"] = "Invia nuovamente il messaggio di trasloco ai contatti"; -$a->strings["Export account"] = "Esporta account"; -$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."] = "Esporta le informazioni del tuo account e dei contatti. Usa questa funzione per fare un backup del tuo account o per spostarlo in un altro server."; -$a->strings["Export all"] = "Esporta tutto"; -$a->strings["Export your accout info, contacts and all your items as json. Could be a very big file, and could take a lot of time. Use this to make a full backup of your account (photos are not exported)"] = "Esporta le informazioni del tuo account, i tuoi contatti e tutti i tuoi elementi in json. Può diventare un file veramente molto grosso e metterci un sacco di tempo. Usa questa funzione per fare un backup completo del tuo account (le foto non sono esportate)"; $a->strings["Do you really want to delete this video?"] = "Vuoi veramente cancellare questo video?"; $a->strings["Delete Video"] = "Rimuovi video"; $a->strings["No videos selected"] = "Nessun video selezionato"; $a->strings["Recent Videos"] = "Video Recenti"; $a->strings["Upload New Videos"] = "Carica Nuovo Video"; -$a->strings["Friendica Communications Server - Setup"] = "Friendica Comunicazione Server - Impostazioni"; -$a->strings["Could not connect to database."] = " Impossibile collegarsi con il database."; -$a->strings["Could not create table."] = "Impossibile creare le tabelle."; -$a->strings["Your Friendica site database has been installed."] = "Il tuo Friendica è stato installato."; -$a->strings["You may need to import the file \"database.sql\" manually using phpmyadmin or mysql."] = "Potresti dover importare il file \"database.sql\" manualmente con phpmyadmin o mysql"; -$a->strings["Please see the file \"INSTALL.txt\"."] = "Leggi il file \"INSTALL.txt\"."; -$a->strings["Database already in use."] = "Database già in uso."; -$a->strings["System check"] = "Controllo sistema"; -$a->strings["Check again"] = "Controlla ancora"; -$a->strings["Database connection"] = "Connessione al database"; -$a->strings["In order to install Friendica we need to know how to connect to your database."] = "Per installare Friendica dobbiamo sapere come collegarci al tuo database."; -$a->strings["Please contact your hosting provider or site administrator if you have questions about these settings."] = "Contatta il tuo fornitore di hosting o l'amministratore del sito se hai domande su queste impostazioni."; -$a->strings["The database you specify below should already exist. If it does not, please create it before continuing."] = "Il database dovrà già esistere. Se non esiste, crealo prima di continuare."; -$a->strings["Database Server Name"] = "Nome del database server"; -$a->strings["Database Login Name"] = "Nome utente database"; -$a->strings["Database Login Password"] = "Password utente database"; -$a->strings["For security reasons the password must not be empty"] = "Per motivi di sicurezza la password non puo' essere vuota."; -$a->strings["Database Name"] = "Nome database"; -$a->strings["Site administrator email address"] = "Indirizzo email dell'amministratore del sito"; -$a->strings["Your account email address must match this in order to use the web admin panel."] = "Il tuo indirizzo email deve corrispondere a questo per poter usare il pannello di amministrazione web."; -$a->strings["Please select a default timezone for your website"] = "Seleziona il fuso orario predefinito per il tuo sito web"; -$a->strings["Site settings"] = "Impostazioni sito"; -$a->strings["System Language:"] = "Lingua di Sistema:"; -$a->strings["Set the default language for your Friendica installation interface and to send emails."] = "Imposta la lingua di default per l'interfaccia e l'invio delle email."; -$a->strings["Could not find a command line version of PHP in the web server PATH."] = "Non riesco a trovare la versione di PHP da riga di comando nel PATH del server web"; -$a->strings["If you don't have a command line version of PHP installed on server, you will not be able to run the background processing. See 'Setup the poller'"] = "Se non hai la versione a riga di comando di PHP installata sul tuo server, non sarai in grado di eseguire i processi in background. Vedi 'Setup the poller'"; -$a->strings["PHP executable path"] = "Percorso eseguibile PHP"; -$a->strings["Enter full path to php executable. You can leave this blank to continue the installation."] = "Inserisci il percorso completo all'eseguibile di php. Puoi lasciare bianco questo campo per continuare l'installazione."; -$a->strings["Command line PHP"] = "PHP da riga di comando"; -$a->strings["PHP executable is not the php cli binary (could be cgi-fgci version)"] = "L'eseguibile PHP non è il binario php cli (potrebbe essere la versione cgi-fcgi)"; -$a->strings["Found PHP version: "] = "Versione PHP:"; -$a->strings["PHP cli binary"] = "Binario PHP cli"; -$a->strings["The command line version of PHP on your system does not have \"register_argc_argv\" enabled."] = "La versione da riga di comando di PHP nel sistema non ha abilitato \"register_argc_argv\"."; -$a->strings["This is required for message delivery to work."] = "E' obbligatorio per far funzionare la consegna dei messaggi."; -$a->strings["PHP register_argc_argv"] = "PHP register_argc_argv"; -$a->strings["Error: the \"openssl_pkey_new\" function on this system is not able to generate encryption keys"] = "Errore: la funzione \"openssl_pkey_new\" in questo sistema non è in grado di generare le chiavi di criptazione"; -$a->strings["If running under Windows, please see \"http://www.php.net/manual/en/openssl.installation.php\"."] = "Se stai eseguendo friendika su windows, guarda \"http://www.php.net/manual/en/openssl.installation.php\"."; -$a->strings["Generate encryption keys"] = "Genera chiavi di criptazione"; -$a->strings["libCurl PHP module"] = "modulo PHP libCurl"; -$a->strings["GD graphics PHP module"] = "modulo PHP GD graphics"; -$a->strings["OpenSSL PHP module"] = "modulo PHP OpenSSL"; -$a->strings["PDO or MySQLi PHP module"] = "modulo PHP PDO o MySQLi"; -$a->strings["mb_string PHP module"] = "modulo PHP mb_string"; -$a->strings["XML PHP module"] = "Modulo PHP XML"; -$a->strings["iconv module"] = "modulo iconv"; -$a->strings["Apache mod_rewrite module"] = "Modulo mod_rewrite di Apache"; -$a->strings["Error: Apache webserver mod-rewrite module is required but not installed."] = "Errore: E' il modulo mod-rewrite di Apache è richiesto, ma non risulta installato"; -$a->strings["Error: libCURL PHP module required but not installed."] = "Errore: il modulo libCURL di PHP è richiesto, ma non risulta installato."; -$a->strings["Error: GD graphics PHP module with JPEG support required but not installed."] = "Errore: Il modulo GD graphics di PHP con supporto a JPEG è richiesto, ma non risulta installato."; -$a->strings["Error: openssl PHP module required but not installed."] = "Errore: il modulo openssl di PHP è richiesto, ma non risulta installato."; -$a->strings["Error: PDO or MySQLi PHP module required but not installed."] = "Errore: uno dei due moduli PHP PDO o MySQLi è richiesto ma non installato."; -$a->strings["Error: The MySQL driver for PDO is not installed."] = "Errore: il driver MySQL per PDO non è installato."; -$a->strings["Error: mb_string PHP module required but not installed."] = "Errore: il modulo PHP mb_string è richiesto, ma non risulta installato."; -$a->strings["Error: iconv PHP module required but not installed."] = "Errore: il modulo PHP iconv è richiesto ma non installato."; -$a->strings["Error, XML PHP module required but not installed."] = "Errore, il modulo PHP XML è richiesto ma non installato."; -$a->strings["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."] = "L'installazione web deve poter creare un file chiamato \".htconfig.php\" nella cartella principale del tuo web server ma non è in grado di farlo."; -$a->strings["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."] = "Ciò è dovuto spesso a impostazioni di permessi, dato che il web server può non essere in grado di scrivere il file nella tua cartella, anche se tu puoi."; -$a->strings["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."] = "Alla fine di questa procedura, di daremo un testo da salvare in un file chiamato .htconfig.php nella tua cartella principale di Friendica"; -$a->strings["You can alternatively skip this procedure and perform a manual installation. Please see the file \"INSTALL.txt\" for instructions."] = "Puoi in alternativa saltare questa procedura ed eseguire l'installazione manualmente. Vedi il file \"INSTALL.txt\" per le istruzioni."; -$a->strings[".htconfig.php is writable"] = ".htconfig.php è scrivibile"; -$a->strings["Friendica uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering."] = "Friendica usa il motore di template Smarty3 per renderizzare le sue pagine web. Smarty3 compila i template in PHP per velocizzare il rendering."; -$a->strings["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."] = "Per salvare questi template compilati, il server werb ha bisogno dell'accesso in scrittura alla cartella view/smarty3/ nella cartella principale dei Friendica."; -$a->strings["Please ensure that the user that your web server runs as (e.g. www-data) has write access to this folder."] = "Per favore, controlla che l'utente con cui il tuo server web gira (es www-data) ha accesso in scrittura a questa cartella."; -$a->strings["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."] = "Nota: come misura di sicurezza, dovresti dare accesso in scrittura solo alla cartella view/smarty3, non ai template (.tpl) che contiene."; -$a->strings["view/smarty3 is writable"] = "view/smarty3 è scrivibile"; -$a->strings["Url rewrite in .htaccess is not working. Check your server configuration."] = "La riscrittura degli url in .htaccess non funziona. Controlla la configurazione del tuo server."; -$a->strings["Url rewrite is working"] = "La riscrittura degli url funziona"; -$a->strings["ImageMagick PHP extension is not installed"] = "L'estensione PHP ImageMagick non è installata"; -$a->strings["ImageMagick PHP extension is installed"] = "L'estensione PHP ImageMagick è installata"; -$a->strings["ImageMagick supports GIF"] = "ImageMagick supporta i GIF"; -$a->strings["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."] = "Il file di configurazione del database \".htconfig.php\" non può essere scritto. Usa il testo qui di seguito per creare un file di configurazione nella cartella principale del tuo sito."; -$a->strings["

What next

"] = "

Cosa fare ora

"; -$a->strings["IMPORTANT: You will need to [manually] setup a scheduled task for the poller."] = "IMPORTANTE: Devi impostare [manualmente] la pianificazione del poller."; -$a->strings["Unable to locate original post."] = "Impossibile trovare il messaggio originale."; -$a->strings["Empty post discarded."] = "Messaggio vuoto scartato."; -$a->strings["System error. Post not saved."] = "Errore di sistema. Messaggio non salvato."; -$a->strings["This message was sent to you by %s, a member of the Friendica social network."] = "Questo messaggio ti è stato inviato da %s, un membro del social network Friendica."; -$a->strings["You may visit them online at %s"] = "Puoi visitarli online su %s"; -$a->strings["Please contact the sender by replying to this post if you do not wish to receive these messages."] = "Contatta il mittente rispondendo a questo post se non vuoi ricevere questi messaggi."; -$a->strings["%s posted an update."] = "%s ha inviato un aggiornamento."; -$a->strings["Invalid request identifier."] = "L'identificativo della richiesta non è valido."; -$a->strings["Discard"] = "Scarta"; -$a->strings["Network Notifications"] = "Notifiche dalla rete"; -$a->strings["Personal Notifications"] = "Notifiche personali"; -$a->strings["Home Notifications"] = "Notifiche bacheca"; -$a->strings["Show Ignored Requests"] = "Mostra richieste ignorate"; -$a->strings["Hide Ignored Requests"] = "Nascondi richieste ignorate"; -$a->strings["Notification type: "] = "Tipo di notifica: "; -$a->strings["suggested by %s"] = "suggerito da %s"; -$a->strings["Post a new friend activity"] = "Invia una attività \"è ora amico con\""; -$a->strings["if applicable"] = "se applicabile"; -$a->strings["Approve"] = "Approva"; -$a->strings["Claims to be known to you: "] = "Dice di conoscerti: "; -$a->strings["yes"] = "si"; -$a->strings["no"] = "no"; -$a->strings["Shall your connection be bidirectional or not?"] = "La connessione dovrà essere bidirezionale o no?"; -$a->strings["Accepting %s as a friend allows %s to subscribe to your posts, and you will also receive updates from them in your news feed."] = "Accettando %s come amico permette a %s di seguire i tuoi post, e a te di riceverne gli aggiornamenti."; -$a->strings["Accepting %s as a subscriber allows them to subscribe to your posts, but you will not receive updates from them in your news feed."] = "Accentrando %s come abbonato gli permette di abbonarsi ai tuoi messaggi, ma tu non riceverai aggiornamenti da lui."; -$a->strings["Accepting %s as a sharer allows them to subscribe to your posts, but you will not receive updates from them in your news feed."] = "Accentando %s come condivisore, gli permetti di abbonarsi ai tuoi messaggi, ma tu non riceverai nessun aggiornamento da loro."; -$a->strings["Friend"] = "Amico"; -$a->strings["Sharer"] = "Condivisore"; -$a->strings["Subscriber"] = "Abbonato"; -$a->strings["No introductions."] = "Nessuna presentazione."; -$a->strings["Show unread"] = "Mostra non letti"; -$a->strings["Show all"] = "Mostra tutti"; -$a->strings["No more %s notifications."] = "Nessun'altra notifica %s."; -$a->strings["{0} wants to be your friend"] = "{0} vuole essere tuo amico"; -$a->strings["{0} sent you a message"] = "{0} ti ha inviato un messaggio"; -$a->strings["{0} requested registration"] = "{0} chiede la registrazione"; -$a->strings["Theme settings updated."] = "Impostazioni del tema aggiornate."; -$a->strings["Site"] = "Sito"; -$a->strings["Users"] = "Utenti"; -$a->strings["Themes"] = "Temi"; -$a->strings["DB updates"] = "Aggiornamenti Database"; -$a->strings["Inspect Queue"] = "Ispeziona Coda di invio"; -$a->strings["Server Blocklist"] = "Server Blocklist"; -$a->strings["Federation Statistics"] = "Statistiche sulla Federazione"; -$a->strings["Logs"] = "Log"; -$a->strings["View Logs"] = "Vedi i log"; -$a->strings["probe address"] = "controlla indirizzo"; -$a->strings["check webfinger"] = "verifica webfinger"; -$a->strings["Plugin Features"] = "Impostazioni Plugins"; -$a->strings["diagnostics"] = "diagnostiche"; -$a->strings["User registrations waiting for confirmation"] = "Utenti registrati in attesa di conferma"; -$a->strings["The blocked domain"] = "Il dominio bloccato"; -$a->strings["The reason why you blocked this domain."] = "Le ragioni per cui blocchi questo dominio."; -$a->strings["Delete domain"] = "Elimina dominio"; -$a->strings["Check to delete this entry from the blocklist"] = "Seleziona per eliminare questa voce dalla blocklist"; -$a->strings["Administration"] = "Amministrazione"; -$a->strings["This page can be used to define a black list of servers from the federated network that are not allowed to interact with your node. For all entered domains you should also give a reason why you have blocked the remote server."] = "Questa pagina puo' essere usata per definire una black list di server dal network federato a cui nono è permesso interagire col tuo nodo. Per ogni dominio inserito, dovresti anche riportare una ragione per cui hai bloccato il server remoto."; -$a->strings["The list of blocked servers will be made publically available on the /friendica page so that your users and people investigating communication problems can find the reason easily."] = "La lista di server bloccati sarà resa disponibile pubblicamente sulla pagina /friendica, così che i tuoi utenti e le persone che indagano su problemi di comunicazione possano trovarne la ragione facilmente."; -$a->strings["Add new entry to block list"] = "Aggiungi una nuova voce alla blocklist"; -$a->strings["Server Domain"] = "Dominio del Server"; -$a->strings["The domain of the new server to add to the block list. Do not include the protocol."] = "Il dominio del server da aggiungere alla blocklist. Non includere il protocollo."; -$a->strings["Block reason"] = "Ragione blocco"; -$a->strings["Add Entry"] = "Aggiungi Voce"; -$a->strings["Save changes to the blocklist"] = "Salva modifiche alla blocklist"; -$a->strings["Current Entries in the Blocklist"] = "Voci correnti nella blocklist"; -$a->strings["Delete entry from blocklist"] = "Elimina voce dalla blocklist"; -$a->strings["Delete entry from blocklist?"] = "Eliminare la voce dalla blocklist?"; -$a->strings["Server added to blocklist."] = "Server aggiunto alla blocklist."; -$a->strings["Site blocklist updated."] = "Blocklist del sito aggiornata."; -$a->strings["unknown"] = "sconosciuto"; -$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."] = "Questa pagina offre alcuni numeri riguardo la porzione del social network federato di cui il tuo nodo Friendica fa parte. Questi numeri non sono completi ma riflettono esclusivamente la porzione di rete di cui il tuo nodo e' a conoscenza."; -$a->strings["The Auto Discovered Contact Directory feature is not enabled, it will improve the data displayed here."] = "La funzione Elenco Contatti Scoperto Automaticamente non è abilitata, migliorerà i dati visualizzati qui."; -$a->strings["Currently this node is aware of %d nodes from the following platforms:"] = "Attualmente questo nodo conosce %d nodi dalle seguenti piattaforme:"; -$a->strings["ID"] = "ID"; -$a->strings["Recipient Name"] = "Nome Destinatario"; -$a->strings["Recipient Profile"] = "Profilo Destinatario"; -$a->strings["Created"] = "Creato"; -$a->strings["Last Tried"] = "Ultimo Tentativo"; -$a->strings["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."] = "Questa pagina elenca il contenuto della coda di invio dei post. Questi sono post la cui consegna è fallita. Verranno inviati nuovamente più tardi ed eventualmente cancellati se la consegna continua a fallire."; -$a->strings["Your DB still runs with MyISAM tables. You should change the engine type to InnoDB. As Friendica will use InnoDB only features in the future, you should change this! See here for a guide that may be helpful converting the table engines. You may also use the command php include/dbstructure.php toinnodb of your Friendica installation for an automatic conversion.
"] = "Il tuo database contiene ancora tabelle MyISAM. Dovresti cambiare il motore a InnoDB. Siccome Friendica userà esclusivamente InnoDB nelle versioni a venire, dovresti cambiarle! Vedi qui per una guida che puo' essere d'aiuto nel convertire il motore delle tabelle. Puoi anche usare il comando php include/dbstructure.php toinnodb nella tua installazione Friendica per eseguire la conversione automaticamente.
"; -$a->strings["You are using a MySQL version which does not support all features that Friendica uses. You should consider switching to MariaDB."] = "Stai usando una versione di MySQL che non supporta tutte le funzionalità che Friendica usa. Dovresti considerare di utilizzare MariaDB."; -$a->strings["Normal Account"] = "Account normale"; -$a->strings["Soapbox Account"] = "Account per comunicati e annunci"; -$a->strings["Community/Celebrity Account"] = "Account per celebrità o per comunità"; -$a->strings["Automatic Friend Account"] = "Account per amicizia automatizzato"; -$a->strings["Blog Account"] = "Account Blog"; -$a->strings["Private Forum"] = "Forum Privato"; -$a->strings["Message queues"] = "Code messaggi"; -$a->strings["Summary"] = "Sommario"; -$a->strings["Registered users"] = "Utenti registrati"; -$a->strings["Pending registrations"] = "Registrazioni in attesa"; -$a->strings["Version"] = "Versione"; -$a->strings["Active plugins"] = "Plugin attivi"; -$a->strings["Can not parse base url. Must have at least ://"] = "Impossibile analizzare l'url base. Deve avere almeno [schema]://[dominio]"; -$a->strings["Site settings updated."] = "Impostazioni del sito aggiornate."; -$a->strings["No community page"] = "Nessuna pagina Comunità"; -$a->strings["Public postings from users of this site"] = "Messaggi pubblici dagli utenti di questo sito"; -$a->strings["Global community page"] = "Pagina Comunità globale"; -$a->strings["At post arrival"] = "All'arrivo di un messaggio"; -$a->strings["Users, Global Contacts"] = "Utenti, Contatti Globali"; -$a->strings["Users, Global Contacts/fallback"] = "Utenti, Contatti Globali/fallback"; -$a->strings["One month"] = "Un mese"; -$a->strings["Three months"] = "Tre mesi"; -$a->strings["Half a year"] = "Sei mesi"; -$a->strings["One year"] = "Un anno"; -$a->strings["Multi user instance"] = "Istanza multi utente"; -$a->strings["Closed"] = "Chiusa"; -$a->strings["Requires approval"] = "Richiede l'approvazione"; -$a->strings["Open"] = "Aperta"; -$a->strings["No SSL policy, links will track page SSL state"] = "Nessuna gestione SSL, i link seguiranno lo stato SSL della pagina"; -$a->strings["Force all links to use SSL"] = "Forza tutti i link ad usare SSL"; -$a->strings["Self-signed certificate, use SSL for local links only (discouraged)"] = "Certificato auto-firmato, usa SSL solo per i link locali (sconsigliato)"; -$a->strings["File upload"] = "Caricamento file"; -$a->strings["Policies"] = "Politiche"; -$a->strings["Auto Discovered Contact Directory"] = "Elenco Contatti Scoperto Automaticamente"; -$a->strings["Performance"] = "Performance"; -$a->strings["Worker"] = "Worker"; -$a->strings["Relocate - WARNING: advanced function. Could make this server unreachable."] = "Trasloca - ATTENZIONE: funzione avanzata! Può rendere questo server irraggiungibile."; -$a->strings["Site name"] = "Nome del sito"; -$a->strings["Host name"] = "Nome host"; -$a->strings["Sender Email"] = "Mittente email"; -$a->strings["The email address your server shall use to send notification emails from."] = "L'indirizzo email che il tuo server dovrà usare per inviare notifiche via email."; -$a->strings["Banner/Logo"] = "Banner/Logo"; -$a->strings["Shortcut icon"] = "Icona shortcut"; -$a->strings["Link to an icon that will be used for browsers."] = "Link verso un'icona che verrà usata dai browser."; -$a->strings["Touch icon"] = "Icona touch"; -$a->strings["Link to an icon that will be used for tablets and mobiles."] = "Link verso un'icona che verrà usata dai tablet e i telefonini."; -$a->strings["Additional Info"] = "Informazioni aggiuntive"; -$a->strings["For public servers: you can add additional information here that will be listed at %s/siteinfo."] = "Per server pubblici: puoi aggiungere informazioni extra che verrano mostrate su %s/siteinfo."; -$a->strings["System language"] = "Lingua di sistema"; -$a->strings["System theme"] = "Tema di sistema"; -$a->strings["Default system theme - may be over-ridden by user profiles - change theme settings"] = "Tema di sistema - può essere sovrascritto dalle impostazioni utente - cambia le impostazioni del tema"; -$a->strings["Mobile system theme"] = "Tema mobile di sistema"; -$a->strings["Theme for mobile devices"] = "Tema per dispositivi mobili"; -$a->strings["SSL link policy"] = "Gestione link SSL"; -$a->strings["Determines whether generated links should be forced to use SSL"] = "Determina se i link generati devono essere forzati a usare SSL"; -$a->strings["Force SSL"] = "Forza SSL"; -$a->strings["Force all Non-SSL requests to SSL - Attention: on some systems it could lead to endless loops."] = "Forza tutte le richieste non SSL su SSL - Attenzione: su alcuni sistemi può portare a loop senza fine"; -$a->strings["Hide help entry from navigation menu"] = "Nascondi la voce 'Guida' dal menu di navigazione"; -$a->strings["Hides the menu entry for the Help pages from the navigation menu. You can still access it calling /help directly."] = "Nasconde la voce per le pagine della guida dal menu di navigazione. E' comunque possibile accedervi richiamando /help direttamente."; -$a->strings["Single user instance"] = "Istanza a singolo utente"; -$a->strings["Make this instance multi-user or single-user for the named user"] = "Rendi questa istanza multi utente o a singolo utente per l'utente selezionato"; -$a->strings["Maximum image size"] = "Massima dimensione immagini"; -$a->strings["Maximum size in bytes of uploaded images. Default is 0, which means no limits."] = "Massima dimensione in byte delle immagini caricate. Il default è 0, cioè nessun limite."; -$a->strings["Maximum image length"] = "Massima lunghezza immagine"; -$a->strings["Maximum length in pixels of the longest side of uploaded images. Default is -1, which means no limits."] = "Massima lunghezza in pixel del lato più lungo delle immagini caricate. Predefinito a -1, ovvero nessun limite."; -$a->strings["JPEG image quality"] = "Qualità immagini JPEG"; -$a->strings["Uploaded JPEGS will be saved at this quality setting [0-100]. Default is 100, which is full quality."] = "Le immagini JPEG caricate verranno salvate con questa qualità [0-100]. Predefinito è 100, ovvero qualità piena."; -$a->strings["Register policy"] = "Politica di registrazione"; -$a->strings["Maximum Daily Registrations"] = "Massime registrazioni giornaliere"; -$a->strings["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."] = "Se la registrazione è permessa, qui si definisce il massimo numero di nuovi utenti registrati da accettare giornalmente. Se la registrazione è chiusa, questa impostazione non ha effetto."; -$a->strings["Register text"] = "Testo registrazione"; -$a->strings["Will be displayed prominently on the registration page."] = "Sarà mostrato ben visibile nella pagina di registrazione."; -$a->strings["Accounts abandoned after x days"] = "Account abbandonati dopo x giorni"; -$a->strings["Will not waste system resources polling external sites for abandonded accounts. Enter 0 for no time limit."] = "Non spreca risorse di sistema controllando siti esterni per gli account abbandonati. Immettere 0 per nessun limite di tempo."; -$a->strings["Allowed friend domains"] = "Domini amici consentiti"; -$a->strings["Comma separated list of domains which are allowed to establish friendships with this site. Wildcards are accepted. Empty to allow any domains"] = "Elenco separato da virgola dei domini che possono stabilire amicizie con questo sito. Sono accettati caratteri jolly. Vuoto per accettare qualsiasi dominio."; -$a->strings["Allowed email domains"] = "Domini email consentiti"; -$a->strings["Comma separated list of domains which are allowed in email addresses for registrations to this site. Wildcards are accepted. Empty to allow any domains"] = "Elenco separato da virgola dei domini permessi come indirizzi email in fase di registrazione a questo sito. Sono accettati caratteri jolly. Lascalo vuoto per accettare qualsiasi dominio."; -$a->strings["Block public"] = "Blocca pagine pubbliche"; -$a->strings["Check to block public access to all otherwise public personal pages on this site unless you are currently logged in."] = "Seleziona per bloccare l'accesso pubblico a tutte le pagine personali di questo sito, a meno di essere loggato."; -$a->strings["Force publish"] = "Forza pubblicazione"; -$a->strings["Check to force all profiles on this site to be listed in the site directory."] = "Seleziona per forzare tutti i profili di questo sito ad essere compresi nell'elenco di questo sito."; -$a->strings["Global directory URL"] = "URL della directory globale"; -$a->strings["URL to the global directory. If this is not set, the global directory is completely unavailable to the application."] = "URL dell'elenco globale. Se vuoto, l'elenco globale sarà completamente disabilitato."; -$a->strings["Allow threaded items"] = "Permetti commenti nidificati"; -$a->strings["Allow infinite level threading for items on this site."] = "Permette un infinito livello di nidificazione dei commenti su questo sito."; -$a->strings["Private posts by default for new users"] = "Post privati di default per i nuovi utenti"; -$a->strings["Set default post permissions for all new members to the default privacy group rather than public."] = "Imposta i permessi predefiniti dei post per tutti i nuovi utenti come privati per il gruppo predefinito, invece che pubblici."; -$a->strings["Don't include post content in email notifications"] = "Non includere il contenuto dei post nelle notifiche via email"; -$a->strings["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."] = "Non include il contenuti del post/commento/messaggio privato/etc. nelle notifiche email che sono inviate da questo sito, per privacy"; -$a->strings["Disallow public access to addons listed in the apps menu."] = "Disabilita l'accesso pubblico ai plugin raccolti nel menu apps."; -$a->strings["Checking this box will restrict addons listed in the apps menu to members only."] = "Selezionando questo box si limiterà ai soli membri l'accesso ai componenti aggiuntivi nel menu applicazioni"; -$a->strings["Don't embed private images in posts"] = "Non inglobare immagini private nei post"; -$a->strings["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."] = "Non sostituire le foto locali nei post con una copia incorporata dell'immagine. Questo significa che i contatti che riceveranno i post contenenti foto private dovranno autenticarsi e caricare ogni immagine, cosa che può richiedere un po' di tempo."; -$a->strings["Allow Users to set remote_self"] = "Permetti agli utenti di impostare 'io remoto'"; -$a->strings["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."] = "Selezionando questo, a tutti gli utenti sarà permesso di impostare qualsiasi contatto come 'io remoto' nella pagina di modifica del contatto. Impostare questa opzione fa si che tutti i messaggi di quel contatto vengano ripetuti nello stream dell'utente."; -$a->strings["Block multiple registrations"] = "Blocca registrazioni multiple"; -$a->strings["Disallow users to register additional accounts for use as pages."] = "Non permette all'utente di registrare account extra da usare come pagine."; -$a->strings["OpenID support"] = "Supporto OpenID"; -$a->strings["OpenID support for registration and logins."] = "Supporta OpenID per la registrazione e il login"; -$a->strings["Fullname check"] = "Controllo nome completo"; -$a->strings["Force users to register with a space between firstname and lastname in Full name, as an antispam measure"] = "Forza gli utenti a registrarsi con uno spazio tra il nome e il cognome in \"Nome completo\", come misura anti spam"; -$a->strings["Community Page Style"] = "Stile pagina Comunità"; -$a->strings["Type of community page to show. 'Global community' shows every public posting from an open distributed network that arrived on this server."] = "Tipo di pagina Comunità da mostrare. 'Comunità Globale' mostra tutti i messaggi pubblici arrivati su questo server da network aperti distribuiti."; -$a->strings["Posts per user on community page"] = "Messaggi per utente nella pagina Comunità"; -$a->strings["The maximum number of posts per user on the community page. (Not valid for 'Global Community')"] = "Il numero massimo di messaggi per utente mostrato nella pagina Comunità (non valido per 'Comunità globale')"; -$a->strings["Enable OStatus support"] = "Abilita supporto OStatus"; -$a->strings["Provide built-in OStatus (StatusNet, GNU Social etc.) compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed."] = "Fornisce la compatibilità integrata a OStatus (StatusNet, Gnu Social, etc.). Tutte le comunicazioni su OStatus sono pubbliche, quindi un avviso di privacy verrà mostrato occasionalmente."; -$a->strings["OStatus conversation completion interval"] = "Intervallo completamento conversazioni OStatus"; -$a->strings["How often shall the poller check for new entries in OStatus conversations? This can be a very ressource task."] = "quanto spesso il poller deve controllare se esistono nuovi commenti in una conversazione OStatus? Questo è un lavoro che può richiedere molte risorse."; -$a->strings["Only import OStatus threads from our contacts"] = "Importa conversazioni OStatus solo dai nostri contatti."; -$a->strings["Normally we import every content from our OStatus contacts. With this option we only store threads that are started by a contact that is known on our system."] = "Normalmente importiamo tutto il contenuto dai contatti OStatus. Con questa opzione salviamo solo le conversazioni iniziate da un contatto è conosciuto a questo nodo."; -$a->strings["OStatus support can only be enabled if threading is enabled."] = "Il supporto OStatus può essere abilitato solo se è abilitato il threading."; -$a->strings["Diaspora support can't be enabled because Friendica was installed into a sub directory."] = "Il supporto a Diaspora non può essere abilitato perché Friendica è stato installato in una sotto directory."; -$a->strings["Enable Diaspora support"] = "Abilita il supporto a Diaspora"; -$a->strings["Provide built-in Diaspora network compatibility."] = "Fornisce compatibilità con il network Diaspora."; -$a->strings["Only allow Friendica contacts"] = "Permetti solo contatti Friendica"; -$a->strings["All contacts must use Friendica protocols. All other built-in communication protocols disabled."] = "Tutti i contatti devono usare il protocollo di Friendica. Tutti gli altri protocolli sono disabilitati."; -$a->strings["Verify SSL"] = "Verifica SSL"; -$a->strings["If you wish, you can turn on strict certificate checking. This will mean you cannot connect (at all) to self-signed SSL sites."] = "Se vuoi, puoi abilitare il controllo rigoroso dei certificati.Questo significa che non potrai collegarti (del tutto) con siti con certificati SSL auto-firmati."; -$a->strings["Proxy user"] = "Utente Proxy"; -$a->strings["Proxy URL"] = "URL Proxy"; -$a->strings["Network timeout"] = "Timeout rete"; -$a->strings["Value is in seconds. Set to 0 for unlimited (not recommended)."] = "Valore in secondi. Imposta a 0 per illimitato (non raccomandato)."; -$a->strings["Maximum Load Average"] = "Massimo carico medio"; -$a->strings["Maximum system load before delivery and poll processes are deferred - default 50."] = "Massimo carico di sistema prima che i processi di invio e di poll siano ritardati. Predefinito a 50."; -$a->strings["Maximum Load Average (Frontend)"] = "Media Massimo Carico (Frontend)"; -$a->strings["Maximum system load before the frontend quits service - default 50."] = "Massimo carico di sistema prima che il frontend fermi il servizio - default 50."; -$a->strings["Minimal Memory"] = "Memoria Minima"; -$a->strings["Minimal free memory in MB for the poller. Needs access to /proc/meminfo - default 0 (deactivated)."] = "Minima memoria libera in MB per il poller. Necessita di avere accesso a /proc/meminfo - default 0 (disabilitato)."; -$a->strings["Maximum table size for optimization"] = "Dimensione massima della tabella per l'ottimizzazione"; -$a->strings["Maximum table size (in MB) for the automatic optimization - default 100 MB. Enter -1 to disable it."] = "La dimensione massima (in MB) per l'ottimizzazione automatica - default 100 MB. Inserisci -1 per disabilitarlo."; -$a->strings["Minimum level of fragmentation"] = "Livello minimo di frammentazione"; -$a->strings["Minimum fragmenation level to start the automatic optimization - default value is 30%."] = "Livello minimo di frammentazione per iniziare la procedura di ottimizzazione automatica - il valore di default è 30%."; -$a->strings["Periodical check of global contacts"] = "Check periodico dei contatti globali"; -$a->strings["If enabled, the global contacts are checked periodically for missing or outdated data and the vitality of the contacts and servers."] = "Se abilitato, i contatti globali sono controllati periodicamente per verificare dati mancanti o sorpassati e la vitalità dei contatti e dei server."; -$a->strings["Days between requery"] = "Giorni tra le richieste"; -$a->strings["Number of days after which a server is requeried for his contacts."] = "Numero di giorni dopo i quali al server vengono richiesti i suoi contatti."; -$a->strings["Discover contacts from other servers"] = "Trova contatti dagli altri server"; -$a->strings["Periodically query other servers for contacts. You can choose between 'users': the users on the remote system, 'Global Contacts': active contacts that are known on the system. The fallback is meant for Redmatrix servers and older friendica servers, where global contacts weren't available. The fallback increases the server load, so the recommened setting is 'Users, Global Contacts'."] = "Richiede periodicamente contatti agli altri server. Puoi scegliere tra 'utenti', gli utenti sul sistema remoto, o 'contatti globali', i contatti attivi che sono conosciuti dal sistema. Il fallback è pensato per i server Redmatrix e i vecchi server Friendica, dove i contatti globali non sono disponibili. Il fallback incrementa il carico di sistema, per cui l'impostazione consigliata è \"Utenti, Contatti Globali\"."; -$a->strings["Timeframe for fetching global contacts"] = "Termine per il recupero contatti globali"; -$a->strings["When the discovery is activated, this value defines the timeframe for the activity of the global contacts that are fetched from other servers."] = "Quando si attiva la scoperta, questo valore definisce il periodo di tempo per l'attività dei contatti globali che vengono prelevati da altri server."; -$a->strings["Search the local directory"] = "Cerca la directory locale"; -$a->strings["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."] = "Cerca nella directory locale invece che nella directory globale. Durante la ricerca a livello locale, ogni ricerca verrà eseguita sulla directory globale in background. Ciò migliora i risultati della ricerca quando la ricerca viene ripetuta."; -$a->strings["Publish server information"] = "Pubblica informazioni server"; -$a->strings["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 profiles, number of posts and the activated protocols and connectors. See the-federation.info for details."] = "Se abilitata, saranno pubblicati i dati generali del server e i dati di utilizzo. I dati contengono il nome e la versione del server, il numero di utenti con profili pubblici, numero dei posti e dei protocolli e connettori attivati. Per informazioni, vedere the-federation.info ."; -$a->strings["Suppress Tags"] = "Sopprimi Tags"; -$a->strings["Suppress showing a list of hashtags at the end of the posting."] = "Non mostra la lista di hashtag in coda al messaggio"; -$a->strings["Path to item cache"] = "Percorso cache elementi"; -$a->strings["The item caches buffers generated bbcode and external images."] = "La cache degli elementi memorizza il bbcode generato e le immagini esterne."; -$a->strings["Cache duration in seconds"] = "Durata della cache in secondi"; -$a->strings["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."] = "Quanto a lungo devono essere mantenuti i file di cache? Il valore predefinito è 86400 secondi (un giorno). Per disabilitare la cache, imposta il valore a -1."; -$a->strings["Maximum numbers of comments per post"] = "Numero massimo di commenti per post"; -$a->strings["How much comments should be shown for each post? Default value is 100."] = "Quanti commenti devono essere mostrati per ogni post? Default : 100."; -$a->strings["Temp path"] = "Percorso file temporanei"; -$a->strings["If you have a restricted system where the webserver can't access the system temp path, enter another path here."] = "Se si dispone di un sistema ristretto in cui il server web non può accedere al percorso temporaneo di sistema, inserire un altro percorso qui."; -$a->strings["Base path to installation"] = "Percorso base all'installazione"; -$a->strings["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."] = "Se il sistema non è in grado di rilevare il percorso corretto per l'installazione, immettere il percorso corretto qui. Questa impostazione deve essere inserita solo se si utilizza un sistema limitato e/o collegamenti simbolici al tuo webroot."; -$a->strings["Disable picture proxy"] = "Disabilita il proxy immagini"; -$a->strings["The picture proxy increases performance and privacy. It shouldn't be used on systems with very low bandwith."] = "Il proxy immagini aumenta le performance e la privacy. Non dovrebbe essere usato su server con poca banda disponibile."; -$a->strings["Only search in tags"] = "Cerca solo nei tag"; -$a->strings["On large systems the text search can slow down the system extremely."] = "Su server con molti dati, la ricerca nel testo può estremamente rallentare il sistema."; -$a->strings["New base url"] = "Nuovo url base"; -$a->strings["Change base url for this server. Sends relocate message to all DFRN contacts of all users."] = "Cambia l'url base di questo server. Invia il messaggio di trasloco a tutti i contatti DFRN di tutti gli utenti."; -$a->strings["RINO Encryption"] = "Crittografia RINO"; -$a->strings["Encryption layer between nodes."] = "Crittografia delle comunicazioni tra nodi."; -$a->strings["Maximum number of parallel workers"] = "Massimo numero di lavori in parallelo"; -$a->strings["On shared hosters set this to 2. On larger systems, values of 10 are great. Default value is 4."] = "Su host condivisi imposta a 2. Su sistemi più grandi, valori fino a 10 vanno bene. Il valore di default è 4."; -$a->strings["Don't use 'proc_open' with the worker"] = "Non usare 'proc_open' con il worker"; -$a->strings["Enable this if your system doesn't allow the use of 'proc_open'. This can happen on shared hosters. If this is enabled you should increase the frequency of poller calls in your crontab."] = "Abilita se il tuo sistema non consente l'utilizzo di 'proc_open'. Può succedere con gli hosting condivisi. Se abiliti questa opzione, dovresti aumentare la frequenza delle chiamate al poller nel tuo crontab."; -$a->strings["Enable fastlane"] = "Abilita fastlane"; -$a->strings["When enabed, the fastlane mechanism starts an additional worker if processes with higher priority are blocked by processes of lower priority."] = "Quando abilitato, il meccanismo di fastlane avvia processi aggiuntivi se processi con priorità più alta sono bloccati da processi con priorità più bassa."; -$a->strings["Enable frontend worker"] = "Abilita worker da frontend"; -$a->strings["When enabled the Worker process is triggered when backend access is performed (e.g. messages being delivered). On smaller sites you might want to call yourdomain.tld/worker on a regular basis via an external cron job. You should only enable this option if you cannot utilize cron/scheduled jobs on your server. The worker background process needs to be activated for this."] = "Quando abilitato, il processo è avviato quando viene eseguito un accesso al backend (per esempio, quando un messaggio viene consegnato). Su siti più piccoli potresti voler chiamare yourdomain.tld/worker regolarmente attraverso un cron esterno. Dovresti abilitare questa opzione solo se non puoi utilizzare cron sul tuo server. L'elaborazione in background con worker deve essere abilitata perchè questa opzione sia effettiva."; -$a->strings["Update has been marked successful"] = "L'aggiornamento è stato segnato come di successo"; -$a->strings["Database structure update %s was successfully applied."] = "Aggiornamento struttura database %s applicata con successo."; -$a->strings["Executing of database structure update %s failed with error: %s"] = "Aggiornamento struttura database %s fallita con errore: %s"; -$a->strings["Executing %s failed with error: %s"] = "Esecuzione di %s fallita con errore: %s"; -$a->strings["Update %s was successfully applied."] = "L'aggiornamento %s è stato applicato con successo"; -$a->strings["Update %s did not return a status. Unknown if it succeeded."] = "L'aggiornamento %s non ha riportato uno stato. Non so se è andato a buon fine."; -$a->strings["There was no additional update function %s that needed to be called."] = "Non ci sono altre funzioni di aggiornamento %s da richiamare."; -$a->strings["No failed updates."] = "Nessun aggiornamento fallito."; -$a->strings["Check database structure"] = "Controlla struttura database"; -$a->strings["Failed Updates"] = "Aggiornamenti falliti"; -$a->strings["This does not include updates prior to 1139, which did not return a status."] = "Questo non include gli aggiornamenti prima del 1139, che non ritornano lo stato."; -$a->strings["Mark success (if update was manually applied)"] = "Segna completato (se l'update è stato applicato manualmente)"; -$a->strings["Attempt to execute this update step automatically"] = "Cerco di eseguire questo aggiornamento in automatico"; -$a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "\nGentile %1\$s,\n l'amministratore di %2\$s ha impostato un account per te."; -$a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "\nI dettagli del tuo utente sono:\n Indirizzo del sito: %1\$s\n Nome utente: %2\$s\n Password: %3\$s\n\nPuoi cambiare la tua password dalla pagina delle impostazioni del tuo account dopo esserti autenticato.\n\nPer favore, prenditi qualche momento per esaminare tutte le impostazioni presenti.\n\nPotresti voler aggiungere qualche informazione di base al tuo profilo predefinito (nella pagina \"Profili\"), così che le altre persone possano trovarti più facilmente.\n\nTi raccomandiamo di inserire il tuo nome completo, aggiungere una foto, aggiungere qualche parola chiave del profilo (molto utili per trovare nuovi contatti), e magari in quale nazione vivi, se non vuoi essere più specifico di così.\n\nNoi rispettiamo appieno la tua privacy, e nessuna di queste informazioni è necessaria o obbligatoria.\nSe sei nuovo e non conosci nessuno qui, possono aiutarti a trovare qualche nuovo e interessante contatto.\n\nGrazie e benvenuto su %4\$s"; -$a->strings["%s user blocked/unblocked"] = array( - 0 => "%s utente bloccato/sbloccato", - 1 => "%s utenti bloccati/sbloccati", -); -$a->strings["%s user deleted"] = array( - 0 => "%s utente cancellato", - 1 => "%s utenti cancellati", -); -$a->strings["User '%s' deleted"] = "Utente '%s' cancellato"; -$a->strings["User '%s' unblocked"] = "Utente '%s' sbloccato"; -$a->strings["User '%s' blocked"] = "Utente '%s' bloccato"; -$a->strings["Register date"] = "Data registrazione"; -$a->strings["Last login"] = "Ultimo accesso"; -$a->strings["Last item"] = "Ultimo elemento"; -$a->strings["Add User"] = "Aggiungi utente"; -$a->strings["select all"] = "seleziona tutti"; -$a->strings["User registrations waiting for confirm"] = "Richieste di registrazione in attesa di conferma"; -$a->strings["User waiting for permanent deletion"] = "Utente in attesa di cancellazione definitiva"; -$a->strings["Request date"] = "Data richiesta"; -$a->strings["No registrations."] = "Nessuna registrazione."; -$a->strings["Note from the user"] = "Nota dall'utente"; -$a->strings["Deny"] = "Nega"; -$a->strings["Site admin"] = "Amministrazione sito"; -$a->strings["Account expired"] = "Account scaduto"; -$a->strings["New User"] = "Nuovo Utente"; -$a->strings["Deleted since"] = "Rimosso da"; -$a->strings["Selected users will be deleted!\\n\\nEverything these users had posted on this site will be permanently deleted!\\n\\nAre you sure?"] = "Gli utenti selezionati saranno cancellati!\\n\\nTutto quello che gli utenti hanno inviato su questo sito sarà permanentemente canellato!\\n\\nSei sicuro?"; -$a->strings["The user {0} will be deleted!\\n\\nEverything this user has posted on this site will be permanently deleted!\\n\\nAre you sure?"] = "L'utente {0} sarà cancellato!\\n\\nTutto quello che ha inviato su questo sito sarà permanentemente cancellato!\\n\\nSei sicuro?"; -$a->strings["Name of the new user."] = "Nome del nuovo utente."; -$a->strings["Nickname"] = "Nome utente"; -$a->strings["Nickname of the new user."] = "Nome utente del nuovo utente."; -$a->strings["Email address of the new user."] = "Indirizzo Email del nuovo utente."; -$a->strings["Plugin %s disabled."] = "Plugin %s disabilitato."; -$a->strings["Plugin %s enabled."] = "Plugin %s abilitato."; -$a->strings["Disable"] = "Disabilita"; -$a->strings["Enable"] = "Abilita"; -$a->strings["Toggle"] = "Inverti"; -$a->strings["Author: "] = "Autore: "; -$a->strings["Maintainer: "] = "Manutentore: "; -$a->strings["Reload active plugins"] = "Ricarica i plugin attivi"; -$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"] = "Non sono disponibili componenti aggiuntivi sul tuo nodo. Puoi trovare il repository ufficiale dei plugin su %1\$s e potresti trovare altri plugin interessanti nell'open plugin repository su %2\$s"; -$a->strings["No themes found."] = "Nessun tema trovato."; -$a->strings["Screenshot"] = "Anteprima"; -$a->strings["Reload active themes"] = "Ricarica i temi attivi"; -$a->strings["No themes found on the system. They should be paced in %1\$s"] = "Non sono stati trovati temi sul tuo sistema. Dovrebbero essere in %1\$s"; -$a->strings["[Experimental]"] = "[Sperimentale]"; -$a->strings["[Unsupported]"] = "[Non supportato]"; -$a->strings["Log settings updated."] = "Impostazioni Log aggiornate."; -$a->strings["PHP log currently enabled."] = "Log PHP abilitato."; -$a->strings["PHP log currently disabled."] = "Log PHP disabilitato"; -$a->strings["Clear"] = "Pulisci"; -$a->strings["Enable Debugging"] = "Abilita Debugging"; -$a->strings["Log file"] = "File di Log"; -$a->strings["Must be writable by web server. Relative to your Friendica top-level directory."] = "Il server web deve avere i permessi di scrittura. Relativo alla tua directory Friendica."; -$a->strings["Log level"] = "Livello di Log"; -$a->strings["PHP logging"] = "Log PHP"; -$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."] = "Per abilitare il log degli errori e degli avvisi di PHP puoi aggiungere le seguenti righe al file .htconfig.php nella tua installazione. La posizione del file impostato in 'error_log' è relativa alla directory principale della tua installazione Friendica e il server web deve avere i permessi di scrittura sul file. Il valore '1' per 'log_errors' e 'display_errors' abilita le opzioni, imposta '0' per disabilitarle."; -$a->strings["Lock feature %s"] = "Blocca funzionalità %s"; -$a->strings["Manage Additional Features"] = "Gestisci Funzionalità Aggiuntive"; +$a->strings["Invalid request."] = "Richiesta non valida."; +$a->strings["Sorry, maybe your upload is bigger than the PHP configuration allows"] = "Mi spiace, forse il file che stai caricando è più grosso di quanto la configurazione di PHP permetta"; +$a->strings["Or - did you try to upload an empty file?"] = "O.. non avrai provato a caricare un file vuoto?"; +$a->strings["File exceeds size limit of %s"] = "Il file supera la dimensione massima di %s"; +$a->strings["File upload failed."] = "Caricamento del file non riuscito."; +$a->strings["This entry was edited"] = "Questa voce è stata modificata"; +$a->strings["save to folder"] = "salva nella cartella"; +$a->strings["I will attend"] = "Parteciperò"; +$a->strings["I will not attend"] = "Non parteciperò"; +$a->strings["I might attend"] = "Forse parteciperò"; +$a->strings["add star"] = "aggiungi a speciali"; +$a->strings["remove star"] = "rimuovi da speciali"; +$a->strings["toggle star status"] = "Inverti stato preferito"; +$a->strings["starred"] = "preferito"; +$a->strings["ignore thread"] = "ignora la discussione"; +$a->strings["unignore thread"] = "non ignorare la discussione"; +$a->strings["toggle ignore status"] = "inverti stato \"Ignora\""; +$a->strings["add tag"] = "aggiungi tag"; +$a->strings["like"] = "mi piace"; +$a->strings["dislike"] = "non mi piace"; +$a->strings["Share this"] = "Condividi questo"; +$a->strings["share"] = "condividi"; +$a->strings["to"] = "a"; $a->strings["via"] = "via"; +$a->strings["Wall-to-Wall"] = "Da bacheca a bacheca"; +$a->strings["via Wall-To-Wall:"] = "da bacheca a bacheca"; +$a->strings["%d comment"] = array( + 0 => "%d commento", + 1 => "%d commenti", +); +$a->strings["Bold"] = "Grassetto"; +$a->strings["Italic"] = "Corsivo"; +$a->strings["Underline"] = "Sottolineato"; +$a->strings["Quote"] = "Citazione"; +$a->strings["Code"] = "Codice"; +$a->strings["Image"] = "Immagine"; +$a->strings["Link"] = "Link"; +$a->strings["Video"] = "Video"; $a->strings["greenzero"] = "greenzero"; $a->strings["purplezero"] = "purplezero"; $a->strings["easterbunny"] = "easterbunny"; @@ -2011,16 +2040,6 @@ $a->strings["darkzero"] = "darkzero"; $a->strings["comix"] = "comix"; $a->strings["slackr"] = "slackr"; $a->strings["Variations"] = "Varianti"; -$a->strings["Default"] = "Default"; -$a->strings["Note: "] = "Nota:"; -$a->strings["Check image permissions if all users are allowed to visit the image"] = "Controlla i permessi dell'immagine se tutti gli utenti sono autorizzati a vederla"; -$a->strings["Select scheme"] = "Seleziona schema"; -$a->strings["Navigation bar background color"] = "Colore di sfondo barra di navigazione"; -$a->strings["Navigation bar icon color "] = "Colore icona barra di navigazione"; -$a->strings["Link color"] = "Colore link"; -$a->strings["Set the background color"] = "Imposta il colore di sfondo"; -$a->strings["Content background transparency"] = "Trasparenza sfondo contenuto"; -$a->strings["Set the background image"] = "Imposta l'immagine di sfondo"; $a->strings["Repeat the image"] = "Ripeti l'immagine"; $a->strings["Will repeat your image to fill the background."] = "Ripete l'immagine per riempire lo sfondo."; $a->strings["Stretch"] = "Stira"; @@ -2029,6 +2048,16 @@ $a->strings["Resize fill and-clip"] = "Scala e ritaglia"; $a->strings["Resize to fill and retain aspect ratio."] = "Scala l'immagine a riempire mantenendo le proporzioni."; $a->strings["Resize best fit"] = "Scala best fit"; $a->strings["Resize to best fit and retain aspect ratio."] = "Scala l'immagine alla miglior dimensione per riempire mantenendo le proporzioni."; +$a->strings["Default"] = "Default"; +$a->strings["Note"] = ""; +$a->strings["Check image permissions if all users are allowed to visit the image"] = "Controlla i permessi dell'immagine se tutti gli utenti sono autorizzati a vederla"; +$a->strings["Select scheme"] = "Seleziona schema"; +$a->strings["Navigation bar background color"] = "Colore di sfondo barra di navigazione"; +$a->strings["Navigation bar icon color "] = "Colore icona barra di navigazione"; +$a->strings["Link color"] = "Colore link"; +$a->strings["Set the background color"] = "Imposta il colore di sfondo"; +$a->strings["Content background transparency"] = "Trasparenza sfondo contenuto"; +$a->strings["Set the background image"] = "Imposta l'immagine di sfondo"; $a->strings["Guest"] = "Ospite"; $a->strings["Visitor"] = "Visitatore"; $a->strings["Alignment"] = "Allineamento"; @@ -2037,17 +2066,16 @@ $a->strings["Center"] = "Centrato"; $a->strings["Color scheme"] = "Schema colori"; $a->strings["Posts font size"] = "Dimensione caratteri post"; $a->strings["Textareas font size"] = "Dimensione caratteri nelle aree di testo"; +$a->strings["Community Profiles"] = "Profili Comunità"; +$a->strings["Last users"] = "Ultimi utenti"; +$a->strings["Find Friends"] = "Trova Amici"; +$a->strings["Local Directory"] = "Elenco Locale"; +$a->strings["Quick Start"] = "Quick Start"; +$a->strings["Connect Services"] = "Servizi connessi"; $a->strings["Comma separated list of helper forums"] = "Lista separata da virgola di forum di aiuto"; $a->strings["Set style"] = "Imposta stile"; $a->strings["Community Pages"] = "Pagine Comunitarie"; -$a->strings["Community Profiles"] = "Profili Comunità"; $a->strings["Help or @NewHere ?"] = "Serve aiuto? Sei nuovo?"; -$a->strings["Connect Services"] = "Servizi connessi"; -$a->strings["Find Friends"] = "Trova Amici"; -$a->strings["Last users"] = "Ultimi utenti"; -$a->strings["Local Directory"] = "Elenco Locale"; -$a->strings["Quick Start"] = "Quick Start"; -$a->strings["toggle mobile"] = "commuta tema mobile"; $a->strings["Delete this item?"] = "Cancellare questo elemento?"; $a->strings["show fewer"] = "mostra di meno"; $a->strings["Update %s failed. See error logs."] = "aggiornamento %s fallito. Guarda i log di errore."; @@ -2060,3 +2088,4 @@ $a->strings["Website Terms of Service"] = "Condizioni di servizio del sito web " $a->strings["terms of service"] = "condizioni del servizio"; $a->strings["Website Privacy Policy"] = "Politiche di privacy del sito"; $a->strings["privacy policy"] = "politiche di privacy"; +$a->strings["toggle mobile"] = "commuta tema mobile"; From 7c3fd2adb5364385ed51b3ec8ab3613430caf20e Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 22 Nov 2017 07:21:19 +0000 Subject: [PATCH 086/175] Some more replaced old database functions --- include/dba.php | 14 ++---- include/event.php | 2 +- include/items.php | 20 ++------ include/like.php | 4 +- include/oauth.php | 2 +- include/oembed.php | 8 +-- include/plugin.php | 105 ++++++++++++++++------------------------ include/queue_fn.php | 4 +- include/threads.php | 2 +- src/Worker/CronJobs.php | 11 +++-- 10 files changed, 65 insertions(+), 107 deletions(-) diff --git a/include/dba.php b/include/dba.php index 79c15c85b..642539a75 100644 --- a/include/dba.php +++ b/include/dba.php @@ -1016,16 +1016,12 @@ class dba { public static function update($table, $fields, $condition, $old_fields = array()) { $table = self::escape($table); - if (count($condition) > 0) { - $array_element = each($condition); - $array_key = $array_element['key']; - if (is_int($array_key)) { - $condition_string = " WHERE ".array_shift($condition); - } else { - $condition_string = " WHERE `".implode("` = ? AND `", array_keys($condition))."` = ?"; - } + $array_element = each($condition); + $array_key = $array_element['key']; + if (is_int($array_key)) { + $condition_string = " WHERE ".array_shift($condition); } else { - $condition_string = ""; + $condition_string = " WHERE `".implode("` = ? AND `", array_keys($condition))."` = ?"; } if (is_bool($old_fields)) { diff --git a/include/event.php b/include/event.php index 9a74551bc..4ecc411b7 100644 --- a/include/event.php +++ b/include/event.php @@ -216,7 +216,7 @@ function event_delete($event_id) { return; } - q("DELETE FROM `event` WHERE `id` = %d", intval($event_id)); + dba::delete('event', array('id' => $event_id)); logger("Deleted event ".$event_id, LOGGER_DEBUG); } diff --git a/include/items.php b/include/items.php index 1f5511217..b25191534 100644 --- a/include/items.php +++ b/include/items.php @@ -2122,7 +2122,7 @@ function drop_item($id, $interactive = true) { } - if ((local_user() == $item['uid']) || ($contact_id) || (! $interactive)) { + if ((local_user() == $item['uid']) || $contact_id || !$interactive) { // Check if we should do HTML-based delete confirmation if ($_REQUEST['confirm']) { @@ -2189,30 +2189,18 @@ function drop_item($id, $interactive = true) { * generate a resource-id and therefore aren't intimately linked to the item. */ if (strlen($item['resource-id'])) { - q("DELETE FROM `photo` WHERE `resource-id` = '%s' AND `uid` = %d ", - dbesc($item['resource-id']), - intval($item['uid']) - ); - // ignore the result + dba::delete('photo', array('resource-id' => $item['resource-id'], 'uid' => $item['uid'])); } // If item is a link to an event, nuke the event record. if (intval($item['event-id'])) { - q("DELETE FROM `event` WHERE `id` = %d AND `uid` = %d", - intval($item['event-id']), - intval($item['uid']) - ); - // ignore the result + dba::delete('event', array('id' => $item['event-id'], 'uid' => $item['uid'])); } // If item has attachments, drop them foreach (explode(", ", $item['attach']) as $attach) { preg_match("|attach/(\d+)|", $attach, $matches); - q("DELETE FROM `attach` WHERE `id` = %d AND `uid` = %d", - intval($matches[1]), - local_user() - ); - // ignore the result + dba::delete('attach', array('id' => $matches[1], 'uid' => $item['uid'])); } // The new code splits the queries since the mysql optimizer really has bad problems with subqueries diff --git a/include/like.php b/include/like.php index e6f1aab6d..96cc477b8 100644 --- a/include/like.php +++ b/include/like.php @@ -163,9 +163,7 @@ function do_like($item_id, $verb) { // Clean up the Diaspora signatures for this like // Go ahead and do it even if Diaspora support is disabled. We still want to clean up // if it had been enabled in the past - q("DELETE FROM `sign` WHERE `iid` = %d", - intval($like_item['id']) - ); + dba::delete('sign', array('iid' => $like_item['id'])); $like_item_id = $like_item['id']; Worker::add(PRIORITY_HIGH, "Notifier", "like", $like_item_id); diff --git a/include/oauth.php b/include/oauth.php index bb1227868..c6993d05b 100644 --- a/include/oauth.php +++ b/include/oauth.php @@ -113,7 +113,7 @@ class FKOAuthDataStore extends OAuthDataStore { } - q("DELETE FROM tokens WHERE id='%s'", $token->key); + dba::delete('tokens', array('id' => $token->key)); if (!is_null($ret) && $uverifier!==false){ diff --git a/include/oembed.php b/include/oembed.php index 74ce90dd1..b7c1616fe 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -28,17 +28,17 @@ function oembed_replacecb($matches){ * @return bool|object Returns object with embed content or false if no embedable * content exists */ -function oembed_fetch_url($embedurl, $no_rich_type = false){ +function oembed_fetch_url($embedurl, $no_rich_type = false) { $embedurl = trim($embedurl, "'"); $embedurl = trim($embedurl, '"'); $a = get_app(); - $r = q("SELECT * FROM `oembed` WHERE `url` = '%s'", - dbesc(normalise_link($embedurl))); + $condition = array('url' => normalise_link($embedurl)); + $r = dba::select('oembed', array('content'), $condition, array('limit' => 1)); if (DBM::is_result($r)) { - $txt = $r[0]["content"]; + $txt = $r["content"]; } else { $txt = Cache::get($a->videowidth . $embedurl); } diff --git a/include/plugin.php b/include/plugin.php index 2814b2464..276c36bd2 100644 --- a/include/plugin.php +++ b/include/plugin.php @@ -16,19 +16,16 @@ use Friendica\Database\DBM; * @param string $plugin name of the addon * @return boolean */ -if (! function_exists('uninstall_plugin')){ -function uninstall_plugin($plugin){ +function uninstall_plugin($plugin) { logger("Addons: uninstalling " . $plugin); - q("DELETE FROM `addon` WHERE `name` = '%s' ", - dbesc($plugin) - ); + dba::delete('addon', array('name' => $plugin)); @include_once('addon/' . $plugin . '/' . $plugin . '.php'); if (function_exists($plugin . '_uninstall')) { $func = $plugin . '_uninstall'; $func(); } -}} +} /** * @brief installs an addon. @@ -36,12 +33,12 @@ function uninstall_plugin($plugin){ * @param string $plugin name of the addon * @return bool */ -if (! function_exists('install_plugin')){ function install_plugin($plugin) { // silently fail if plugin was removed - if (! file_exists('addon/' . $plugin . '/' . $plugin . '.php')) + if (!file_exists('addon/' . $plugin . '/' . $plugin . '.php')) { return false; + } logger("Addons: installing " . $plugin); $t = @filemtime('addon/' . $plugin . '/' . $plugin . '.php'); @include_once('addon/' . $plugin . '/' . $plugin . '.php'); @@ -62,26 +59,24 @@ function install_plugin($plugin) { dba::update('addon', array('hidden' => true), array('name' => $plugin)); } return true; - } - else { + } else { logger("Addons: FAILED installing " . $plugin); return false; } - -}} +} // reload all updated plugins -if (! function_exists('reload_plugins')) { function reload_plugins() { - $plugins = Config::get('system','addon'); + $plugins = Config::get('system', 'addon'); if (strlen($plugins)) { $r = q("SELECT * FROM `addon` WHERE `installed` = 1"); - if (DBM::is_result($r)) + if (DBM::is_result($r)) { $installed = $r; - else + } else { $installed = array(); + } $parr = explode(',',$plugins); @@ -115,7 +110,7 @@ function reload_plugins() { } } -}} +} /** * @brief check if addon is enabled @@ -137,21 +132,17 @@ function plugin_enabled($plugin) { * @param int $priority A priority (defaults to 0) * @return mixed|bool */ -if (! function_exists('register_hook')) { -function register_hook($hook,$file,$function,$priority=0) { - - $r = q("SELECT * FROM `hook` WHERE `hook` = '%s' AND `file` = '%s' AND `function` = '%s' LIMIT 1", - dbesc($hook), - dbesc($file), - dbesc($function) - ); - if (DBM::is_result($r)) +function register_hook($hook, $file, $function, $priority=0) { + $condition = array('hook' => $hook, 'file' => $file, 'function' => $function); + $exists = dba::exists('hook', $condition); + if ($exists) { return true; + } $r = dba::insert('hook', array('hook' => $hook, 'file' => $file, 'function' => $function, 'priority' => $priority)); return $r; -}} +} /** * @brief unregisters a hook. @@ -161,16 +152,11 @@ function register_hook($hook,$file,$function,$priority=0) { * @param string $function the name of the function that the hook called * @return array */ -if (! function_exists('unregister_hook')) { -function unregister_hook($hook,$file,$function) { - - $r = q("DELETE FROM `hook` WHERE `hook` = '%s' AND `file` = '%s' AND `function` = '%s'", - dbesc($hook), - dbesc($file), - dbesc($function) - ); +function unregister_hook($hook, $file, $function) { + $condition = array('hook' => $hook, 'file' => $file, 'function' => $function); + $r = dba::delete('hook', $condition); return $r; -}} +} function load_hooks() { @@ -224,17 +210,13 @@ function call_single_hook($a, $name, $hook, &$data = null) { $func($a, $data); } else { // remove orphan hooks - q("DELETE FROM `hook` WHERE `hook` = '%s' AND `file` = '%s' AND `function` = '%s'", - dbesc($name), - dbesc($hook[0]), - dbesc($hook[1]) - ); + $condition = array('hook' => $name, 'file' => $hook[0], 'function' => $hook[1]); + dba::delete('hook', $condition); } } //check if an app_menu hook exist for plugin $name. //Return true if the plugin is an app -if (! function_exists('plugin_is_app')) { function plugin_is_app($name) { $a = get_app(); @@ -246,7 +228,7 @@ function plugin_is_app($name) { } return false; -}} +} /** * @brief Parse plugin comment in search of plugin infos. @@ -264,8 +246,7 @@ function plugin_is_app($name) { * @return array with the plugin information */ -if (! function_exists('get_plugin_info')){ -function get_plugin_info($plugin){ +function get_plugin_info($plugin) { $a = get_app(); @@ -285,14 +266,14 @@ function get_plugin_info($plugin){ $r = preg_match("|/\*.*\*/|msU", $f, $m); - if ($r){ + if ($r) { $ll = explode("\n", $m[0]); foreach ( $ll as $l ) { $l = trim($l,"\t\n\r */"); - if ($l!=""){ + if ($l != "") { list($k,$v) = array_map("trim", explode(":",$l,2)); $k= strtolower($k); - if ($k=="author"){ + if ($k == "author") { $r=preg_match("|([^<]+)<([^>]+)>|", $v, $m); if ($r) { $info['author'][] = array('name'=>$m[1], 'link'=>$m[2]); @@ -300,7 +281,7 @@ function get_plugin_info($plugin){ $info['author'][] = array('name'=>$v); } } else { - if (array_key_exists($k,$info)){ + if (array_key_exists($k,$info)) { $info[$k]=$v; } } @@ -310,7 +291,7 @@ function get_plugin_info($plugin){ } return $info; -}} +} /** @@ -329,8 +310,7 @@ function get_plugin_info($plugin){ * @return array */ -if (! function_exists('get_theme_info')){ -function get_theme_info($theme){ +function get_theme_info($theme) { $info=Array( 'name' => $theme, 'description' => "", @@ -356,14 +336,14 @@ function get_theme_info($theme){ $r = preg_match("|/\*.*\*/|msU", $f, $m); - if ($r){ + if ($r) { $ll = explode("\n", $m[0]); foreach ( $ll as $l ) { $l = trim($l,"\t\n\r */"); - if ($l!=""){ + if ($l != "") { list($k,$v) = array_map("trim", explode(":",$l,2)); $k= strtolower($k); - if ($k=="author"){ + if ($k == "author") { $r=preg_match("|([^<]+)<([^>]+)>|", $v, $m); if ($r) { @@ -371,8 +351,7 @@ function get_theme_info($theme){ } else { $info['author'][] = array('name'=>$v); } - } - elseif ($k=="maintainer"){ + } elseif ($k == "maintainer") { $r=preg_match("|([^<]+)<([^>]+)>|", $v, $m); if ($r) { $info['maintainer'][] = array('name'=>$m[1], 'link'=>$m[2]); @@ -380,7 +359,7 @@ function get_theme_info($theme){ $info['maintainer'][] = array('name'=>$v); } } else { - if (array_key_exists($k,$info)){ + if (array_key_exists($k,$info)) { $info[$k]=$v; } } @@ -390,7 +369,7 @@ function get_theme_info($theme){ } return $info; -}} +} /** * @brief Returns the theme's screenshot. @@ -411,8 +390,7 @@ function get_theme_screenshot($theme) { } // install and uninstall theme -if (! function_exists('uninstall_theme')){ -function uninstall_theme($theme){ +function uninstall_theme($theme) { logger("Addons: uninstalling theme " . $theme); include_once("view/theme/$theme/theme.php"); @@ -420,9 +398,8 @@ function uninstall_theme($theme){ $func = "{$theme}_uninstall"; $func(); } -}} +} -if (! function_exists('install_theme')){ function install_theme($theme) { // silently fail if theme was removed @@ -443,7 +420,7 @@ function install_theme($theme) { return false; } -}} +} /** * @brief Get the full path to relevant theme files by filename diff --git a/include/queue_fn.php b/include/queue_fn.php index e6fd14e07..c4ab229ae 100644 --- a/include/queue_fn.php +++ b/include/queue_fn.php @@ -13,9 +13,7 @@ function update_queue_time($id) { function remove_queue_item($id) { logger('queue: remove queue item ' . $id); - q("DELETE FROM `queue` WHERE `id` = %d", - intval($id) - ); + dba::delete('queue', array('id' => $id)); } /** diff --git a/include/threads.php b/include/threads.php index 107f2f76b..00848ccc6 100644 --- a/include/threads.php +++ b/include/threads.php @@ -251,7 +251,7 @@ function delete_thread($itemid, $itemuri = "") { } // Using dba::delete at this time could delete the associated item entries - $result = q("DELETE FROM `thread` WHERE `iid` = %d", intval($itemid)); + $result = dba::e("DELETE FROM `thread` WHERE `iid` = ?", $itemid); logger("delete_thread: Deleted thread for item ".$itemid." - ".print_r($result, true), LOGGER_DEBUG); diff --git a/src/Worker/CronJobs.php b/src/Worker/CronJobs.php index 08a1af6dc..cbfa86ed8 100644 --- a/src/Worker/CronJobs.php +++ b/src/Worker/CronJobs.php @@ -155,14 +155,15 @@ class CronJobs { 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); + $condition = array('`uid` = 0 AND `resource-id` LIKE "pic:%" AND `created` < NOW() - INTERVAL ? SECOND', $cachetime); + dba::delete('photo', $condition); } - // Delete the cached OEmbed entries that are older than one year - q("DELETE FROM `oembed` WHERE `created` < NOW() - INTERVAL 3 MONTH"); + // Delete the cached OEmbed entries that are older than three month + dba::delete('oembed', array("`created` < NOW() - INTERVAL 3 MONTH")); - // Delete the cached "parse_url" entries that are older than one year - q("DELETE FROM `parsed_url` WHERE `created` < NOW() - INTERVAL 3 MONTH"); + // Delete the cached "parse_url" entries that are older than three month + dba::delete('parsed_url', array("`created` < NOW() - INTERVAL 3 MONTH")); // Maximum table size in megabyte $max_tablesize = intval(Config::get('system','optimize_max_tablesize')) * 1000000; From c6c180e8b92edc20f059fa9071e53d9cfee5664d Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 22 Nov 2017 09:11:44 +0000 Subject: [PATCH 087/175] Some more changed calls --- include/api.php | 12 ++---------- include/group.php | 26 +++++++++++--------------- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/include/api.php b/include/api.php index 9f91139d1..7c012ddbb 100644 --- a/include/api.php +++ b/include/api.php @@ -3435,11 +3435,7 @@ function api_fr_photoalbum_delete($type) } // now let's delete all photos from the album - $result = q( - "DELETE FROM `photo` WHERE `uid` = %d AND `album` = '%s'", - intval(api_user()), - dbesc($album) - ); + $result = dba::delete('photo', array('uid' => api_user(), 'album' => $album)); // return success of deletion or error message if ($result) { @@ -3722,11 +3718,7 @@ function api_fr_photo_delete($type) throw new BadRequestException("photo not available"); } // now we can perform on the deletion of the photo - $result = q( - "DELETE FROM `photo` WHERE `uid` = %d AND `resource-id` = '%s'", - intval(api_user()), - dbesc($photo_id) - ); + $result = dba::delete('photo', array('uid' => api_user(), 'resource-id' => $photo_id)); // return success of deletion or error message if ($result) { diff --git a/include/group.php b/include/group.php index d3c3a8171..6e7348c4e 100644 --- a/include/group.php +++ b/include/group.php @@ -79,10 +79,7 @@ function group_rmv($uid,$name) { } // remove all members - $r = q("DELETE FROM `group_member` WHERE `uid` = %d AND `gid` = %d ", - intval($uid), - intval($group_id) - ); + dba::delete('group_member', array('uid' => $uid, 'pid' => $group_id)); // remove group $r = q("UPDATE `group` SET `deleted` = 1 WHERE `uid` = %d AND `name` = '%s'", @@ -109,20 +106,19 @@ function group_byname($uid,$name) { return false; } -function group_rmv_member($uid,$name,$member) { - $gid = group_byname($uid,$name); - if (! $gid) +function group_rmv_member($uid, $name, $member) { + $gid = group_byname($uid, $name); + + if (!$gid) { return false; - if (! ( $uid && $gid && $member)) + } + + if (!($uid && $gid && $member)) { return false; - $r = q("DELETE FROM `group_member` WHERE `uid` = %d AND `gid` = %d AND `contact-id` = %d", - intval($uid), - intval($gid), - intval($member) - ); + } + + $r = dba::delete('group_member', array('uid' => $uid, 'gid' => $gid, 'contact-id' => $member)); return $r; - - } From 87660ac9e63bfc6c76e2abb668586a425a9c4fed Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 22 Nov 2017 09:14:42 +0000 Subject: [PATCH 088/175] /src is now free from old style delete queries --- src/App.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.php b/src/App.php index 1bb35e1dc..ab64d7a3f 100644 --- a/src/App.php +++ b/src/App.php @@ -722,7 +722,7 @@ class App { if (DBM::is_result($r)) { foreach ($r AS $process) { if (!posix_kill($process['pid'], 0)) { - q('DELETE FROM `process` WHERE `pid` = %d', intval($process['pid'])); + dba::delete('process', array('pid' => $process['pid'])); } } } @@ -733,7 +733,7 @@ class App { * @brief Remove the active process from the "process" table */ function end_process() { - q('DELETE FROM `process` WHERE `pid` = %d', intval(getmypid())); + dba::delete('process', array('pid' => getmypid())); } function get_useragent() { From a8b6052c5a84ed84287660490651369a96bf50b6 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Wed, 22 Nov 2017 09:02:55 -0500 Subject: [PATCH 089/175] Contact Standards Some updates for Contact --- src/Object/Contact.php | 52 ++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/src/Object/Contact.php b/src/Object/Contact.php index 876083971..b10c9a16d 100644 --- a/src/Object/Contact.php +++ b/src/Object/Contact.php @@ -21,12 +21,15 @@ use dba; require_once 'boot.php'; require_once 'include/text.php'; +/** + * @brief functions for interacting with a contact + */ class Contact extends BaseObject { /** * @brief Marks a contact for removal * - * @param int $id + * @param int $id contact id * @return null */ public static function remove($id) @@ -56,7 +59,7 @@ class Contact extends BaseObject /** * @brief Sends an unfriend message. Does not remove the contact * - * @param array $user User unfriending + * @param array $user User unfriending * @param array $contact Contact unfriended */ public static function terminateFriendship(array $user, array $contact) @@ -88,7 +91,7 @@ class Contact extends BaseObject * This provides for the possibility that their database is temporarily messed * up or some other transient event and that there's a possibility we could recover from it. * - * @param array $contact + * @param array $contact contact to mark for archival * @return type */ public static function markForArchival(array $contact) @@ -110,7 +113,6 @@ class Contact extends BaseObject ); } } else { - /* @todo * We really should send a notification to the owner after 2-3 weeks * so they won't be surprised when the contact vanishes and can take @@ -120,7 +122,6 @@ class Contact extends BaseObject /// @todo Check for contact vitality via probing $expiry = $contact['term-date'] . ' + 32 days '; if (datetime_convert() > datetime_convert('UTC', 'UTC', $expiry)) { - /* Relationship is really truly dead. archive them rather than * delete, though if the owner tries to unarchive them we'll start * the whole process over again. @@ -143,7 +144,7 @@ class Contact extends BaseObject * * @see Contact::markForArchival() * - * @param array $contact + * @param array $contact contact to be unmarked for archival * @return null */ public static function unmarkForArchival(array $contact) @@ -172,9 +173,9 @@ class Contact extends BaseObject * The function looks at several places (contact table and gcontact table) for the contact * It caches its result for the same script execution to prevent duplicate calls * - * @param string $url The profile link - * @param int $uid User id - * @param array $default If not data was found take this data as default value + * @param string $url The profile link + * @param int $uid User id + * @param array $default If not data was found take this data as default value * * @return array Contact data */ @@ -237,7 +238,7 @@ class Contact extends BaseObject if (DBM::is_result($r)) { // If there is more than one entry we filter out the connector networks if (count($r) > 1) { - foreach ($r AS $id => $result) { + foreach ($r as $id => $result) { if ($result["network"] == NETWORK_STATUSNET) { unset($r[$id]); } @@ -291,8 +292,9 @@ class Contact extends BaseObject $profile["micro"] = $profile["thumb"]; } - if ((($profile["addr"] == "") || ($profile["name"] == "")) && ($profile["gid"] != 0) && - in_array($profile["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) { + if ((($profile["addr"] == "") || ($profile["name"] == "")) && ($profile["gid"] != 0) + && in_array($profile["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS)) + ) { Worker::add(PRIORITY_LOW, "UpdateGContact", $profile["gid"]); } @@ -315,7 +317,7 @@ class Contact extends BaseObject * The function looks at several places (contact table and gcontact table) for the contact * * @param string $addr The profile link - * @param int $uid User id + * @param int $uid User id * * @return array Contact data */ @@ -362,8 +364,8 @@ class Contact extends BaseObject /** * @brief Returns the data array for the photo menu of a given contact * - * @param array $contact - * @param int $uid + * @param array $contact contact + * @param int $uid optional, default 0 * @return array */ public static function photoMenu(array $contact, $uid = 0) @@ -386,7 +388,7 @@ class Contact extends BaseObject if ($contact['uid'] != $uid) { if ($uid == 0) { $profile_link = zrl($contact['url']); - $menu = Array('profile' => array(t('View Profile'), $profile_link, true)); + $menu = array('profile' => array(t('View Profile'), $profile_link, true)); return $menu; } @@ -438,7 +440,7 @@ class Contact extends BaseObject $contact_drop_link = System::baseUrl() . '/contacts/' . $contact['id'] . '/drop?confirm=1'; /** - * menu array: + * Menu array: * "name" => [ "Label", "link", (bool)Should the link opened in a new tab? ] */ $menu = array( @@ -459,7 +461,7 @@ class Contact extends BaseObject $menucondensed = array(); - foreach ($menu AS $menuname => $menuitem) { + foreach ($menu as $menuname => $menuitem) { if ($menuitem[1] != '') { $menucondensed[$menuname] = $menuitem; } @@ -469,14 +471,15 @@ class Contact extends BaseObject } /** + * @brief Returns ungrouped contact count or list for user + * * Returns either the total number of ungrouped contacts for the given user * id or a paginated list of ungrouped contacts. * - * @brief Returns ungrouped contact count or list for user + * @param int $uid uid + * @param int $start optional, default 0 + * @param int $count optional, default 0 * - * @param int $uid - * @param int $start - * @param int $count * @return array */ public static function getUngroupedList($uid, $start = 0, $count = 0) @@ -532,8 +535,8 @@ class Contact extends BaseObject * Fourth, we update the existing record with the new data (avatar, alias, nick) * if there's any updates * - * @param string $url Contact URL - * @param integer $uid The user id for the contact (0 = public contact) + * @param string $url Contact URL + * @param integer $uid The user id for the contact (0 = public contact) * @param boolean $no_update Don't update the contact * * @return integer Contact ID @@ -735,7 +738,6 @@ class Contact extends BaseObject /** * @brief Returns posts from a given contact url * - * @param App $a argv application class * @param string $contact_url Contact URL * * @return string posts in HTML From d7d653aab65e230c1ac8aede73ab43333ef68b55 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Wed, 22 Nov 2017 21:29:07 +0100 Subject: [PATCH 090/175] port tag cloud widget from hubzilla --- include/features.php | 1 + include/identity.php | 4 +- include/tags.php | 122 +++++++++++++++++++++++++++++ mod/profile.php | 1 + view/global.css | 46 +++++++++++ view/templates/tagblock_widget.tpl | 11 +++ view/theme/frio/css/style.css | 5 ++ 7 files changed, 188 insertions(+), 2 deletions(-) create mode 100644 view/templates/tagblock_widget.tpl diff --git a/include/features.php b/include/features.php index 9895fd6f7..340394ece 100644 --- a/include/features.php +++ b/include/features.php @@ -114,6 +114,7 @@ function get_features($filtered = true) { 'advanced_profile' => array( t('Advanced Profile Settings'), array('forumlist_profile', t('List Forums'), t('Show visitors public community forums at the Advanced Profile Page'), false, Config::get('feature_lock','forumlist_profile')), + array('tagadelic', t('Tag Cloud'), t('Provide a personal tag cloud on your profile page'), false, Config::get('feature_lock', 'tagadelic')), ), ); diff --git a/include/identity.php b/include/identity.php index b8f4727ad..2e6327d98 100644 --- a/include/identity.php +++ b/include/identity.php @@ -169,7 +169,7 @@ function get_profiledata_by_nick($nickname, $uid = 0, $profile = 0) "SELECT `contact`.`id` AS `contact_id`, `contact`.`photo` AS `contact_photo`, `contact`.`thumb` AS `contact_thumb`, `contact`.`micro` AS `contact_micro`, `profile`.`uid` AS `profile_uid`, `profile`.*, - `contact`.`avatar-date` AS picdate, `contact`.`addr`, `user`.* + `contact`.`avatar-date` AS picdate, `contact`.`addr`, `contact`.`url`, `user`.* FROM `profile` INNER JOIN `contact` on `contact`.`uid` = `profile`.`uid` AND `contact`.`self` INNER JOIN `user` ON `profile`.`uid` = `user`.`uid` @@ -183,7 +183,7 @@ function get_profiledata_by_nick($nickname, $uid = 0, $profile = 0) "SELECT `contact`.`id` AS `contact_id`, `contact`.`photo` as `contact_photo`, `contact`.`thumb` AS `contact_thumb`, `contact`.`micro` AS `contact_micro`, `profile`.`uid` AS `profile_uid`, `profile`.*, - `contact`.`avatar-date` AS picdate, `contact`.`addr`, `user`.* + `contact`.`avatar-date` AS picdate, `contact`.`addr`, `contact`.`url`, `user`.* FROM `profile` INNER JOIN `contact` ON `contact`.`uid` = `profile`.`uid` AND `contact`.`self` INNER JOIN `user` ON `profile`.`uid` = `user`.`uid` diff --git a/include/tags.php b/include/tags.php index 8720367fa..bae3e77ea 100644 --- a/include/tags.php +++ b/include/tags.php @@ -2,6 +2,8 @@ use Friendica\App; use Friendica\Core\System; +use Friendica\Database\DBM; +use Friendica\Object\Contact; function create_tags_from_item($itemid) { $profile_base = System::baseUrl(); @@ -148,3 +150,123 @@ function update_items() { dba::close($messages); } + +// Tag cloud functions - need to be adpated to this database format +function tagadelic($uid, $count = 0, $authors = '', $owner = '', $flags = 0, $type = TERM_HASHTAG) { + require_once('include/security.php'); + + $item_condition = item_condition(); + $sql_options = item_permissions_sql($uid); + $count = intval($count); + if ($flags) { + if ($flags === 'wall') { + $sql_options .= " AND `item`.`wall` "; + } + } + if ($authors) { + if (!is_array($authors)) { + $authors = array($authors); + } + $sql_options .= " AND `item`.`author-id` IN (".implode(',', $authors).") "; + } + if ($owner) { + $sql_options .= " AND `item`.`owner-id` = ".intval($owner)." "; + } + + // Fetch tags + $r = q("SELECT `term`, COUNT(`term`) AS `total` FROM `term` + LEFT JOIN `item` ON `term`.`oid` = `item`.`id` + WHERE `term`.`uid` = %d AND `term`.`type` = %d + AND `term`.`otype` = %d AND `item`.`private` = 0 + $sql_options AND $item_condition + GROUP BY `term` ORDER BY `total` DESC %s", + intval($uid), + intval($type), + intval(TERM_OBJ_POST), + ((intval($count)) ? "LIMIT $count" : '') + ); + if(!DBM::is_result($r)) { + return array(); + } + + return tag_calc($r); +} + +function wtagblock($uid, $count = 0, $authors = '', $owner = '', $flags = 0, $type = TERM_HASHTAG) { + $o = ''; + $r = tagadelic($uid, $count, $authors, $owner, $flags, $type); + if($r) { + foreach ($r as $rr) { + $tag['level'] = $rr[2]; + $tag['url'] = urlencode($rr[0]); + $tag['name'] = $rr[0]; + + $tags[] = $tag; + } + + $tpl = get_markup_template("tagblock_widget.tpl"); + $o = replace_macros($tpl, array( + '$title' => t('Tags'), + '$tags' => $tags + )); + + } + return $o; +} + +function tag_calc($arr) { + $tags = array(); + $min = 1e9; + $max = -1e9; + $x = 0; + + if (!$arr) { + return array(); + } + + foreach ($arr as $rr) { + $tags[$x][0] = $rr['term']; + $tags[$x][1] = log($rr['total']); + $tags[$x][2] = 0; + $min = min($min, $tags[$x][1]); + $max = max($max, $tags[$x][1]); + $x ++; + } + + usort($tags, 'self::tags_sort'); + $range = max(.01, $max - $min) * 1.0001; + + for ($x = 0; $x < count($tags); $x ++) { + $tags[$x][2] = 1 + floor(9 * ($tags[$x][1] - $min) / $range); + } + + return $tags; +} + +function tags_sort($a,$b) { + if (strtolower($a[0]) == strtolower($b[0])) { + return 0; + } + return((strtolower($a[0]) < strtolower($b[0])) ? -1 : 1); +} + + +function tagcloud_wall_widget($arr = array()) { + $a = get_app(); + + if(!$a->profile['profile_uid'] || !$a->profile['url']) { + return ""; + } + + $limit = ((array_key_exists('limit', $arr)) ? intval($arr['limit']) : 50); + if(feature_enabled($a->profile['profile_uid'], 'tagadelic')) { + $owner_id = Contact::getIdForURL($a->profile['url']); + logger("public contact id: ".$owner_id); + if(!$owner_id) { + return ""; + } + return wtagblock($a->profile['profile_uid'], $limit, '', $owner_id, 'wall'); + } + + return ""; +} diff --git a/mod/profile.php b/mod/profile.php index 8a9b8b666..9ad24ccd1 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -185,6 +185,7 @@ function profile_content(App $a, $update = 0) { $a->page['aside'] .= posted_date_widget(System::baseUrl(true) . '/profile/' . $a->profile['nickname'],$a->profile['profile_uid'],true); $a->page['aside'] .= categories_widget(System::baseUrl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : '')); + $a->page['aside'] .= tagcloud_wall_widget(); if (can_write_wall($a,$a->profile['profile_uid'])) { diff --git a/view/global.css b/view/global.css index e99006094..cf8ad8d4e 100644 --- a/view/global.css +++ b/view/global.css @@ -522,3 +522,49 @@ td.pendingnote > p > span { .invalid-src:after, .invalid-href:after { content: '⚠️'} img.invalid-src:after { vertical-align: top;} + +/* Tag cloud */ +.tag1, .tag1:hover { + font-size: 0.9em ; + color: DarkGray; +} +.tag2, .tag2:hover { + font-size: 1.0em; + color: LawnGreen; +} +.tag3, .tag3:hover { + font-size: 1.1em; + color: DarkOrange; +} +.tag4, .tag4:hover { + font-size: 1.2em; + color: Red; +} +.tag5, .tag5:hover { + font-size: 1.3em; + color: Gold; +} +.tag6, .tag6:hover { + font-size: 1.4em; + color: Teal; +} +.tag7, .tag7:hover { + font-size: 1.5em; + color: DarkMagenta; +} +.tag8, .tag8:hover { + font-size: 1.6em; + color: DarkGoldenRod; +} +.tag9, .tag9:hover { + font-size: 1.7em; + color: DarkBlue; +} +.tag10 .tag10:hover { + font-size: 1.8em; + color: DeepPink; +} +.tag1:hover, .tag2:hover, .tag3:hover, .tag4:hover, .tag5:hover, +.tag6:hover, .tag7:hover, .tag8:hover, .tag9:hover, .tag10:hover { + text-decoration: underline; +} \ No newline at end of file diff --git a/view/templates/tagblock_widget.tpl b/view/templates/tagblock_widget.tpl new file mode 100644 index 000000000..3317d6673 --- /dev/null +++ b/view/templates/tagblock_widget.tpl @@ -0,0 +1,11 @@ + +
+

{{$title}}

+ +
+ {{foreach $tags as $tag}} + # + {{$tag.name}} + {{/foreach}} +
+
diff --git a/view/theme/frio/css/style.css b/view/theme/frio/css/style.css index ab8e3d5a5..a606f0629 100644 --- a/view/theme/frio/css/style.css +++ b/view/theme/frio/css/style.css @@ -1238,6 +1238,11 @@ aside #group-sidebar li .group-edit-tool:first-child { width: 75px; border-radius: 4px; } + +/* Tag cloud widget */ +.tagblock.widget > .tags { + text-align: center; +} /* Section */ section ul.tabs { display: none !important; From c25578a2e2ffd8a311f25c3f08e96f62af233983 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Wed, 22 Nov 2017 16:29:47 -0500 Subject: [PATCH 091/175] Cleanup Clean up messy commits. --- src/Object/Contact.php | 80 +++++++++++++----------------------------- 1 file changed, 25 insertions(+), 55 deletions(-) diff --git a/src/Object/Contact.php b/src/Object/Contact.php index b10c9a16d..ffa71be27 100644 --- a/src/Object/Contact.php +++ b/src/Object/Contact.php @@ -35,18 +35,16 @@ class Contact extends BaseObject public static function remove($id) { // We want just to make sure that we don't delete our "self" contact - $r = q( - "SELECT `uid` FROM `contact` WHERE `id` = %d AND NOT `self` LIMIT 1", intval($id) - ); + $condition = array('`id` = ? AND NOT `self`', $id); + $r = dba::select('contact', array('uid'), $condition, array('limit' => 1)); + if (!DBM::is_result($r) || !intval($r[0]['uid'])) { return; } $archive = PConfig::get($r[0]['uid'], 'system', 'archive_removed_contacts'); if ($archive) { - q( - "UPDATE `contact` SET `archive` = 1, `network` = 'none', `writable` = 0 WHERE id = %d", intval($id) - ); + dba::update('contact', array('archive' => 1, 'network' => 'none', 'writable' => 0), array('id' => $id)); return; } @@ -102,15 +100,10 @@ class Contact extends BaseObject } if ($contact['term-date'] <= NULL_DATE) { - q( - "UPDATE `contact` SET `term-date` = '%s' WHERE `id` = %d", dbesc(datetime_convert()), intval($contact['id']) - ); + dba::update('contact', array('term-date' => datetime_convert()), array('id' => $contact['id'])); if ($contact['url'] != '') { - q( - "UPDATE `contact` SET `term-date` = '%s' - WHERE `nurl` = '%s' AND `term-date` <= '1000-00-00'", dbesc(datetime_convert()), dbesc(normalise_link($contact['url'])) - ); + dba::update('contact', array('term-date' => datetime_convert()), array('nurl' => normalise_link($contact['url']), 'term-date' <= NULL_DATE)); } } else { /* @todo @@ -126,14 +119,10 @@ class Contact extends BaseObject * delete, though if the owner tries to unarchive them we'll start * the whole process over again. */ - q( - "UPDATE `contact` SET `archive` = 1 WHERE `id` = %d", intval($contact['id']) - ); + dba::update('contact', array('archive' => 1), array('id' => $contact['id'])); if ($contact['url'] != '') { - q( - "UPDATE `contact` SET `archive` = 1 WHERE `nurl` = '%s'", dbesc(normalise_link($contact['url'])) - ); + dba::update('contact', array('archive' => 1), array('nurl' => normalise_link($contact['url']))); } } } @@ -149,9 +138,8 @@ class Contact extends BaseObject */ public static function unmarkForArchival(array $contact) { - $r = q( - "SELECT `term-date` FROM `contact` WHERE `id` = %d AND (`term-date` > '%s' OR `archive`)", intval($contact['id']), dbesc('1000-00-00 00:00:00') - ); + $condition = array('`id` => ? AND (`term-date` > ? OR `archive`)', $contact[`id`], NULL_DATE); + $r = dba::select('contact', array('term-date'), $condition); // We don't need to update, we never marked this contact for archival if (!DBM::is_result($r)) { @@ -393,7 +381,7 @@ class Contact extends BaseObject return $menu; } - $r = q("SELECT * FROM `contact` WHERE `nurl` = '%s' AND `network` = '%s' AND `uid` = %d", dbesc($contact['nurl']), dbesc($contact['network']), intval($uid)); + $r = dba::select('contact', array(), array('nurl' => $contact['nurl'], 'network' => $contact['network'], 'uid' => $uid)); if ($r) { return self::photoMenu($r[0], $uid); } else { @@ -485,34 +473,15 @@ class Contact extends BaseObject public static function getUngroupedList($uid, $start = 0, $count = 0) { if (!$count) { - $r = q( - "SELECT COUNT(*) AS `total` - FROM `contact` - WHERE `uid` = %d - AND `self` = 0 - AND `id` NOT IN ( - SELECT DISTINCT(`contact-id`) - FROM `group_member` - WHERE `uid` = %d - ) ", intval($uid), intval($uid) - ); + $fields = array('COUNT(*) AS `total`'); + $condition = array('`uid` = ? AND `self` = 0 AND `id` NOT IN (SELECT DISTINCT(`contact-id`) FROM `group_member` WHERE `uid` = ?', $uid, $uid); + $r = dba::select('contact', $fields, $condition); return $r; } - $r = q( - "SELECT * - FROM `contact` - WHERE `uid` = %d - AND `self` = 0 - AND `id` NOT IN ( - SELECT DISTINCT(`contact-id`) - FROM `group_member` WHERE `uid` = %d - ) - AND `blocked` = 0 - AND `pending` = 0 - LIMIT %d, %d", intval($uid), intval($uid), intval($start), intval($count) - ); + $innerCondition = array('`id` NOT IN (SELECT DISTINCT(`contact-id`) FROM `group_member` WHERE `uid` = ?', $uid); + $r = dba::select('contact', array(), array('uid' => $uid, 'self' => 0, $innerCondition, 'blocked' => 0, 'pending' => 0), array('limit ?, ?', $start, $count)); return $r; } @@ -564,7 +533,7 @@ class Contact extends BaseObject if (!DBM::is_result($contact)) { // The link could be provided as http although we stored it as https $ssl_url = str_replace('http://', 'https://', $url); - $r = dba::p("SELECT `id`, `avatar-date` FROM `contact` WHERE `alias` IN (?, ?, ?) AND `uid` = ? LIMIT 1", $url, normalise_link($url), $ssl_url, $uid); + $r = dba::select('contact', array('id', 'avatar-date'), array('`alias` IN (?, ?, ?) AND `uid` = ?', $url, normalise_link($url), $ssl_url, $uid), array('limit' => 1)); $contact = dba::fetch($r); dba::close($r); } @@ -611,7 +580,8 @@ class Contact extends BaseObject $url = $data["url"]; if (!$contact_id) { - dba::insert('contact', array('uid' => $uid, 'created' => datetime_convert(), 'url' => $data["url"], + dba::insert( + 'contact', array('uid' => $uid, 'created' => datetime_convert(), 'url' => $data["url"], 'nurl' => normalise_link($data["url"]), 'addr' => $data["addr"], 'alias' => $data["alias"], 'notify' => $data["notify"], 'poll' => $data["poll"], 'name' => $data["name"], 'nick' => $data["nick"], 'photo' => $data["photo"], @@ -622,9 +592,11 @@ class Contact extends BaseObject 'confirm' => $data["confirm"], 'poco' => $data["poco"], 'name-date' => datetime_convert(), 'uri-date' => datetime_convert(), 'avatar-date' => datetime_convert(), 'writable' => 1, 'blocked' => 0, - 'readonly' => 0, 'pending' => 0)); + 'readonly' => 0, 'pending' => 0) + ); - $contacts = q("SELECT `id` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d ORDER BY `id` LIMIT 2", dbesc(normalise_link($data["url"])), intval($uid)); + $s = dba::select('contact', array('id'), array('nurl' => normalise_link($data["url"]), 'uid' => $uid), array('order' => 'id', 'limit' => 2)); + $contacts = dba::inArray($s); if (!DBM::is_result($contacts)) { return 0; } @@ -748,8 +720,7 @@ class Contact extends BaseObject // There are no posts with "uid = 0" with connector networks // This speeds up the query a lot - $r = q("SELECT `network`, `id` AS `author-id`, `contact-type` FROM `contact` - WHERE `contact`.`nurl` = '%s' AND `contact`.`uid` = 0", dbesc(normalise_link($contact_url))); + $r = dba::select('contact', array('network', 'id AS author-id', 'contact-type'), array('nurl' => normalise_link($contact_url), 'uid' => 0)); if (!DBM::is_result($r)) { return ''; @@ -792,8 +763,7 @@ class Contact extends BaseObject // "page-flags" is a field in the user table, // "forum" and "prv" are used in the contact table. They stand for PAGE_COMMUNITY and PAGE_PRVGROUP. // "community" is used in the gcontact table and is true if the contact is PAGE_COMMUNITY or PAGE_PRVGROUP. - if ( - (isset($contact['page-flags']) && (intval($contact['page-flags']) == PAGE_COMMUNITY)) + if ((isset($contact['page-flags']) && (intval($contact['page-flags']) == PAGE_COMMUNITY)) || (isset($contact['page-flags']) && (intval($contact['page-flags']) == PAGE_PRVGROUP)) || (isset($contact['forum']) && intval($contact['forum'])) || (isset($contact['prv']) && intval($contact['prv'])) From 59ae5633ec9080845a02de99665293655bd8b726 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Wed, 22 Nov 2017 23:18:01 +0100 Subject: [PATCH 092/175] tag-cloud: some polishing + remove authors (we don't use it at the moment) --- include/tags.php | 21 ++++++++------------- view/global.css | 6 ++++-- view/templates/tagblock_widget.tpl | 7 ++++--- view/theme/frio/css/style.css | 2 +- 4 files changed, 17 insertions(+), 19 deletions(-) diff --git a/include/tags.php b/include/tags.php index bae3e77ea..fb3315441 100644 --- a/include/tags.php +++ b/include/tags.php @@ -151,8 +151,7 @@ function update_items() { dba::close($messages); } -// Tag cloud functions - need to be adpated to this database format -function tagadelic($uid, $count = 0, $authors = '', $owner = '', $flags = 0, $type = TERM_HASHTAG) { +function tagadelic($uid, $count = 0, $owner = 0, $flags = 0, $type = TERM_HASHTAG) { require_once('include/security.php'); $item_condition = item_condition(); @@ -163,12 +162,7 @@ function tagadelic($uid, $count = 0, $authors = '', $owner = '', $flags = 0, $ty $sql_options .= " AND `item`.`wall` "; } } - if ($authors) { - if (!is_array($authors)) { - $authors = array($authors); - } - $sql_options .= " AND `item`.`author-id` IN (".implode(',', $authors).") "; - } + if ($owner) { $sql_options .= " AND `item`.`owner-id` = ".intval($owner)." "; } @@ -192,9 +186,9 @@ function tagadelic($uid, $count = 0, $authors = '', $owner = '', $flags = 0, $ty return tag_calc($r); } -function wtagblock($uid, $count = 0, $authors = '', $owner = '', $flags = 0, $type = TERM_HASHTAG) { +function wtagblock($uid, $count = 0,$owner = 0, $flags = 0, $type = TERM_HASHTAG) { $o = ''; - $r = tagadelic($uid, $count, $authors, $owner, $flags, $type); + $r = tagadelic($uid, $count, $owner, $flags, $type); if($r) { foreach ($r as $rr) { $tag['level'] = $rr[2]; @@ -233,7 +227,7 @@ function tag_calc($arr) { $x ++; } - usort($tags, 'self::tags_sort'); + usort($tags, 'tags_sort'); $range = max(.01, $max - $min) * 1.0001; for ($x = 0; $x < count($tags); $x ++) { @@ -259,13 +253,14 @@ function tagcloud_wall_widget($arr = array()) { } $limit = ((array_key_exists('limit', $arr)) ? intval($arr['limit']) : 50); + if(feature_enabled($a->profile['profile_uid'], 'tagadelic')) { $owner_id = Contact::getIdForURL($a->profile['url']); - logger("public contact id: ".$owner_id); + if(!$owner_id) { return ""; } - return wtagblock($a->profile['profile_uid'], $limit, '', $owner_id, 'wall'); + return wtagblock($a->profile['profile_uid'], $limit, $owner_id, 'wall'); } return ""; diff --git a/view/global.css b/view/global.css index cf8ad8d4e..f3ca22b75 100644 --- a/view/global.css +++ b/view/global.css @@ -564,7 +564,9 @@ img.invalid-src:after { vertical-align: top;} font-size: 1.8em; color: DeepPink; } -.tag1:hover, .tag2:hover, .tag3:hover, .tag4:hover, .tag5:hover, -.tag6:hover, .tag7:hover, .tag8:hover, .tag9:hover, .tag10:hover { +.tags > a:hover { text-decoration: underline; +} +.tag-cloud { + word-wrap: break-word; } \ No newline at end of file diff --git a/view/templates/tagblock_widget.tpl b/view/templates/tagblock_widget.tpl index 3317d6673..602d762aa 100644 --- a/view/templates/tagblock_widget.tpl +++ b/view/templates/tagblock_widget.tpl @@ -2,10 +2,11 @@

{{$title}}

-
+
{{foreach $tags as $tag}} - # - {{$tag.name}} + + #{{$tag.name}} + {{/foreach}}
diff --git a/view/theme/frio/css/style.css b/view/theme/frio/css/style.css index a606f0629..f37c02e63 100644 --- a/view/theme/frio/css/style.css +++ b/view/theme/frio/css/style.css @@ -1240,7 +1240,7 @@ aside #group-sidebar li .group-edit-tool:first-child { } /* Tag cloud widget */ -.tagblock.widget > .tags { +.tagblock.widget > .tag-cloud { text-align: center; } /* Section */ From ffceb601d5dd62bef22b013dd921958a20b58b54 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 22 Nov 2017 22:50:45 +0000 Subject: [PATCH 093/175] Some handling for empty parameters --- include/dba.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/dba.php b/include/dba.php index 642539a75..684f53ea4 100644 --- a/include/dba.php +++ b/include/dba.php @@ -713,6 +713,12 @@ class dba { * @return boolean was the insert successfull? */ public static function insert($table, $param, $on_duplicate_update = false) { + + if (empty($table) || empty($param)) { + logger('Table and fields have to be set'); + return false; + } + $sql = "INSERT INTO `".self::escape($table)."` (`".implode("`, `", array_keys($param))."`) VALUES (". substr(str_repeat("?, ", count($param)), 0, -2).")"; @@ -852,6 +858,12 @@ class dba { * @return boolean|array was the delete successfull? When $in_process is set: deletion data */ public static function delete($table, $param, $in_process = false, &$callstack = array()) { + + if (empty($table) || empty($param)) { + logger('Table and condition have to be set'); + return false; + } + $commands = array(); // Create a key for the loop prevention @@ -1014,6 +1026,12 @@ class dba { * @return boolean was the update successfull? */ public static function update($table, $fields, $condition, $old_fields = array()) { + + if (empty($table) || empty($fields) || empty($condition)) { + logger('Table, fields and condition have to be set'); + return false; + } + $table = self::escape($table); $array_element = each($condition); From 19afabd2682e3ae88afc90bf47f726e03eadc8c4 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Thu, 23 Nov 2017 00:59:20 +0100 Subject: [PATCH 094/175] tags: possibility to filter posts for tags and profile owner (profile) --- include/tags.php | 22 +++++++++++++++------- mod/profile.php | 7 +++++++ view/templates/tagblock_widget.tpl | 2 +- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/include/tags.php b/include/tags.php index fb3315441..8a6b3ba74 100644 --- a/include/tags.php +++ b/include/tags.php @@ -151,7 +151,7 @@ function update_items() { dba::close($messages); } -function tagadelic($uid, $count = 0, $owner = 0, $flags = 0, $type = TERM_HASHTAG) { +function tagadelic($uid, $count = 0, $owner_id = 0, $flags = 0, $type = TERM_HASHTAG) { require_once('include/security.php'); $item_condition = item_condition(); @@ -163,8 +163,8 @@ function tagadelic($uid, $count = 0, $owner = 0, $flags = 0, $type = TERM_HASHTA } } - if ($owner) { - $sql_options .= " AND `item`.`owner-id` = ".intval($owner)." "; + if ($owner_id) { + $sql_options .= " AND `item`.`owner-id` = ".intval($owner_id)." "; } // Fetch tags @@ -186,13 +186,21 @@ function tagadelic($uid, $count = 0, $owner = 0, $flags = 0, $type = TERM_HASHTA return tag_calc($r); } -function wtagblock($uid, $count = 0,$owner = 0, $flags = 0, $type = TERM_HASHTAG) { +function wtagblock($uid, $count = 0,$owner_id = 0, $flags = 0, $type = TERM_HASHTAG) { $o = ''; - $r = tagadelic($uid, $count, $owner, $flags, $type); - if($r) { + $r = tagadelic($uid, $count, $owner_id, $flags, $type); + if($r && $owner_id) { + $contact = dba::select( + "contact", + array("url"), + array("id" => $owner_id), + array("limit" => 1) + ); + $url = System::removedBaseUrl($contact['url']); + foreach ($r as $rr) { $tag['level'] = $rr[2]; - $tag['url'] = urlencode($rr[0]); + $tag['url'] = $url."?tag=".urlencode($rr[0]); $tag['name'] = $rr[0]; $tags[] = $tag; diff --git a/mod/profile.php b/mod/profile.php index 9ad24ccd1..59835bd4c 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -98,6 +98,8 @@ function profile_content(App $a, $update = 0) { $category = ((x($_GET,'category')) ? $_GET['category'] : ''); } + $hashtags = (x($_GET, 'tag') ? $_GET['tag'] : ''); + if (Config::get('system','block_public') && (! local_user()) && (! remote_user())) { return login(); } @@ -255,6 +257,11 @@ function profile_content(App $a, $update = 0) { //$sql_extra .= protect_sprintf(file_tag_file_query('item',$category,'category')); } + if (x($hashtags)) { + $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($hashtags)), intval(TERM_OBJ_POST), intval(TERM_HASHTAG), intval($a->profile['profile_uid'])); + } + if ($datequery) { $sql_extra2 .= protect_sprintf(sprintf(" AND `thread`.`created` <= '%s' ", dbesc(datetime_convert(date_default_timezone_get(),'',$datequery)))); } diff --git a/view/templates/tagblock_widget.tpl b/view/templates/tagblock_widget.tpl index 602d762aa..114d32290 100644 --- a/view/templates/tagblock_widget.tpl +++ b/view/templates/tagblock_widget.tpl @@ -5,7 +5,7 @@
{{foreach $tags as $tag}} - #{{$tag.name}} + #{{$tag.name}} {{/foreach}}
From f1b86d31caca533054841c2da323af9e9289a981 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Thu, 23 Nov 2017 03:43:39 +0100 Subject: [PATCH 095/175] tags-cloud: respect remote perms --- include/tags.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tags.php b/include/tags.php index 8a6b3ba74..01c39d925 100644 --- a/include/tags.php +++ b/include/tags.php @@ -171,8 +171,8 @@ function tagadelic($uid, $count = 0, $owner_id = 0, $flags = 0, $type = TERM_HAS $r = q("SELECT `term`, COUNT(`term`) AS `total` FROM `term` LEFT JOIN `item` ON `term`.`oid` = `item`.`id` WHERE `term`.`uid` = %d AND `term`.`type` = %d - AND `term`.`otype` = %d AND `item`.`private` = 0 - $sql_options AND $item_condition + AND `term`.`otype` = %d + AND $item_condition $sql_options GROUP BY `term` ORDER BY `total` DESC %s", intval($uid), intval($type), From f5d682fe0ace90a0ede89fe5d1fe9f3e051ef3a9 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Wed, 22 Nov 2017 23:13:12 -0500 Subject: [PATCH 096/175] Review updates Updates based on review. --- src/Object/Contact.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/Object/Contact.php b/src/Object/Contact.php index ffa71be27..9fceb927a 100644 --- a/src/Object/Contact.php +++ b/src/Object/Contact.php @@ -38,11 +38,11 @@ class Contact extends BaseObject $condition = array('`id` = ? AND NOT `self`', $id); $r = dba::select('contact', array('uid'), $condition, array('limit' => 1)); - if (!DBM::is_result($r) || !intval($r[0]['uid'])) { + if (!DBM::is_result($r) || !intval($r['uid'])) { return; } - $archive = PConfig::get($r[0]['uid'], 'system', 'archive_removed_contacts'); + $archive = PConfig::get($r['uid'], 'system', 'archive_removed_contacts'); if ($archive) { dba::update('contact', array('archive' => 1, 'network' => 'none', 'writable' => 0), array('id' => $id)); return; @@ -59,6 +59,7 @@ class Contact extends BaseObject * * @param array $user User unfriending * @param array $contact Contact unfriended + * @return void */ public static function terminateFriendship(array $user, array $contact) { @@ -383,7 +384,7 @@ class Contact extends BaseObject $r = dba::select('contact', array(), array('nurl' => $contact['nurl'], 'network' => $contact['network'], 'uid' => $uid)); if ($r) { - return self::photoMenu($r[0], $uid); + return self::photoMenu(dba::fetch($r), $uid); } else { $profile_link = zrl($contact['url']); $connlnk = 'follow/?url=' . $contact['url']; @@ -477,13 +478,13 @@ class Contact extends BaseObject $condition = array('`uid` = ? AND `self` = 0 AND `id` NOT IN (SELECT DISTINCT(`contact-id`) FROM `group_member` WHERE `uid` = ?', $uid, $uid); $r = dba::select('contact', $fields, $condition); - return $r; + return dba::inArray($r); } $innerCondition = array('`id` NOT IN (SELECT DISTINCT(`contact-id`) FROM `group_member` WHERE `uid` = ?', $uid); $r = dba::select('contact', array(), array('uid' => $uid, 'self' => 0, $innerCondition, 'blocked' => 0, 'pending' => 0), array('limit ?, ?', $start, $count)); - return $r; + return dba::inArray($r); } /** @@ -720,21 +721,22 @@ class Contact extends BaseObject // There are no posts with "uid = 0" with connector networks // This speeds up the query a lot - $r = dba::select('contact', array('network', 'id AS author-id', 'contact-type'), array('nurl' => normalise_link($contact_url), 'uid' => 0)); + $s = dba::select('contact', array('network', 'id AS author-id', 'contact-type'), array('nurl' => normalise_link($contact_url), 'uid' => 0)); + $r = dba::inArray($s); if (!DBM::is_result($r)) { return ''; } - if (in_array($r[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""))) { + if (in_array($r["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""))) { $sql = "(`item`.`uid` = 0 OR (`item`.`uid` = %d AND NOT `item`.`global`))"; } else { $sql = "`item`.`uid` = %d"; } - $author_id = intval($r[0]["author-id"]); + $author_id = intval($r["author-id"]); - $contact = ($r[0]["contact-type"] == ACCOUNT_TYPE_COMMUNITY ? 'owner-id' : 'author-id'); + $contact = ($r["contact-type"] == ACCOUNT_TYPE_COMMUNITY ? 'owner-id' : 'author-id'); $r = q(item_query() . " AND `item`.`" . $contact . "` = %d AND " . $sql . " ORDER BY `item`.`created` DESC LIMIT %d, %d", intval($author_id), intval(local_user()), intval($a->pager['start']), intval($a->pager['itemspage']) From 9409010d2d87e02f74d5567a1ba4c2e72120d584 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Wed, 22 Nov 2017 23:32:24 -0500 Subject: [PATCH 097/175] Review dba updates updates based on review comments. --- src/Object/Contact.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Object/Contact.php b/src/Object/Contact.php index 9fceb927a..81368bcb2 100644 --- a/src/Object/Contact.php +++ b/src/Object/Contact.php @@ -382,9 +382,9 @@ class Contact extends BaseObject return $menu; } - $r = dba::select('contact', array(), array('nurl' => $contact['nurl'], 'network' => $contact['network'], 'uid' => $uid)); + $r = dba::select('contact', array(), array('nurl' => $contact['nurl'], 'network' => $contact['network'], 'uid' => $uid), array('limit' => 1)); if ($r) { - return self::photoMenu(dba::fetch($r), $uid); + return self::photoMenu($r, $uid); } else { $profile_link = zrl($contact['url']); $connlnk = 'follow/?url=' . $contact['url']; @@ -721,8 +721,7 @@ class Contact extends BaseObject // There are no posts with "uid = 0" with connector networks // This speeds up the query a lot - $s = dba::select('contact', array('network', 'id AS author-id', 'contact-type'), array('nurl' => normalise_link($contact_url), 'uid' => 0)); - $r = dba::inArray($s); + $r = dba::select('contact', array('network', 'id AS author-id', 'contact-type'), array('nurl' => normalise_link($contact_url), 'uid' => 0), array('limit' => 1)); if (!DBM::is_result($r)) { return ''; From 6ea8b0441ba45ec81b4cd5cde3751971fdad2109 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Thu, 23 Nov 2017 08:15:38 -0500 Subject: [PATCH 098/175] More Review put back some q( calls and change some integer to boolean --- src/Object/Contact.php | 55 ++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/src/Object/Contact.php b/src/Object/Contact.php index 81368bcb2..50981659b 100644 --- a/src/Object/Contact.php +++ b/src/Object/Contact.php @@ -35,8 +35,7 @@ class Contact extends BaseObject public static function remove($id) { // We want just to make sure that we don't delete our "self" contact - $condition = array('`id` = ? AND NOT `self`', $id); - $r = dba::select('contact', array('uid'), $condition, array('limit' => 1)); + $r = dba::select('contact', array('uid'), array('id' => $id, 'self' => false), array('limit' => 1)); if (!DBM::is_result($r) || !intval($r['uid'])) { return; @@ -44,7 +43,7 @@ class Contact extends BaseObject $archive = PConfig::get($r['uid'], 'system', 'archive_removed_contacts'); if ($archive) { - dba::update('contact', array('archive' => 1, 'network' => 'none', 'writable' => 0), array('id' => $id)); + dba::update('contact', array('archive' => true, 'network' => 'none', 'writable' => false), array('id' => $id)); return; } @@ -104,7 +103,7 @@ class Contact extends BaseObject dba::update('contact', array('term-date' => datetime_convert()), array('id' => $contact['id'])); if ($contact['url'] != '') { - dba::update('contact', array('term-date' => datetime_convert()), array('nurl' => normalise_link($contact['url']), 'term-date' <= NULL_DATE)); + dba::update('contact', array('term-date' => datetime_convert()), array('`nurl` = ? AND `term-date` <= 1000-00-00', normalise_link($contact['url']))); } } else { /* @todo @@ -140,10 +139,10 @@ class Contact extends BaseObject public static function unmarkForArchival(array $contact) { $condition = array('`id` => ? AND (`term-date` > ? OR `archive`)', $contact[`id`], NULL_DATE); - $r = dba::select('contact', array('term-date'), $condition); + $exists = dba::exists('contact', $condition); // We don't need to update, we never marked this contact for archival - if (!DBM::is_result($r)) { + if (!$exists) { return; } @@ -474,17 +473,36 @@ class Contact extends BaseObject public static function getUngroupedList($uid, $start = 0, $count = 0) { if (!$count) { - $fields = array('COUNT(*) AS `total`'); - $condition = array('`uid` = ? AND `self` = 0 AND `id` NOT IN (SELECT DISTINCT(`contact-id`) FROM `group_member` WHERE `uid` = ?', $uid, $uid); - $r = dba::select('contact', $fields, $condition); - - return dba::inArray($r); + $r = q( + "SELECT COUNT(*) AS `total` + FROM `contact` + WHERE `uid` = %d + AND `self` = 0 + AND `id` NOT IN ( + SELECT DISTINCT(`contact-id`) + FROM `group_member` + WHERE `uid` = %d + ) ", intval($uid), intval($uid) + ); + + return $r; } - $innerCondition = array('`id` NOT IN (SELECT DISTINCT(`contact-id`) FROM `group_member` WHERE `uid` = ?', $uid); - $r = dba::select('contact', array(), array('uid' => $uid, 'self' => 0, $innerCondition, 'blocked' => 0, 'pending' => 0), array('limit ?, ?', $start, $count)); + $r = q( + "SELECT * + FROM `contact` + WHERE `uid` = %d + AND `self` = 0 + AND `id` NOT IN ( + SELECT DISTINCT(`contact-id`) + FROM `group_member` WHERE `uid` = %d + ) + AND `blocked` = 0 + AND `pending` = 0 + LIMIT %d, %d", intval($uid), intval($uid), intval($start), intval($count) + ); - return dba::inArray($r); + return $r; } /** @@ -721,21 +739,22 @@ class Contact extends BaseObject // There are no posts with "uid = 0" with connector networks // This speeds up the query a lot - $r = dba::select('contact', array('network', 'id AS author-id', 'contact-type'), array('nurl' => normalise_link($contact_url), 'uid' => 0), array('limit' => 1)); + $r = q("SELECT `network`, `id` AS `author-id`, `contact-type` FROM `contact` + WHERE `contact`.`nurl` = '%s' AND `contact`.`uid` = 0", dbesc(normalise_link($contact_url))); if (!DBM::is_result($r)) { return ''; } - if (in_array($r["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""))) { + if (in_array($r[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""))) { $sql = "(`item`.`uid` = 0 OR (`item`.`uid` = %d AND NOT `item`.`global`))"; } else { $sql = "`item`.`uid` = %d"; } - $author_id = intval($r["author-id"]); + $author_id = intval($r[0]["author-id"]); - $contact = ($r["contact-type"] == ACCOUNT_TYPE_COMMUNITY ? 'owner-id' : 'author-id'); + $contact = ($r[0]["contact-type"] == ACCOUNT_TYPE_COMMUNITY ? 'owner-id' : 'author-id'); $r = q(item_query() . " AND `item`.`" . $contact . "` = %d AND " . $sql . " ORDER BY `item`.`created` DESC LIMIT %d, %d", intval($author_id), intval(local_user()), intval($a->pager['start']), intval($a->pager['itemspage']) From 93924ceac452f6ed10ba326dce6d8b53bdae7cc2 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 23 Nov 2017 09:46:04 -0500 Subject: [PATCH 099/175] Move ExAuth class to src - Move executed code to separate readStdin function --- scripts/auth_ejabberd.php | 292 +++--------------------------------- src/Util/ExAuth.php | 304 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 326 insertions(+), 270 deletions(-) create mode 100644 src/Util/ExAuth.php diff --git a/scripts/auth_ejabberd.php b/scripts/auth_ejabberd.php index 9ad79004d..5c516f398 100755 --- a/scripts/auth_ejabberd.php +++ b/scripts/auth_ejabberd.php @@ -1,4 +1,4 @@ -#!/usr/bin/php +#!/usr/bin/env php bDebug = (int)Config::get('jabber', 'debug'); - - - openlog('auth_ejabberd', LOG_PID, LOG_USER); - - $this->writeLog(LOG_NOTICE, "start"); - - // We are connected to the SQL server. - while (!feof(STDIN)) { - // Quit if the database connection went down - if (!dba::connected()) { - $this->writeLog(LOG_ERR, "the database connection went down"); - return; - } - - $iHeader = fgets(STDIN, 3); - $aLength = unpack("n", $iHeader); - $iLength = $aLength["1"]; - - // No data? Then quit - if ($iLength == 0) { - $this->writeLog(LOG_ERR, "we got no data, quitting"); - return; - } - - // Fetching the data - $sData = fgets(STDIN, $iLength + 1); - $this->writeLog(LOG_DEBUG, "received data: ". $sData); - $aCommand = explode(":", $sData); - if (is_array($aCommand)) { - switch ($aCommand[0]) { - case "isuser": - // Check the existance of a given username - $this->isuser($aCommand); - break; - case "auth": - // Check if the givven password is correct - $this->auth($aCommand); - break; - case "setpass": - // We don't accept the setting of passwords here - $this->writeLog(LOG_NOTICE, "setpass command disabled"); - fwrite(STDOUT, pack("nn", 2, 0)); - break; - default: - // We don't know the given command - $this->writeLog(LOG_NOTICE, "unknown command ". $aCommand[0]); - fwrite(STDOUT, pack("nn", 2, 0)); - break; - } - } else { - $this->writeLog(LOG_NOTICE, "invalid command string ".$sData); - fwrite(STDOUT, pack("nn", 2, 0)); - } - } - } - - /** - * @brief Check if the given username exists - * - * @param array $aCommand The command array - */ - private function isuser($aCommand) { - $a = get_app(); - - // Check if there is a username - if (!isset($aCommand[1])) { - $this->writeLog(LOG_NOTICE, "invalid isuser command, no username given"); - fwrite(STDOUT, pack("nn", 2, 0)); - return; - } - - // Now we check if the given user is valid - $sUser = str_replace(array("%20", "(a)"), array(" ", "@"), $aCommand[1]); - - // Does the hostname match? So we try directly - if ($a->get_hostname() == $aCommand[2]) { - $this->writeLog(LOG_INFO, "internal user check for ". $sUser."@".$aCommand[2]); - $sQuery = "SELECT `uid` FROM `user` WHERE `nickname`='".dbesc($sUser)."'"; - $this->writeLog(LOG_DEBUG, "using query ". $sQuery); - $r = q($sQuery); - $found = DBM::is_result($r); - } else { - $found = false; - } - - // If the hostnames doesn't match or there is some failure, we try to check remotely - if (!$found) { - $found = $this->check_user($aCommand[2], $aCommand[1], true); - } - - if ($found) { - // The user is okay - $this->writeLog(LOG_NOTICE, "valid user: ". $sUser); - fwrite(STDOUT, pack("nn", 2, 1)); - } else { - // The user isn't okay - $this->writeLog(LOG_WARNING, "invalid user: ". $sUser); - fwrite(STDOUT, pack("nn", 2, 0)); - } - } - - /** - * @brief Check remote user existance via HTTP(S) - * - * @param string $host The hostname - * @param string $user Username - * @param boolean $ssl Should the check be done via SSL? - * - * @return boolean Was the user found? - */ - private function check_user($host, $user, $ssl) { - - $this->writeLog(LOG_INFO, "external user check for ".$user."@".$host); - - $url = ($ssl ? "https":"http")."://".$host."/noscrape/".$user; - - $data = z_fetch_url($url); - - if (!is_array($data)) - return(false); - - if ($data["return_code"] != "200") - return(false); - - $json = @json_decode($data["body"]); - if (!is_object($json)) - return(false); - - return($json->nick == $user); - } - - /** - * @brief Authenticate the givven user and password - * - * @param array $aCommand The command array - */ - private function auth($aCommand) { - $a = get_app(); - - // check user authentication - if (sizeof($aCommand) != 4) { - $this->writeLog(LOG_NOTICE, "invalid auth command, data missing"); - fwrite(STDOUT, pack("nn", 2, 0)); - return; - } - - // We now check if the password match - $sUser = str_replace(array("%20", "(a)"), array(" ", "@"), $aCommand[1]); - - // Does the hostname match? So we try directly - if ($a->get_hostname() == $aCommand[2]) { - $this->writeLog(LOG_INFO, "internal auth for ".$sUser."@".$aCommand[2]); - - $sQuery = "SELECT `uid`, `password` FROM `user` WHERE `nickname`='".dbesc($sUser)."'"; - $this->writeLog(LOG_DEBUG, "using query ". $sQuery); - if ($oResult = q($sQuery)) { - $uid = $oResult[0]["uid"]; - $Error = ($oResult[0]["password"] != hash('whirlpool',$aCommand[3])); - } else { - $this->writeLog(LOG_WARNING, "invalid query: ". $sQuery); - $Error = true; - $uid = -1; - } - if ($Error) { - $oConfig = q("SELECT `v` FROM `pconfig` WHERE `uid` = %d AND `cat` = 'xmpp' AND `k`='password' LIMIT 1;", intval($uid)); - $this->writeLog(LOG_INFO, "check against alternate password for ".$sUser."@".$aCommand[2]); - $Error = ($aCommand[3] != $oConfig[0]["v"]); - } - } else { - $Error = true; - } - - // If the hostnames doesn't match or there is some failure, we try to check remotely - if ($Error) { - $Error = !$this->check_credentials($aCommand[2], $aCommand[1], $aCommand[3], true); - } - - if ($Error) { - $this->writeLog(LOG_WARNING, "authentification failed for user ".$sUser."@". $aCommand[2]); - fwrite(STDOUT, pack("nn", 2, 0)); - } else { - $this->writeLog(LOG_NOTICE, "authentificated user ".$sUser."@".$aCommand[2]); - fwrite(STDOUT, pack("nn", 2, 1)); - } - } - - /** - * @brief Check remote credentials via HTTP(S) - * - * @param string $host The hostname - * @param string $user Username - * @param string $password Password - * @param boolean $ssl Should the check be done via SSL? - * - * @return boolean Are the credentials okay? - */ - private function check_credentials($host, $user, $password, $ssl) { - $url = ($ssl ? "https":"http")."://".$host."/api/account/verify_credentials.json"; - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); - curl_setopt($ch, CURLOPT_HEADER, true); - curl_setopt($ch, CURLOPT_NOBODY, true); - curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); - curl_setopt($ch, CURLOPT_USERPWD, $user.':'.$password); - - $header = curl_exec($ch); - $curl_info = @curl_getinfo($ch); - $http_code = $curl_info["http_code"]; - curl_close($ch); - - $this->writeLog(LOG_INFO, "external auth for ".$user."@".$host." returned ".$http_code); - - return ($http_code == 200); - } - - /** - * @brief write data to the syslog - * - * @param integer $loglevel The syslog loglevel - * @param string $sMessage The syslog message - */ - private function writeLog($loglevel, $sMessage) { - if (!$this->bDebug && ($loglevel >= LOG_DEBUG)) { - return; - } - syslog($loglevel, $sMessage); - } - - /** - * @brief destroy the class, close the syslog connection. - */ - public function __destruct() { - $this->writeLog(LOG_NOTICE, "stop"); - closelog(); - } -} +$oAuth->readStdin(); diff --git a/src/Util/ExAuth.php b/src/Util/ExAuth.php new file mode 100644 index 000000000..d0f295ab0 --- /dev/null +++ b/src/Util/ExAuth.php @@ -0,0 +1,304 @@ + + * modified for Friendica by Michael Vogel + * published under GPL + * + * Latest version of the original script for joomla is available at: + * http://87.230.15.86/~dado/ejabberd/joomla-login + * + * Installation: + * + * - Change it's owner to whichever user is running the server, ie. ejabberd + * $ chown ejabberd:ejabberd /path/to/friendica/scripts/auth_ejabberd.php + * + * - Change the access mode so it is readable only to the user ejabberd and has exec + * $ chmod 700 /path/to/friendica/scripts/auth_ejabberd.php + * + * - Edit your ejabberd.cfg file, comment out your auth_method and add: + * {auth_method, external}. + * {extauth_program, "/path/to/friendica/script/auth_ejabberd.php"}. + * + * - Restart your ejabberd service, you should be able to login with your friendica auth info + * + * Other hints: + * - if your users have a space or a @ in their nickname, they'll run into trouble + * registering with any client so they should be instructed to replace these chars + * " " (space) is replaced with "%20" + * "@" is replaced with "(a)" + * + */ + +namespace Friendica\Util; + +use Friendica\Core\Config; +use Friendica\Core\PConfig; +use Friendica\Database\DBM; + +require_once 'include/dba.php'; + +class ExAuth +{ + private $bDebug; + + /** + * @brief Create the class + * + * @param boolean $bDebug Debug mode + */ + public function __construct() + { + $this->bDebug = (int) Config::get('jabber', 'debug'); + + openlog('auth_ejabberd', LOG_PID, LOG_USER); + + $this->writeLog(LOG_NOTICE, 'start'); + } + + /** + * @brief Standard input reading function, executes the auth with the provided + * parameters + * + * @return null + */ + public function readStdin() + { + while (!feof(STDIN)) { + // Quit if the database connection went down + if (!dba::connected()) { + $this->writeLog(LOG_ERR, 'the database connection went down'); + return; + } + + $iHeader = fgets(STDIN, 3); + $aLength = unpack('n', $iHeader); + $iLength = $aLength['1']; + + // No data? Then quit + if ($iLength == 0) { + $this->writeLog(LOG_ERR, 'we got no data, quitting'); + return; + } + + // Fetching the data + $sData = fgets(STDIN, $iLength + 1); + $this->writeLog(LOG_DEBUG, 'received data: ' . $sData); + $aCommand = explode(':', $sData); + if (is_array($aCommand)) { + switch ($aCommand[0]) { + case 'isuser': + // Check the existance of a given username + $this->isUser($aCommand); + break; + case 'auth': + // Check if the givven password is correct + $this->auth($aCommand); + break; + case 'setpass': + // We don't accept the setting of passwords here + $this->writeLog(LOG_NOTICE, 'setpass command disabled'); + fwrite(STDOUT, pack('nn', 2, 0)); + break; + default: + // We don't know the given command + $this->writeLog(LOG_NOTICE, 'unknown command ' . $aCommand[0]); + fwrite(STDOUT, pack('nn', 2, 0)); + break; + } + } else { + $this->writeLog(LOG_NOTICE, 'invalid command string ' . $sData); + fwrite(STDOUT, pack('nn', 2, 0)); + } + } + } + + /** + * @brief Check if the given username exists + * + * @param array $aCommand The command array + */ + private function isUser(array $aCommand) + { + $a = get_app(); + + // Check if there is a username + if (!isset($aCommand[1])) { + $this->writeLog(LOG_NOTICE, 'invalid isuser command, no username given'); + fwrite(STDOUT, pack('nn', 2, 0)); + return; + } + + // Now we check if the given user is valid + $sUser = str_replace(array('%20', '(a)'), array(' ', '@'), $aCommand[1]); + + // Does the hostname match? So we try directly + if ($a->get_hostname() == $aCommand[2]) { + $this->writeLog(LOG_INFO, 'internal user check for ' . $sUser . '@' . $aCommand[2]); + $found = dba::exists('user', ['nickname' => $sUser]); + } else { + $found = false; + } + + // If the hostnames doesn't match or there is some failure, we try to check remotely + if (!$found) { + $found = $this->checkUser($aCommand[2], $aCommand[1], true); + } + + if ($found) { + // The user is okay + $this->writeLog(LOG_NOTICE, 'valid user: ' . $sUser); + fwrite(STDOUT, pack('nn', 2, 1)); + } else { + // The user isn't okay + $this->writeLog(LOG_WARNING, 'invalid user: ' . $sUser); + fwrite(STDOUT, pack('nn', 2, 0)); + } + } + + /** + * @brief Check remote user existance via HTTP(S) + * + * @param string $host The hostname + * @param string $user Username + * @param boolean $ssl Should the check be done via SSL? + * + * @return boolean Was the user found? + */ + private function checkUser($host, $user, $ssl) + { + $this->writeLog(LOG_INFO, 'external user check for ' . $user . '@' . $host); + + $url = ($ssl ? 'https' : 'http') . '://' . $host . '/noscrape/' . $user; + + $data = z_fetch_url($url); + + if (!is_array($data)) { + return false; + } + + if ($data['return_code'] != '200') { + return false; + } + + $json = @json_decode($data['body']); + if (!is_object($json)) { + return false; + } + + return $json->nick == $user; + } + + /** + * @brief Authenticate the given user and password + * + * @param array $aCommand The command array + */ + private function auth(array $aCommand) + { + $a = get_app(); + + // check user authentication + if (sizeof($aCommand) != 4) { + $this->writeLog(LOG_NOTICE, 'invalid auth command, data missing'); + fwrite(STDOUT, pack('nn', 2, 0)); + return; + } + + // We now check if the password match + $sUser = str_replace(array('%20', '(a)'), array(' ', '@'), $aCommand[1]); + + // Does the hostname match? So we try directly + if ($a->get_hostname() == $aCommand[2]) { + $this->writeLog(LOG_INFO, 'internal auth for ' . $sUser . '@' . $aCommand[2]); + + $aUser = dba::select('user', ['uid', 'password'], ['nickname' => $sUser], ['limit' => 1]); + if (DBM::is_result($aUser)) { + $uid = $aUser['uid']; + $Error = $aUser['password'] != hash('whirlpool', $aCommand[3]); + } else { + $this->writeLog(LOG_WARNING, 'user not found: ' . $sUser); + $Error = true; + $uid = -1; + } + if ($Error) { + $this->writeLog(LOG_INFO, 'check against alternate password for ' . $sUser . '@' . $aCommand[2]); + $sPassword = PConfig::get($uid, 'xmpp', 'password'); + $Error = ($aCommand[3] != $sPassword); + } + } else { + $Error = true; + } + + // If the hostnames doesn't match or there is some failure, we try to check remotely + if ($Error) { + $Error = !$this->checkCredentials($aCommand[2], $aCommand[1], $aCommand[3], true); + } + + if ($Error) { + $this->writeLog(LOG_WARNING, 'authentification failed for user ' . $sUser . '@' . $aCommand[2]); + fwrite(STDOUT, pack('nn', 2, 0)); + } else { + $this->writeLog(LOG_NOTICE, 'authentificated user ' . $sUser . '@' . $aCommand[2]); + fwrite(STDOUT, pack('nn', 2, 1)); + } + } + + /** + * @brief Check remote credentials via HTTP(S) + * + * @param string $host The hostname + * @param string $user Username + * @param string $password Password + * @param boolean $ssl Should the check be done via SSL? + * + * @return boolean Are the credentials okay? + */ + private function checkCredentials($host, $user, $password, $ssl) + { + $url = ($ssl ? 'https' : 'http') . '://' . $host . '/api/account/verify_credentials.json'; + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); + curl_setopt($ch, CURLOPT_HEADER, true); + curl_setopt($ch, CURLOPT_NOBODY, true); + curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); + curl_setopt($ch, CURLOPT_USERPWD, $user . ':' . $password); + + curl_exec($ch); + $curl_info = @curl_getinfo($ch); + $http_code = $curl_info['http_code']; + curl_close($ch); + + $this->writeLog(LOG_INFO, 'external auth for ' . $user . '@' . $host . ' returned ' . $http_code); + + return $http_code == 200; + } + + /** + * @brief write data to the syslog + * + * @param integer $loglevel The syslog loglevel + * @param string $sMessage The syslog message + */ + private function writeLog($loglevel, $sMessage) + { + if (!$this->bDebug && ($loglevel >= LOG_DEBUG)) { + return; + } + syslog($loglevel, $sMessage); + } + + /** + * @brief destroy the class, close the syslog connection. + */ + public function __destruct() + { + $this->writeLog(LOG_NOTICE, 'stop'); + closelog(); + } +} From d5887f9f9a4793e9546c6f99e3f6ed9d1b7e3121 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 23 Nov 2017 10:23:16 -0500 Subject: [PATCH 100/175] Add use dba --- src/Util/ExAuth.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Util/ExAuth.php b/src/Util/ExAuth.php index d0f295ab0..0769be2e6 100644 --- a/src/Util/ExAuth.php +++ b/src/Util/ExAuth.php @@ -37,6 +37,7 @@ namespace Friendica\Util; use Friendica\Core\Config; use Friendica\Core\PConfig; use Friendica\Database\DBM; +use dba; require_once 'include/dba.php'; From 609a4de5d01998af02085c7e50f97b35de197fae Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Thu, 23 Nov 2017 14:01:58 -0500 Subject: [PATCH 101/175] src Standards This basically completes coding standards changes for the entire src directory, with the exception of App.php --- include/api.php | 4 +- include/follow.php | 2 +- include/like.php | 2 +- mod/dfrn_confirm.php | 2 +- mod/dfrn_notify.php | 2 +- mod/fetch.php | 6 +- mod/item.php | 2 +- mod/p.php | 4 +- mod/receive.php | 6 +- src/Protocol/DFRN.php | 217 +++++++++--------- src/Protocol/Diaspora.php | 427 ++++++++++++++++++----------------- src/Protocol/OStatus.php | 20 +- src/Worker/Delivery.php | 10 +- src/Worker/Notifier.php | 2 +- src/Worker/ProfileUpdate.php | 2 +- 15 files changed, 370 insertions(+), 338 deletions(-) diff --git a/include/api.php b/include/api.php index 7c012ddbb..50aa18c7e 100644 --- a/include/api.php +++ b/include/api.php @@ -4291,7 +4291,7 @@ function api_share_as_retweet(&$item) { $body = trim($item["body"]); - if (Diaspora::is_reshare($body, false)===false) { + if (Diaspora::isReshare($body, false)===false) { return false; } @@ -4299,7 +4299,7 @@ function api_share_as_retweet(&$item) $attributes = preg_replace("/\[share(.*?)\]\s?(.*?)\s?\[\/share\]\s?/ism", "$1", $body); /* * Skip if there is no shared message in there - * we already checked this in diaspora::is_reshare() + * we already checked this in diaspora::isReshare() * but better one more than one less... */ if ($body == $attributes) { diff --git a/include/follow.php b/include/follow.php index e2f81f127..7e8b25d79 100644 --- a/include/follow.php +++ b/include/follow.php @@ -272,7 +272,7 @@ function new_contact($uid, $url, $interactive = false, $network = '') { } if ($contact['network'] == NETWORK_DIASPORA) { - $ret = Diaspora::send_share($a->user,$contact); + $ret = Diaspora::sendShare($a->user, $contact); logger('share returns: '.$ret); } } diff --git a/include/like.php b/include/like.php index 96cc477b8..1dcadde70 100644 --- a/include/like.php +++ b/include/like.php @@ -247,7 +247,7 @@ EOT; } // Save the author information for the like in case we need to relay to Diaspora - Diaspora::store_like_signature($item_contact, $new_item_id); + Diaspora::storeLikeSignature($item_contact, $new_item_id); $new_item['id'] = $new_item_id; diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php index 8484ace2c..47871debd 100644 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -440,7 +440,7 @@ function dfrn_confirm_post(App $a, $handsfree = null) { if ((isset($new_relation) && $new_relation == CONTACT_IS_FRIEND)) { if (($contact) && ($contact['network'] === NETWORK_DIASPORA)) { - $ret = Diaspora::send_share($user[0],$r[0]); + $ret = Diaspora::sendShare($user[0],$r[0]); logger('share returns: ' . $ret); } diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 8e2b18e49..61be7966e 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -175,7 +175,7 @@ function dfrn_notify_post(App $a) { *we got a key. old code send only the key, without RINO version. * we assume RINO 1 if key and no RINO version */ - $data = DFRN::aes_decrypt(hex2bin($data), $final_key); + $data = DFRN::aesDecrypt(hex2bin($data), $final_key); break; case 2: try { diff --git a/mod/fetch.php b/mod/fetch.php index 8685504ff..68f6acc91 100644 --- a/mod/fetch.php +++ b/mod/fetch.php @@ -68,12 +68,12 @@ function fetch_init(App $a) } $user = $r[0]; - $status = Diaspora::build_status($item[0], $user); - $xml = Diaspora::build_post_xml($status["type"], $status["message"]); + $status = Diaspora::buildStatus($item[0], $user); + $xml = Diaspora::buildPostXml($status["type"], $status["message"]); // Send the envelope header("Content-Type: application/magic-envelope+xml; charset=utf-8"); - echo Diaspora::build_magic_envelope($xml, $user); + echo Diaspora::buildMagicEnvelope($xml, $user); killme(); } diff --git a/mod/item.php b/mod/item.php index 97c26b5f9..4aafa2299 100644 --- a/mod/item.php +++ b/mod/item.php @@ -985,7 +985,7 @@ function item_post(App $a) { // Store the comment signature information in case we need to relay to Diaspora - Diaspora::store_comment_signature($datarray, $author, ($self ? $user['prvkey'] : false), $post_id); + Diaspora::storeCommentSignature($datarray, $author, ($self ? $user['prvkey'] : false), $post_id); } else { $parent = $post_id; diff --git a/mod/p.php b/mod/p.php index 9c1c2b71d..f44c32b33 100644 --- a/mod/p.php +++ b/mod/p.php @@ -58,8 +58,8 @@ function p_init($a){ } $user = $r[0]; - $status = Diaspora::build_status($item[0], $user); - $xml = Diaspora::build_post_xml($status["type"], $status["message"]); + $status = Diaspora::buildStatus($item[0], $user); + $xml = Diaspora::buildPostXml($status["type"], $status["message"]); header("Content-Type: application/xml; charset=utf-8"); echo $xml; diff --git a/mod/receive.php b/mod/receive.php index a1cb5f48f..8241325bf 100644 --- a/mod/receive.php +++ b/mod/receive.php @@ -49,14 +49,14 @@ function receive_post(App $a) { } logger('mod-diaspora: message is in the new format', LOGGER_DEBUG); - $msg = Diaspora::decode_raw($importer, $postdata); + $msg = Diaspora::decodeRaw($importer, $postdata); } else { logger('mod-diaspora: decode message in the old format', LOGGER_DEBUG); $msg = Diaspora::decode($importer, $xml); if ($public && !$msg) { logger('mod-diaspora: decode message in the new format', LOGGER_DEBUG); - $msg = Diaspora::decode_raw($importer, $xml); + $msg = Diaspora::decodeRaw($importer, $xml); } } @@ -72,7 +72,7 @@ function receive_post(App $a) { $ret = true; if ($public) { - Diaspora::dispatch_public($msg); + Diaspora::dispatchPublic($msg); } else { $ret = Diaspora::dispatch($importer, $msg); } diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 9a378d874..47aeaf05e 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -60,7 +60,7 @@ class DFRN $doc = new DOMDocument('1.0', 'utf-8'); $doc->formatOutput = true; - $root = self::add_header($doc, $owner, "dfrn:owner", "", false); + $root = self::addHeader($doc, $owner, "dfrn:owner", "", false); if (! count($items)) { return trim($doc->saveXML()); @@ -258,7 +258,7 @@ class DFRN $author = "author"; } - $root = self::add_header($doc, $owner, $author, $alternatelink, true); + $root = self::addHeader($doc, $owner, $author, $alternatelink, true); /// @TODO This hook can't work anymore // call_hooks('atom_feed', $atom); @@ -370,7 +370,7 @@ class DFRN $root->setAttribute("xmlns:ostatus", NAMESPACE_OSTATUS); $root->setAttribute("xmlns:statusnet", NAMESPACE_STATUSNET); - //$root = self::add_header($doc, $owner, "dfrn:owner", "", false); + //$root = self::addHeader($doc, $owner, "dfrn:owner", "", false); foreach ($items as $item) { $entry = self::entry($doc, $type, $item, $owner, true, 0); @@ -398,7 +398,7 @@ class DFRN $doc = new DOMDocument('1.0', 'utf-8'); $doc->formatOutput = true; - $root = self::add_header($doc, $owner, "dfrn:owner", "", false); + $root = self::addHeader($doc, $owner, "dfrn:owner", "", false); $mail = $doc->createElement("dfrn:mail"); $sender = $doc->createElement("dfrn:sender"); @@ -411,7 +411,7 @@ class DFRN XML::addElement($doc, $mail, "dfrn:id", $item['uri']); XML::addElement($doc, $mail, "dfrn:in-reply-to", $item['parent-uri']); - XML::addElement($doc, $mail, "dfrn:sentdate", datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , ATOM_TIME)); + XML::addElement($doc, $mail, "dfrn:sentdate", datetime_convert('UTC', 'UTC', $item['created'] . '+00:00', ATOM_TIME)); XML::addElement($doc, $mail, "dfrn:subject", $item['title']); XML::addElement($doc, $mail, "dfrn:content", $item['body']); @@ -434,7 +434,7 @@ class DFRN $doc = new DOMDocument('1.0', 'utf-8'); $doc->formatOutput = true; - $root = self::add_header($doc, $owner, "dfrn:owner", "", false); + $root = self::addHeader($doc, $owner, "dfrn:owner", "", false); $suggest = $doc->createElement("dfrn:suggest"); @@ -486,7 +486,7 @@ class DFRN $doc = new DOMDocument('1.0', 'utf-8'); $doc->formatOutput = true; - $root = self::add_header($doc, $owner, "dfrn:owner", "", false); + $root = self::addHeader($doc, $owner, "dfrn:owner", "", false); $relocate = $doc->createElement("dfrn:relocate"); @@ -501,7 +501,7 @@ class DFRN XML::addElement($doc, $relocate, "dfrn:confirm", $owner['confirm']); XML::addElement($doc, $relocate, "dfrn:notify", $owner['notify']); XML::addElement($doc, $relocate, "dfrn:poll", $owner['poll']); - XML::addElement($doc, $relocate, "dfrn:sitepubkey", Config::get('system','site_pubkey')); + XML::addElement($doc, $relocate, "dfrn:sitepubkey", Config::get('system', 'site_pubkey')); $root->appendChild($relocate); @@ -520,7 +520,7 @@ class DFRN * @return object XML root object * @todo Add type-hints */ - private static function add_header($doc, $owner, $authorelement, $alternatelink = "", $public = false) + private static function addHeader($doc, $owner, $authorelement, $alternatelink = "", $public = false) { if ($alternatelink == "") { @@ -579,7 +579,7 @@ class DFRN XML::addElement($doc, $root, "updated", datetime_convert("UTC", "UTC", "now", ATOM_TIME)); - $author = self::add_author($doc, $owner, $authorelement, $public); + $author = self::addAuthor($doc, $owner, $authorelement, $public); $root->appendChild($author); return $root; @@ -588,14 +588,15 @@ class DFRN /** * @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 + * @param object $doc XML document + * @param array $owner Owner record + * @param string $authorelement Element name for the author + * @param boolean $public boolean * * @return object XML author object * @todo Add type-hints */ - private static function add_author($doc, $owner, $authorelement, $public) + private static function addAuthor($doc, $owner, $authorelement, $public) { // Is the profile hidden or shouldn't be published in the net? Then add the "hide" element $r = q( @@ -739,7 +740,7 @@ class DFRN * @return object XML author object * @todo Add type-hints */ - private static function add_entry_author($doc, $element, $contact_url, $item) + private static function addEntryAuthor($doc, $element, $contact_url, $item) { $contact = Contact::getDetailsByURL($contact_url, $item["uid"]); @@ -780,7 +781,7 @@ class DFRN * @return object XML activity object * @todo Add type-hints */ - private static function create_activity($doc, $element, $activity) + private static function createActivity($doc, $element, $activity) { if ($activity) { $entry = $doc->createElement($element); @@ -810,7 +811,7 @@ class DFRN // XML does need a single element as root element so we add a dummy element here $data = parse_xml_string("" . $r->link . "", false); if (is_object($data)) { - foreach ($data->link AS $link) { + foreach ($data->link as $link) { $attributes = array(); foreach ($link->attributes() as $parameter => $value) { $attributes[$parameter] = $value; @@ -843,7 +844,7 @@ class DFRN * @return object XML attachment object * @todo Add type-hints */ - private static function get_attachment($doc, $root, $item) + private static function getAttachment($doc, $root, $item) { $arr = explode('[/attach],', $item['attach']); if (count($arr)) { @@ -932,10 +933,10 @@ class DFRN $htmlbody = bbcode($htmlbody, false, false, 7); } - $author = self::add_entry_author($doc, "author", $item["author-link"], $item); + $author = self::addEntryAuthor($doc, "author", $item["author-link"], $item); $entry->appendChild($author); - $dfrnowner = self::add_entry_author($doc, "dfrn:owner", $item["owner-link"], $item); + $dfrnowner = self::addEntryAuthor($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']))) { @@ -1041,12 +1042,12 @@ class DFRN XML::addElement($doc, $entry, "activity:object-type", ACTIVITY_OBJ_COMMENT); } - $actobj = self::create_activity($doc, "activity:object", $item['object']); + $actobj = self::createActivity($doc, "activity:object", $item['object']); if ($actobj) { $entry->appendChild($actobj); } - $actarg = self::create_activity($doc, "activity:target", $item['target']); + $actarg = self::createActivity($doc, "activity:target", $item['target']); if ($actarg) { $entry->appendChild($actarg); } @@ -1099,7 +1100,7 @@ class DFRN } } - self::get_attachment($doc, $entry, $item); + self::getAttachment($doc, $entry, $item); return $entry; } @@ -1112,7 +1113,7 @@ class DFRN * * @return string encrypted data */ - private static function aes_encrypt($data, $key) + private static function aesEncrypt($data, $key) { return openssl_encrypt($data, 'aes-128-ecb', $key, OPENSSL_RAW_DATA); } @@ -1125,7 +1126,7 @@ class DFRN * * @return string decrypted data */ - public static function aes_decrypt($encrypted, $key) + public static function aesDecrypt($encrypted, $key) { return openssl_decrypt($encrypted, 'aes-128-ecb', $key, OPENSSL_RAW_DATA); } @@ -1291,7 +1292,7 @@ class DFRN case 1: // Deprecated rino version! $key = openssl_random_pseudo_bytes(16); - $data = self::aes_encrypt($postvars['data'], $key); + $data = self::aesEncrypt($postvars['data'], $key); break; case 2: // RINO 2 based on php-encryption @@ -1392,9 +1393,10 @@ class DFRN * * @param array $contact Contact record * @param string $birthday Birthday of the contact + * @return void * @todo Add array type-hint for $contact */ - private static function birthday_event($contact, $birthday) + private static function birthdayEvent($contact, $birthday) { // Check for duplicates $r = q( @@ -1412,7 +1414,7 @@ class DFRN 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]") ; + $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`) @@ -1437,6 +1439,7 @@ class DFRN * @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 + * @param string $xml optional, default empty * * @return Returns an array with relevant data of the author * @todo Find good type-hints for all parameter @@ -1474,10 +1477,10 @@ class DFRN $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) { + foreach ($avatars as $avatar) { $href = ""; $width = 0; - foreach ($avatar->attributes AS $attributes) { + foreach ($avatar->attributes as $attributes) { /// @TODO Rewrite these similar if () to one switch if ($attributes->name == "href") { $href = $attributes->textContent; @@ -1505,14 +1508,14 @@ class DFRN // 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) { + foreach ($name_element->attributes as $attributes) { if ($attributes->name == "updated") { $poco["name-date"] = $attributes->textContent; } } $link_element = $xpath->query($element . "/atom:link", $context)->item(0); - foreach ($link_element->attributes AS $attributes) { + foreach ($link_element->attributes as $attributes) { if ($attributes->name == "updated") { $poco["uri-date"] = $attributes->textContent; } @@ -1571,7 +1574,7 @@ class DFRN // Save the keywords into the contact table $tags = array(); $tagelements = $xpath->evaluate($element . "/poco:tags/text()", $context); - foreach ($tagelements AS $tag) { + foreach ($tagelements as $tag) { $tags[$tag->nodeValue] = $tag->nodeValue; } @@ -1608,12 +1611,12 @@ class DFRN $contact = array_merge($contact, $poco); if ($old_bdyear != $contact["bdyear"]) { - self::birthday_event($contact, $birthday); + self::birthdayEvent($contact, $birthday); } // Get all field names $fields = array(); - foreach ($r[0] AS $field => $data) { + foreach ($r[0] as $field => $data) { $fields[$field] = $data; } @@ -1626,14 +1629,14 @@ class DFRN // Update check for this field has to be done differently $datefields = array("name-date", "uri-date"); - foreach ($datefields AS $field) { + foreach ($datefields as $field) { if (strtotime($contact[$field]) > strtotime($r[0][$field])) { logger("Difference for contact " . $contact["id"] . " in field '" . $field . "'. New value: '" . $contact[$field] . "', old value '" . $r[0][$field] . "'", LOGGER_DEBUG); $update = true; } } - foreach ($fields AS $field => $data) { + foreach ($fields as $field => $data) { if ($contact[$field] != $r[0][$field]) { logger("Difference for contact " . $contact["id"] . " in field '" . $field . "'. New value: '" . $contact[$field] . "', old value '" . $r[0][$field] . "'", LOGGER_DEBUG); $update = true; @@ -1692,7 +1695,7 @@ class DFRN * @return string XML string * @todo Find good type-hints for all parameter */ - private static function transform_activity($xpath, $activity, $element) + private static function transformActivity($xpath, $activity, $element) { if (!is_object($activity)) { return ""; @@ -1743,9 +1746,10 @@ class DFRN * @param object $xpath XPath object * @param object $mail mail elements * @param array $importer Record of the importer user mixed with contact of the content + * @return void * @todo Find good type-hints for all parameter */ - private static function process_mail($xpath, $mail, $importer) + private static function processMail($xpath, $mail, $importer) { logger("Processing mails"); @@ -1794,9 +1798,10 @@ class DFRN * @param object $xpath XPath object * @param object $suggestion suggestion elements * @param array $importer Record of the importer user mixed with contact of the content + * @return boolean * @todo Find good type-hints for all parameter */ - private static function process_suggestion($xpath, $suggestion, $importer) + private static function processSuggestion($xpath, $suggestion, $importer) { $a = get_app(); @@ -1903,20 +1908,21 @@ class DFRN 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" => System::baseUrl()."/notifications/intros", - "source_name" => $importer["name"], - "source_link" => $importer["url"], - "source_photo" => $importer["photo"], - "verb" => ACTIVITY_REQ_FRIEND, - "otype" => "intro") + 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" => System::baseUrl()."/notifications/intros", + "source_name" => $importer["name"], + "source_link" => $importer["url"], + "source_photo" => $importer["photo"], + "verb" => ACTIVITY_REQ_FRIEND, + "otype" => "intro") ); return true; @@ -1928,9 +1934,10 @@ class DFRN * @param object $xpath XPath object * @param object $relocation relocation elements * @param array $importer Record of the importer user mixed with contact of the content + * @return boolean * @todo Find good type-hints for all parameter */ - private static function process_relocation($xpath, $relocation, $importer) + private static function processRelocation($xpath, $relocation, $importer) { logger("Processing relocations"); @@ -2080,9 +2087,10 @@ class DFRN * @param array $item the new item record * @param array $importer Record of the importer user mixed with contact of the content * @param int $entrytype Is it a toplevel entry, a comment or a relayed comment? + * @return mixed * @todo set proper type-hints (array?) */ - private static function update_content($current, $item, $importer, $entrytype) + private static function updateContent($current, $item, $importer, $entrytype) { $changed = false; @@ -2137,7 +2145,7 @@ class DFRN * @return int Is it a toplevel entry, a comment or a relayed comment? * @todo set proper type-hints (array?) */ - private static function get_entry_type($importer, $item) + private static function getEntryType($importer, $item) { if ($item["parent-uri"] != $item["uri"]) { $community = false; @@ -2208,9 +2216,10 @@ class DFRN * @param array $item the new item record * @param array $importer Record of the importer user mixed with contact of the content * @param int $posted_id The record number of item record that was just posted + * @return void * @todo set proper type-hints (array?) */ - private static function do_poke($item, $importer, $posted_id) + private static function doPoke($item, $importer, $posted_id) { $verb = urldecode(substr($item["verb"], strpos($item["verb"], "#")+1)); if (!$verb) { @@ -2245,7 +2254,7 @@ class DFRN "link" => System::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"])) + "source_photo" => ((link_compare($item["author-link"], $importer["url"])) ? $importer["thumb"] : $item["author-avatar"]), "verb" => $item["verb"], "otype" => "person", @@ -2267,7 +2276,7 @@ class DFRN * @return bool Should the processing of the entries be continued? * @todo set proper type-hints (array?) */ - private static function process_verbs($entrytype, $importer, &$item, &$is_like) + private static function processVerbs($entrytype, $importer, &$item, &$is_like) { logger("Process verb ".$item["verb"]." and object-type ".$item["object-type"]." for entrytype ".$entrytype, LOGGER_DEBUG); @@ -2338,7 +2347,6 @@ class DFRN } 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); @@ -2356,8 +2364,9 @@ class DFRN // 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", + 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"]) ); @@ -2375,17 +2384,18 @@ class DFRN * * @param object $links link elements * @param array $item the item record + * @return void * @todo set proper type-hints */ - private static function parse_links($links, &$item) + private static function parseLinks($links, &$item) { $rel = ""; $href = ""; $type = ""; $length = "0"; $title = ""; - foreach ($links AS $link) { - foreach ($link->attributes AS $attributes) { + foreach ($links as $link) { + foreach ($link->attributes as $attributes) { /// @TODO Rewrite these repeated (same) if () statements to a switch() if ($attributes->name == "href") { $href = $attributes->textContent; @@ -2424,13 +2434,15 @@ class DFRN /** * @brief Processes the entry elements which contain the items and comments * - * @param array $header Array of the header elements that always stay the same - * @param object $xpath XPath object - * @param object $entry entry elements - * @param array $importer Record of the importer user mixed with contact of the content + * @param array $header Array of the header elements that always stay the same + * @param object $xpath XPath object + * @param object $entry entry elements + * @param array $importer Record of the importer user mixed with contact of the content + * @param object $xml xml + * @return void * @todo Add type-hints */ - private static function process_entry($header, $xpath, $entry, $importer, $xml) + private static function processEntry($header, $xpath, $entry, $importer, $xml) { logger("Processing entries"); @@ -2527,7 +2539,7 @@ class DFRN $notice_info = $xpath->query("statusnet:notice_info", $entry); if ($notice_info && ($notice_info->length > 0)) { - foreach ($notice_info->item(0)->attributes AS $attributes) { + foreach ($notice_info->item(0)->attributes as $attributes) { if ($attributes->name == "source") { $item["app"] = strip_tags($attributes->textContent); } @@ -2549,7 +2561,7 @@ class DFRN } $object = $xpath->query("activity:object", $entry)->item(0); - $item["object"] = self::transform_activity($xpath, $object, "object"); + $item["object"] = self::transformActivity($xpath, $object, "object"); if (trim($item["object"]) != "") { $r = parse_xml_string($item["object"], false); @@ -2559,14 +2571,14 @@ class DFRN } $target = $xpath->query("activity:target", $entry)->item(0); - $item["target"] = self::transform_activity($xpath, $target, "target"); + $item["target"] = self::transformActivity($xpath, $target, "target"); $categories = $xpath->query("atom:category", $entry); if ($categories) { - foreach ($categories AS $category) { + foreach ($categories as $category) { $term = ""; $scheme = ""; - foreach ($category->attributes AS $attributes) { + foreach ($category->attributes as $attributes) { if ($attributes->name == "term") { $term = $attributes->textContent; } @@ -2596,14 +2608,14 @@ class DFRN $links = $xpath->query("atom:link", $entry); if ($links) { - self::parse_links($links, $item); + self::parseLinks($links, $item); } $item['conversation-uri'] = $xpath->query('ostatus:conversation/text()', $entry)->item(0)->nodeValue; $conv = $xpath->query('ostatus:conversation', $entry); if (is_object($conv->item(0))) { - foreach ($conv->item(0)->attributes AS $attributes) { + foreach ($conv->item(0)->attributes as $attributes) { if ($attributes->name == "ref") { $item['conversation-uri'] = $attributes->textContent; } @@ -2618,7 +2630,7 @@ class DFRN $inreplyto = $xpath->query("thr:in-reply-to", $entry); if (is_object($inreplyto->item(0))) { - foreach ($inreplyto->item(0)->attributes AS $attributes) { + foreach ($inreplyto->item(0)->attributes as $attributes) { if ($attributes->name == "ref") { $item["parent-uri"] = $attributes->textContent; } @@ -2626,7 +2638,7 @@ class DFRN } // Get the type of the item (Top level post, reply or remote reply) - $entrytype = self::get_entry_type($importer, $item); + $entrytype = self::getEntryType($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))) { @@ -2699,14 +2711,14 @@ class DFRN } } - if (!self::process_verbs($entrytype, $importer, $item, $is_like)) { - logger("Exiting because 'process_verbs' told us so", LOGGER_DEBUG); + if (!self::processVerbs($entrytype, $importer, $item, $is_like)) { + logger("Exiting because 'processVerbs' told us so", LOGGER_DEBUG); return; } // Update content if 'updated' changes if (DBM::is_result($current)) { - if (self::update_content($r[0], $item, $importer, $entrytype)) { + if (self::updateContent($r[0], $item, $importer, $entrytype)) { logger("Item ".$item["uri"]." was updated.", LOGGER_DEBUG); } else { logger("Item ".$item["uri"]." already existed.", LOGGER_DEBUG); @@ -2783,8 +2795,9 @@ class DFRN logger("Item was stored with id ".$posted_id, LOGGER_DEBUG); - if (stristr($item["verb"],ACTIVITY_POKE)) - self::do_poke($item, $importer, $posted_id); + if (stristr($item["verb"], ACTIVITY_POKE)) { + self::doPoke($item, $importer, $posted_id); + } } } @@ -2794,13 +2807,14 @@ class DFRN * @param object $xpath XPath object * @param object $deletion deletion elements * @param array $importer Record of the importer user mixed with contact of the content + * @return void * @todo set proper type-hints */ - private static function process_deletion($xpath, $deletion, $importer) + private static function processDeletion($xpath, $deletion, $importer) { logger("Processing deletions"); - foreach ($deletion->attributes AS $attributes) { + foreach ($deletion->attributes as $attributes) { if ($attributes->name == "ref") { $uri = $attributes->textContent; } @@ -2832,7 +2846,7 @@ class DFRN } else { $item = $r[0]; - $entrytype = self::get_entry_type($importer, $item); + $entrytype = self::getEntryType($importer, $item); if (!$item["deleted"]) { logger('deleting item '.$item["id"].' uri='.$uri, LOGGER_DEBUG); @@ -2846,7 +2860,6 @@ class DFRN } 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); @@ -3017,8 +3030,8 @@ class DFRN // We are processing relocations even if we are ignoring a contact $relocations = $xpath->query("/atom:feed/dfrn:relocate"); - foreach ($relocations AS $relocation) { - self::process_relocation($xpath, $relocation, $importer); + foreach ($relocations as $relocation) { + self::processRelocation($xpath, $relocation, $importer); } if ($importer["readonly"]) { @@ -3029,29 +3042,29 @@ class DFRN } $mails = $xpath->query("/atom:feed/dfrn:mail"); - foreach ($mails AS $mail) { - self::process_mail($xpath, $mail, $importer); + foreach ($mails as $mail) { + self::processMail($xpath, $mail, $importer); } $suggestions = $xpath->query("/atom:feed/dfrn:suggest"); - foreach ($suggestions AS $suggestion) { - self::process_suggestion($xpath, $suggestion, $importer); + foreach ($suggestions as $suggestion) { + self::processSuggestion($xpath, $suggestion, $importer); } $deletions = $xpath->query("/atom:feed/at:deleted-entry"); - foreach ($deletions AS $deletion) { - self::process_deletion($xpath, $deletion, $importer); + foreach ($deletions as $deletion) { + self::processDeletion($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, $xml); + foreach ($entries as $entry) { + self::processEntry($header, $xpath, $entry, $importer, $xml); } } else { $newentries = array(); $entries = $xpath->query("/atom:feed/atom:entry"); - foreach ($entries AS $entry) { + foreach ($entries as $entry) { $created = $xpath->query("atom:published/text()", $entry)->item(0)->nodeValue; $newentries[strtotime($created)] = $entry; } @@ -3059,8 +3072,8 @@ class DFRN // Now sort after the publishing date ksort($newentries); - foreach ($newentries AS $entry) { - self::process_entry($header, $xpath, $entry, $importer, $xml); + foreach ($newentries as $entry) { + self::processEntry($header, $xpath, $entry, $importer, $xml); } } logger("Import done for user " . $importer["uid"] . " from contact " . $importer["id"], LOGGER_DEBUG); diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 1a320d14e..4d91f8b1c 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -5,7 +5,7 @@ * * The new protocol is described here: http://diaspora.github.io/diaspora_federation/index.html * This implementation here interprets the old and the new protocol and sends the new one. - * In the future we will remove most stuff from "valid_posting" and interpret only the new protocol. + * In the future we will remove most stuff from "validPosting" and interpret only the new protocol. */ namespace Friendica\Protocol; @@ -46,7 +46,7 @@ class Diaspora * * @return array of relay servers */ - public static function relay_list() + public static function relayList() { $serverdata = Config::get("system", "relay_server"); if ($serverdata == "") { @@ -109,7 +109,7 @@ class Diaspora * * @return string the repaired signature */ - private static function repair_signature($signature, $handle = "", $level = 1) + private static function repairSignature($signature, $handle = "", $level = 1) { if ($signature == "") { return ($signature); @@ -121,7 +121,7 @@ class Diaspora // Do a recursive call to be able to fix even multiple levels if ($level < 10) { - $signature = self::repair_signature($signature, $handle, ++$level); + $signature = self::repairSignature($signature, $handle, ++$level); } } @@ -135,7 +135,7 @@ class Diaspora * * @return string verified data */ - private static function verify_magic_envelope($envelope) + private static function verifyMagicEnvelope($envelope) { $basedom = parse_xml_string($envelope); @@ -191,7 +191,7 @@ class Diaspora * * @return string encrypted data */ - private static function aes_encrypt($key, $iv, $data) + private static function aesEncrypt($key, $iv, $data) { return openssl_encrypt($data, 'aes-256-cbc', str_pad($key, 32, "\0"), OPENSSL_RAW_DATA, str_pad($iv, 16, "\0")); } @@ -205,7 +205,7 @@ class Diaspora * * @return string decrypted data */ - private static function aes_decrypt($key, $iv, $encrypted) + private static function aesDecrypt($key, $iv, $encrypted) { return openssl_decrypt($encrypted, 'aes-256-cbc', str_pad($key, 32, "\0"), OPENSSL_RAW_DATA, str_pad($iv, 16, "\0")); } @@ -221,7 +221,7 @@ class Diaspora * 'author' -> author diaspora handle * 'key' -> author public key (converted to pkcs#8) */ - public static function decode_raw($importer, $raw) + public static function decodeRaw($importer, $raw) { $data = json_decode($raw); @@ -242,7 +242,7 @@ class Diaspora $outer_iv = base64_decode($j_outer_key_bundle->iv); $outer_key = base64_decode($j_outer_key_bundle->key); - $xml = self::aes_decrypt($outer_key, $outer_iv, $ciphertext); + $xml = self::aesDecrypt($outer_key, $outer_iv, $ciphertext); } else { $xml = $raw; } @@ -329,7 +329,7 @@ class Diaspora $outer_iv = base64_decode($j_outer_key_bundle->iv); $outer_key = base64_decode($j_outer_key_bundle->key); - $decrypted = self::aes_decrypt($outer_key, $outer_iv, $ciphertext); + $decrypted = self::aesDecrypt($outer_key, $outer_iv, $ciphertext); logger('decrypted: '.$decrypted, LOGGER_DEBUG); $idom = parse_xml_string($decrypted); @@ -387,7 +387,7 @@ class Diaspora } else { // Decode the encrypted blob $inner_encrypted = base64_decode($data); - $inner_decrypted = self::aes_decrypt($inner_aes_key, $inner_iv, $inner_encrypted); + $inner_decrypted = self::aesDecrypt($inner_aes_key, $inner_iv, $inner_encrypted); } if (!$author_link) { @@ -428,7 +428,7 @@ class Diaspora * * @return int The message id of the generated message, "true" or "false" if there was an error */ - public static function dispatch_public($msg) + public static function dispatchPublic($msg) { $enabled = intval(Config::get("system", "diaspora_enabled")); if (!$enabled) { @@ -436,7 +436,7 @@ class Diaspora return false; } - if (!($postdata = self::valid_posting($msg))) { + if (!($postdata = self::validPosting($msg))) { logger("Invalid posting"); return false; } @@ -446,7 +446,7 @@ class Diaspora // Is it a an action (comment, like, ...) for our own post? if (isset($fields->parent_guid) && !$postdata["relayed"]) { $guid = notags(unxmlify($fields->parent_guid)); - $importer = self::importer_for_guid($guid); + $importer = self::importerForGuid($guid); if (is_array($importer)) { logger("delivering to origin: ".$importer["name"]); $message_id = self::dispatch($importer, $msg, $fields); @@ -508,7 +508,7 @@ class Diaspora // This is only needed for private postings since this is already done for public ones before if (is_null($fields)) { - if (!($postdata = self::valid_posting($msg))) { + if (!($postdata = self::validPosting($msg))) { logger("Invalid posting"); return false; } @@ -524,43 +524,43 @@ class Diaspora return self::receiveAccountMigration($importer, $fields); case "account_deletion": - return self::receive_account_deletion($importer, $fields); + return self::receiveAccountDeletion($importer, $fields); case "comment": - return self::receive_comment($importer, $sender, $fields, $msg["message"]); + return self::receiveComment($importer, $sender, $fields, $msg["message"]); case "contact": - return self::receive_contact_request($importer, $fields); + return self::receiveContactRequest($importer, $fields); case "conversation": - return self::receive_conversation($importer, $msg, $fields); + return self::receiveConversation($importer, $msg, $fields); case "like": - return self::receive_like($importer, $sender, $fields); + return self::receiveLike($importer, $sender, $fields); case "message": - return self::receive_message($importer, $fields); + return self::receiveMessage($importer, $fields); case "participation": // Not implemented - return self::receive_participation($importer, $fields); + return self::receiveParticipation($importer, $fields); case "photo": // Not implemented - return self::receive_photo($importer, $fields); + return self::receivePhoto($importer, $fields); case "poll_participation": // Not implemented - return self::receive_poll_participation($importer, $fields); + return self::receivePollParticipation($importer, $fields); case "profile": - return self::receive_profile($importer, $fields); + return self::receiveProfile($importer, $fields); case "reshare": - return self::receive_reshare($importer, $fields, $msg["message"]); + return self::receiveReshare($importer, $fields, $msg["message"]); case "retraction": - return self::receive_retraction($importer, $sender, $fields); + return self::receiveRetraction($importer, $sender, $fields); case "status_message": - return self::receive_status_message($importer, $fields, $msg["message"]); + return self::receiveStatusMessage($importer, $fields, $msg["message"]); default: logger("Unknown message type ".$type); @@ -580,7 +580,7 @@ class Diaspora * * @return bool|array If the posting is valid then an array with an SimpleXML object is returned */ - private static function valid_posting($msg) + private static function validPosting($msg) { $data = parse_xml_string($msg["message"]); @@ -731,7 +731,7 @@ class Diaspora logger("Fetching diaspora key for: ".$handle); - $r = self::person_by_handle($handle); + $r = self::personByHandle($handle); if ($r) { return $r["pubkey"]; } @@ -746,7 +746,7 @@ class Diaspora * * @return array the queried data */ - public static function person_by_handle($handle) + public static function personByHandle($handle) { $r = q( "SELECT * FROM `fcontact` WHERE `network` = '%s' AND `addr` = '%s' LIMIT 1", @@ -775,7 +775,7 @@ class Diaspora // Note that Friendica contacts will return a "Diaspora person" // if Diaspora connectivity is enabled on their server if ($r && ($r["network"] === NETWORK_DIASPORA)) { - self::add_fcontact($r, $update); + self::addFContact($r, $update); $person = $r; } } @@ -790,7 +790,7 @@ class Diaspora * * @return string The id of the fcontact entry */ - private static function add_fcontact($arr, $update = false) + private static function addFContact($arr, $update = false) { if ($update) { $r = q( @@ -859,7 +859,7 @@ class Diaspora * * @return string the handle */ - public static function handle_from_contact($contact_id, $gcontact_id = 0) + public static function handleFromContact($contact_id, $gcontact_id = 0) { $handle = false; @@ -908,7 +908,7 @@ class Diaspora * * @return string the contact url or null */ - public static function url_from_contact_guid($fcontact_guid) + public static function urlFromContactGuid($fcontact_guid) { logger("fcontact guid is ".$fcontact_guid, LOGGER_DEBUG); @@ -933,7 +933,7 @@ class Diaspora * * @return The contact id */ - private static function contact_by_handle($uid, $handle) + private static function contactByHandle($uid, $handle) { // First do a direct search on the contact table $r = q( @@ -986,8 +986,8 @@ class Diaspora * * @return bool is the contact allowed to post? */ - private static function post_allow($importer, $contact, $is_comment = false) { - + private static function postAllow($importer, $contact, $is_comment = false) + { /* * Perhaps we were already sharing with this person. Now they're sharing with us. * That makes us friends. @@ -1008,15 +1008,15 @@ class Diaspora if ($contact["blocked"] || $contact["readonly"] || $contact["archive"]) { // Maybe blocked, don't accept. return false; - // We are following this person? + // We are following this person? } elseif (($contact["rel"] == CONTACT_IS_SHARING) || ($contact["rel"] == CONTACT_IS_FRIEND)) { // Yes, then it is fine. return true; - // Is it a post to a community? + // Is it a post to a community? } elseif (($contact["rel"] == CONTACT_IS_FOLLOWER) && ($importer["page-flags"] == PAGE_COMMUNITY)) { // That's good return true; - // Is the message a global user or a comment? + // Is the message a global user or a comment? } elseif (($importer["uid"] == 0) || $is_comment) { // Messages for the global users and comments are always accepted return true; @@ -1034,9 +1034,9 @@ class Diaspora * * @return array The contact data */ - private static function allowed_contact_by_handle($importer, $handle, $is_comment = false) + private static function allowedContactByHandle($importer, $handle, $is_comment = false) { - $contact = self::contact_by_handle($importer["uid"], $handle); + $contact = self::contactByHandle($importer["uid"], $handle); if (!$contact) { logger("A Contact for handle ".$handle." and user ".$importer["uid"]." was not found"); // If a contact isn't found, we accept it anyway if it is a comment @@ -1047,7 +1047,7 @@ class Diaspora } } - if (!self::post_allow($importer, $contact, $is_comment)) { + if (!self::postAllow($importer, $contact, $is_comment)) { logger("The handle: ".$handle." is not allowed to post to user ".$importer["uid"]); return false; } @@ -1062,7 +1062,7 @@ class Diaspora * * @return int|bool message id if the message already was stored into the system - or false. */ - private static function message_exists($uid, $guid) + private static function messageExists($uid, $guid) { $r = q( "SELECT `id` FROM `item` WHERE `uid` = %d AND `guid` = '%s' LIMIT 1", @@ -1082,14 +1082,15 @@ class Diaspora * @brief Checks for links to posts in a message * * @param array $item The item array + * @return void */ - private static function fetch_guid($item) + private static function fetchGuid($item) { $expression = "=diaspora://.*?/post/([0-9A-Za-z\-_@.:]{15,254}[0-9A-Za-z])=ism"; preg_replace_callback( $expression, function ($match) use ($item) { - return self::fetch_guid_sub($match, $item); + return self::fetchGuidSub($match, $item); }, $item["body"] ); @@ -1097,7 +1098,7 @@ class Diaspora preg_replace_callback( "&\[url=/posts/([^\[\]]*)\](.*)\[\/url\]&Usi", function ($match) use ($item) { - return self::fetch_guid_sub($match, $item); + return self::fetchGuidSub($match, $item); }, $item["body"] ); @@ -1112,7 +1113,7 @@ class Diaspora * * @return the replaced string */ - public static function replace_people_guid($body, $author_link) + public static function replacePeopleGuid($body, $author_link) { $return = preg_replace_callback( "&\[url=/people/([^\[\]]*)\](.*)\[\/url\]&Usi", @@ -1121,7 +1122,7 @@ class Diaspora // 0 => '[url=/people/0123456789abcdef]Foo Bar[/url]' // 1 => '0123456789abcdef' // 2 => 'Foo Bar' - $handle = self::url_from_contact_guid($match[1]); + $handle = self::urlFromContactGuid($match[1]); if ($handle) { $return = '@[url='.$handle.']'.$match[2].'[/url]'; @@ -1140,15 +1141,16 @@ class Diaspora } /** - * @brief sub function of "fetch_guid" which checks for links in messages + * @brief sub function of "fetchGuid" which checks for links in messages * * @param array $match array containing a link that has to be checked for a message link * @param array $item The item array + * @return void */ - private static function fetch_guid_sub($match, $item) + private static function fetchGuidSub($match, $item) { - if (!self::store_by_guid($match[1], $item["author-link"])) { - self::store_by_guid($match[1], $item["owner-link"]); + if (!self::storeByGuid($match[1], $item["author-link"])) { + self::storeByGuid($match[1], $item["owner-link"]); } } @@ -1161,7 +1163,7 @@ class Diaspora * * @return int the message id of the stored message or false */ - private static function store_by_guid($guid, $server, $uid = 0) + private static function storeByGuid($guid, $server, $uid = 0) { $serverparts = parse_url($server); $server = $serverparts["scheme"]."://".$serverparts["host"]; @@ -1177,7 +1179,7 @@ class Diaspora logger("Successfully fetched item ".$guid." from ".$server, LOGGER_DEBUG); // Now call the dispatcher - return self::dispatch_public($msg); + return self::dispatchPublic($msg); } /** @@ -1206,7 +1208,7 @@ class Diaspora $envelope = fetch_url($source_url); if ($envelope) { logger("Envelope was fetched.", LOGGER_DEBUG); - $x = self::verify_magic_envelope($envelope); + $x = self::verifyMagicEnvelope($envelope); if (!$x) { logger("Envelope could not be verified.", LOGGER_DEBUG); } else { @@ -1275,7 +1277,7 @@ class Diaspora * * @return array the item record */ - private static function parent_item($uid, $guid, $author, $contact) + private static function parentItem($uid, $guid, $author, $contact) { $r = q( "SELECT `id`, `parent`, `body`, `wall`, `uri`, `guid`, `private`, `origin`, @@ -1287,11 +1289,11 @@ class Diaspora ); if (!$r) { - $result = self::store_by_guid($guid, $contact["url"], $uid); + $result = self::storeByGuid($guid, $contact["url"], $uid); if (!$result) { - $person = self::person_by_handle($author); - $result = self::store_by_guid($guid, $person["url"], $uid); + $person = self::personByHandle($author); + $result = self::storeByGuid($guid, $person["url"], $uid); } if ($result) { @@ -1328,7 +1330,7 @@ class Diaspora * 'cid' => contact id * 'network' => network type */ - private static function author_contact_by_url($contact, $person, $uid) + private static function authorContactByUrl($contact, $person, $uid) { $r = q( "SELECT `id`, `network`, `url` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d LIMIT 1", @@ -1357,7 +1359,7 @@ class Diaspora * * @return bool is it a hubzilla server? */ - public static function is_redmatrix($url) + public static function isRedmatrix($url) { return(strstr($url, "/channel/")); } @@ -1395,7 +1397,7 @@ class Diaspora return str_replace("/profile/".$r[0]["nick"]."/", "/display/".$guid, $r[0]["url"]."/"); } - if (self::is_redmatrix($r[0]["url"])) { + if (self::isRedmatrix($r[0]["url"])) { return $r[0]["url"]."/?f=&mid=".$guid; } @@ -1420,7 +1422,7 @@ class Diaspora $new_handle = notags(unxmlify($data->profile->author)); $signature = notags(unxmlify($data->signature)); - $contact = self::contact_by_handle($importer["uid"], $old_handle); + $contact = self::contactByHandle($importer["uid"], $old_handle); if (!$contact) { logger("cannot find contact for sender: ".$old_handle." and user ".$importer["uid"]); return false; @@ -1437,7 +1439,7 @@ class Diaspora } // Update the profile - self::receive_profile($importer, $data->profile); + self::receiveProfile($importer, $data->profile); // change the technical stuff in contact and gcontact $data = Probe::uri($new_handle); @@ -1507,13 +1509,13 @@ class Diaspora * * @return bool Success */ - private static function receive_account_deletion($importer, $data) + private static function receiveAccountDeletion($importer, $data) { /// @todo Account deletion should remove the contact from the global contacts as well $author = notags(unxmlify($data->author)); - $contact = self::contact_by_handle($importer["uid"], $author); + $contact = self::contactByHandle($importer["uid"], $author); if (!$contact) { logger("cannot find contact for author: ".$author); return false; @@ -1533,7 +1535,7 @@ class Diaspora * * @return string The constructed uri or the one from our database */ - private static function get_uri_from_guid($author, $guid, $onlyfound = false) + private static function getUriFromGuid($author, $guid, $onlyfound = false) { $r = q("SELECT `uri` FROM `item` WHERE `guid` = '%s' LIMIT 1", dbesc($guid)); if (DBM::is_result($r)) { @@ -1553,7 +1555,7 @@ class Diaspora * * @return string The post guid */ - private static function get_guid_from_uri($uri, $uid) + private static function getGuidFromUri($uri, $uid) { $r = q("SELECT `guid` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", dbesc($uri), intval($uid)); if (DBM::is_result($r)) { @@ -1570,7 +1572,7 @@ class Diaspora * * @return array|boolean the origin owner of that post - or false */ - private static function importer_for_guid($guid) + private static function importerForGuid($guid) { $item = dba::fetch_first("SELECT `uid` FROM `item` WHERE `origin` AND `guid` = ? LIMIT 1", $guid); @@ -1594,7 +1596,7 @@ class Diaspora * * @return int The message id of the generated comment or "false" if there was an error */ - private static function receive_comment($importer, $sender, $data, $xml) + private static function receiveComment($importer, $sender, $data, $xml) { $author = notags(unxmlify($data->author)); $guid = notags(unxmlify($data->guid)); @@ -1609,34 +1611,34 @@ class Diaspora if (isset($data->thread_parent_guid)) { $thread_parent_guid = notags(unxmlify($data->thread_parent_guid)); - $thr_uri = self::get_uri_from_guid("", $thread_parent_guid, true); + $thr_uri = self::getUriFromGuid("", $thread_parent_guid, true); } else { $thr_uri = ""; } - $contact = self::allowed_contact_by_handle($importer, $sender, true); + $contact = self::allowedContactByHandle($importer, $sender, true); if (!$contact) { return false; } - $message_id = self::message_exists($importer["uid"], $guid); + $message_id = self::messageExists($importer["uid"], $guid); if ($message_id) { return true; } - $parent_item = self::parent_item($importer["uid"], $parent_guid, $author, $contact); + $parent_item = self::parentItem($importer["uid"], $parent_guid, $author, $contact); if (!$parent_item) { return false; } - $person = self::person_by_handle($author); + $person = self::personByHandle($author); if (!is_array($person)) { logger("unable to find author details"); return false; } // Fetch the contact id - if we know this contact - $author_contact = self::author_contact_by_url($contact, $person, $importer["uid"]); + $author_contact = self::authorContactByUrl($contact, $person, $importer["uid"]); $datarray = array(); @@ -1653,7 +1655,7 @@ class Diaspora $datarray["owner-avatar"] = ((x($contact, "thumb")) ? $contact["thumb"] : $contact["photo"]); $datarray["guid"] = $guid; - $datarray["uri"] = self::get_uri_from_guid($author, $guid); + $datarray["uri"] = self::getUriFromGuid($author, $guid); $datarray["type"] = "remote-comment"; $datarray["verb"] = ACTIVITY_POST; @@ -1676,9 +1678,9 @@ class Diaspora $body = diaspora2bb($text); - $datarray["body"] = self::replace_people_guid($body, $person["url"]); + $datarray["body"] = self::replacePeopleGuid($body, $person["url"]); - self::fetch_guid($datarray); + self::fetchGuid($datarray); $message_id = item_store($datarray); @@ -1715,7 +1717,7 @@ class Diaspora * * @return bool "true" if it was successful */ - private static function receive_conversation_message($importer, $contact, $data, $msg, $mesg, $conversation) + private static function receiveConversationMessage($importer, $contact, $data, $msg, $mesg, $conversation) { $author = notags(unxmlify($data->author)); $guid = notags(unxmlify($data->guid)); @@ -1744,7 +1746,7 @@ class Diaspora $body = diaspora2bb($msg_text); $message_uri = $msg_author.":".$msg_guid; - $person = self::person_by_handle($msg_author); + $person = self::personByHandle($msg_author); dba::lock('mail'); @@ -1794,8 +1796,8 @@ class Diaspora "source_link" => $person["url"], "source_photo" => $person["thumb"], "verb" => ACTIVITY_POST, - "otype" => "mail" - )); + "otype" => "mail") + ); return true; } @@ -1808,7 +1810,7 @@ class Diaspora * * @return bool Success */ - private static function receive_conversation($importer, $msg, $data) + private static function receiveConversation($importer, $msg, $data) { $author = notags(unxmlify($data->author)); $guid = notags(unxmlify($data->guid)); @@ -1823,7 +1825,7 @@ class Diaspora return false; } - $contact = self::allowed_contact_by_handle($importer, $msg["author"], true); + $contact = self::allowedContactByHandle($importer, $msg["author"], true); if (!$contact) { return false; } @@ -1867,7 +1869,7 @@ class Diaspora } foreach ($messages as $mesg) { - self::receive_conversation_message($importer, $contact, $data, $msg, $mesg, $conversation); + self::receiveConversationMessage($importer, $contact, $data, $msg, $mesg, $conversation); } return true; @@ -1882,7 +1884,8 @@ class Diaspora * * @return string the body */ - private static function construct_like_body($contact, $parent_item, $guid) { + private static function constructLikeBody($contact, $parent_item, $guid) + { $bodyverb = t('%1$s likes %2$s\'s %3$s'); $ulink = "[url=".$contact["url"]."]".$contact["name"]."[/url]"; @@ -1900,7 +1903,7 @@ class Diaspora * * @return string The XML */ - private static function construct_like_object($importer, $parent_item) + private static function constructLikeObject($importer, $parent_item) { $objtype = ACTIVITY_OBJ_NOTE; $link = ''; @@ -1925,7 +1928,7 @@ class Diaspora * * @return int The message id of the generated like or "false" if there was an error */ - private static function receive_like($importer, $sender, $data) + private static function receiveLike($importer, $sender, $data) { $author = notags(unxmlify($data->author)); $guid = notags(unxmlify($data->guid)); @@ -1939,29 +1942,29 @@ class Diaspora return false; } - $contact = self::allowed_contact_by_handle($importer, $sender, true); + $contact = self::allowedContactByHandle($importer, $sender, true); if (!$contact) { return false; } - $message_id = self::message_exists($importer["uid"], $guid); + $message_id = self::messageExists($importer["uid"], $guid); if ($message_id) { return true; } - $parent_item = self::parent_item($importer["uid"], $parent_guid, $author, $contact); + $parent_item = self::parentItem($importer["uid"], $parent_guid, $author, $contact); if (!$parent_item) { return false; } - $person = self::person_by_handle($author); + $person = self::personByHandle($author); if (!is_array($person)) { logger("unable to find author details"); return false; } // Fetch the contact id - if we know this contact - $author_contact = self::author_contact_by_url($contact, $person, $importer["uid"]); + $author_contact = self::authorContactByUrl($contact, $person, $importer["uid"]); // "positive" = "false" would be a Dislike - wich isn't currently supported by Diaspora // We would accept this anyhow. @@ -1988,7 +1991,7 @@ class Diaspora $datarray["owner-avatar"] = ((x($contact, "thumb")) ? $contact["thumb"] : $contact["photo"]); $datarray["guid"] = $guid; - $datarray["uri"] = self::get_uri_from_guid($author, $guid); + $datarray["uri"] = self::getUriFromGuid($author, $guid); $datarray["type"] = "activity"; $datarray["verb"] = $verb; @@ -1996,9 +1999,9 @@ class Diaspora $datarray["parent-uri"] = $parent_item["uri"]; $datarray["object-type"] = ACTIVITY_OBJ_NOTE; - $datarray["object"] = self::construct_like_object($importer, $parent_item); + $datarray["object"] = self::constructLikeObject($importer, $parent_item); - $datarray["body"] = self::construct_like_body($contact, $parent_item, $guid); + $datarray["body"] = self::constructLikeBody($contact, $parent_item, $guid); $message_id = item_store($datarray); @@ -2039,7 +2042,7 @@ class Diaspora * * @return bool Success? */ - private static function receive_message($importer, $data) + private static function receiveMessage($importer, $data) { $author = notags(unxmlify($data->author)); $guid = notags(unxmlify($data->guid)); @@ -2047,7 +2050,7 @@ class Diaspora $text = unxmlify($data->text); $created_at = datetime_convert("UTC", "UTC", notags(unxmlify($data->created_at))); - $contact = self::allowed_contact_by_handle($importer, $author, true); + $contact = self::allowedContactByHandle($importer, $author, true); if (!$contact) { return false; } @@ -2068,7 +2071,7 @@ class Diaspora $message_uri = $author.":".$guid; - $person = self::person_by_handle($author); + $person = self::personByHandle($author); if (!$person) { logger("unable to find author details"); return false; @@ -2076,7 +2079,7 @@ class Diaspora $body = diaspora2bb($text); - $body = self::replace_people_guid($body, $person["url"]); + $body = self::replacePeopleGuid($body, $person["url"]); dba::lock('mail'); @@ -2123,7 +2126,7 @@ class Diaspora * * @return bool always true */ - private static function receive_participation($importer, $data) + private static function receiveParticipation($importer, $data) { // I'm not sure if we can fully support this message type return true; @@ -2137,7 +2140,7 @@ class Diaspora * * @return bool always true */ - private static function receive_photo($importer, $data) + private static function receivePhoto($importer, $data) { // There doesn't seem to be a reason for this function, // since the photo data is transmitted in the status message as well @@ -2152,7 +2155,7 @@ class Diaspora * * @return bool always true */ - private static function receive_poll_participation($importer, $data) + private static function receivePollParticipation($importer, $data) { // We don't support polls by now return true; @@ -2166,11 +2169,11 @@ class Diaspora * * @return bool Success */ - private static function receive_profile($importer, $data) + private static function receiveProfile($importer, $data) { $author = strtolower(notags(unxmlify($data->author))); - $contact = self::contact_by_handle($importer["uid"], $author); + $contact = self::contactByHandle($importer["uid"], $author); if (!$contact) { return false; } @@ -2261,8 +2264,9 @@ class Diaspora * * @param array $importer Array of the importer user * @param array $contact The contact that send the request + * @return void */ - private static function receive_request_make_friend($importer, $contact) + private static function receiveRequestMakeFriend($importer, $contact) { $a = get_app(); @@ -2281,7 +2285,6 @@ class Diaspora ); if ($r && !$r[0]["hide-friends"] && !$contact["hidden"] && intval(PConfig::get($importer["uid"], "system", "post_newfriend"))) { - $self = q( "SELECT * FROM `contact` WHERE `self` AND `uid` = %d LIMIT 1", intval($importer["uid"]) @@ -2310,7 +2313,7 @@ class Diaspora $BPhoto = "[url=".$contact["url"]."][img]".$contact["thumb"]."[/img][/url]"; $arr["body"] = sprintf(t("%1$s is now friends with %2$s"), $A, $B)."\n\n\n".$Bphoto; - $arr["object"] = self::construct_new_friend_object($contact); + $arr["object"] = self::constructNewFriendObject($contact); $arr["last-child"] = 1; @@ -2334,7 +2337,7 @@ class Diaspora * * @return string The XML */ - private static function construct_new_friend_object($contact) + private static function constructNewFriendObject($contact) { $objtype = ACTIVITY_OBJ_PERSON; $link = ''."\n". @@ -2356,7 +2359,7 @@ class Diaspora * * @return bool Success */ - private static function receive_contact_request($importer, $data) + private static function receiveContactRequest($importer, $data) { $author = unxmlify($data->author); $recipient = unxmlify($data->recipient); @@ -2379,17 +2382,17 @@ class Diaspora $sharing = true; } - $contact = self::contact_by_handle($importer["uid"], $author); + $contact = self::contactByHandle($importer["uid"], $author); // perhaps we were already sharing with this person. Now they're sharing with us. // That makes us friends. if ($contact) { if ($following) { logger("Author ".$author." (Contact ".$contact["id"].") wants to follow us.", LOGGER_DEBUG); - self::receive_request_make_friend($importer, $contact); + self::receiveRequestMakeFriend($importer, $contact); // refetch the contact array - $contact = self::contact_by_handle($importer["uid"], $author); + $contact = self::contactByHandle($importer["uid"], $author); // If we are now friends, we are sending a share message. // Normally we needn't to do so, but the first message could have been vanished. @@ -2397,7 +2400,7 @@ class Diaspora $u = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1", intval($importer["uid"])); if ($u) { logger("Sending share message to author ".$author." - Contact: ".$contact["id"]." - User: ".$importer["uid"], LOGGER_DEBUG); - $ret = self::send_share($u[0], $contact); + $ret = self::sendShare($u[0], $contact); } } return true; @@ -2422,7 +2425,7 @@ class Diaspora logger("Author ".$author." wants to listen to us.", LOGGER_DEBUG); } - $ret = self::person_by_handle($author); + $ret = self::personByHandle($author); if (!$ret || ($ret["network"] != NETWORK_DIASPORA)) { logger("Cannot resolve diaspora handle ".$author." for ".$recipient); @@ -2453,7 +2456,7 @@ class Diaspora // find the contact record we just created - $contact_record = self::contact_by_handle($importer["uid"], $author); + $contact_record = self::contactByHandle($importer["uid"], $author); if (!$contact_record) { logger("unable to locate newly created contact record."); @@ -2523,10 +2526,10 @@ class Diaspora $u = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1", intval($importer["uid"])); if ($u) { logger("Sending share message (Relation: ".$new_relation.") to author ".$author." - Contact: ".$contact_record["id"]." - User: ".$importer["uid"], LOGGER_DEBUG); - $ret = self::send_share($u[0], $contact_record); + $ret = self::sendShare($u[0], $contact_record); // Send the profile data, maybe it weren't transmitted before - self::send_profile($importer["uid"], array($contact_record)); + self::sendProfile($importer["uid"], array($contact_record)); } } @@ -2542,7 +2545,7 @@ class Diaspora * * @return array The fetched item */ - private static function original_item($guid, $orig_author, $author) + private static function originalItem($guid, $orig_author, $author) { // Do we already have this item? $r = q( @@ -2558,12 +2561,12 @@ class Diaspora // Maybe it is already a reshared item? // Then refetch the content, if it is a reshare from a reshare. // If it is a reshared post from another network then reformat to avoid display problems with two share elements - if (self::is_reshare($r[0]["body"], true)) { + if (self::isReshare($r[0]["body"], true)) { $r = array(); - } elseif (self::is_reshare($r[0]["body"], false) || strstr($r[0]["body"], "[share")) { + } elseif (self::isReshare($r[0]["body"], false) || strstr($r[0]["body"], "[share")) { $r[0]["body"] = diaspora2bb(bb2diaspora($r[0]["body"])); - $r[0]["body"] = self::replace_people_guid($r[0]["body"], $r[0]["author-link"]); + $r[0]["body"] = self::replacePeopleGuid($r[0]["body"], $r[0]["author-link"]); // Add OEmbed and other information to the body $r[0]["body"] = add_page_info_to_body($r[0]["body"], false, true); @@ -2577,12 +2580,12 @@ class Diaspora if (!DBM::is_result($r)) { $server = "https://".substr($orig_author, strpos($orig_author, "@") + 1); logger("1st try: reshared message ".$guid." will be fetched via SSL from the server ".$server); - $item_id = self::store_by_guid($guid, $server); + $item_id = self::storeByGuid($guid, $server); if (!$item_id) { $server = "http://".substr($orig_author, strpos($orig_author, "@") + 1); logger("2nd try: reshared message ".$guid." will be fetched without SLL from the server ".$server); - $item_id = self::store_by_guid($guid, $server); + $item_id = self::storeByGuid($guid, $server); } if ($item_id) { @@ -2595,9 +2598,9 @@ class Diaspora if (DBM::is_result($r)) { // If it is a reshared post from another network then reformat to avoid display problems with two share elements - if (self::is_reshare($r[0]["body"], false)) { + if (self::isReshare($r[0]["body"], false)) { $r[0]["body"] = diaspora2bb(bb2diaspora($r[0]["body"])); - $r[0]["body"] = self::replace_people_guid($r[0]["body"], $r[0]["author-link"]); + $r[0]["body"] = self::replacePeopleGuid($r[0]["body"], $r[0]["author-link"]); } return $r[0]; @@ -2616,7 +2619,7 @@ class Diaspora * * @return int the message id */ - private static function receive_reshare($importer, $data, $xml) + private static function receiveReshare($importer, $data, $xml) { $author = notags(unxmlify($data->author)); $guid = notags(unxmlify($data->guid)); @@ -2626,17 +2629,17 @@ class Diaspora /// @todo handle unprocessed property "provider_display_name" $public = notags(unxmlify($data->public)); - $contact = self::allowed_contact_by_handle($importer, $author, false); + $contact = self::allowedContactByHandle($importer, $author, false); if (!$contact) { return false; } - $message_id = self::message_exists($importer["uid"], $guid); + $message_id = self::messageExists($importer["uid"], $guid); if ($message_id) { return true; } - $original_item = self::original_item($root_guid, $root_author, $author); + $original_item = self::originalItem($root_guid, $root_author, $author); if (!$original_item) { return false; } @@ -2658,7 +2661,7 @@ class Diaspora $datarray["owner-avatar"] = $datarray["author-avatar"]; $datarray["guid"] = $guid; - $datarray["uri"] = $datarray["parent-uri"] = self::get_uri_from_guid($author, $guid); + $datarray["uri"] = $datarray["parent-uri"] = self::getUriFromGuid($author, $guid); $datarray["verb"] = ACTIVITY_POST; $datarray["gravity"] = GRAVITY_PARENT; @@ -2685,7 +2688,7 @@ class Diaspora $datarray["object-type"] = $original_item["object-type"]; - self::fetch_guid($datarray); + self::fetchGuid($datarray); $message_id = item_store($datarray); if ($message_id) { @@ -2705,13 +2708,13 @@ class Diaspora * * @return bool success */ - private static function item_retraction($importer, $contact, $data) + private static function itemRetraction($importer, $contact, $data) { $author = notags(unxmlify($data->author)); $target_guid = notags(unxmlify($data->target_guid)); $target_type = notags(unxmlify($data->target_type)); - $person = self::person_by_handle($author); + $person = self::personByHandle($author); if (!is_array($person)) { logger("unable to find author detail for ".$author); return false; @@ -2785,11 +2788,11 @@ class Diaspora * * @return bool Success */ - private static function receive_retraction($importer, $sender, $data) + private static function receiveRetraction($importer, $sender, $data) { $target_type = notags(unxmlify($data->target_type)); - $contact = self::contact_by_handle($importer["uid"], $sender); + $contact = self::contactByHandle($importer["uid"], $sender); if (!$contact && (in_array($target_type, array("Contact", "Person")))) { logger("cannot find contact for sender: ".$sender." and user ".$importer["uid"]); return false; @@ -2803,7 +2806,7 @@ class Diaspora case "Post": case "Reshare": case "StatusMessage": - return self::item_retraction($importer, $contact, $data); + return self::itemRetraction($importer, $contact, $data); case "Contact": case "Person": @@ -2828,7 +2831,7 @@ class Diaspora * * @return int The message id of the newly created item */ - private static function receive_status_message($importer, $data, $xml) + private static function receiveStatusMessage($importer, $data, $xml) { $author = notags(unxmlify($data->author)); $guid = notags(unxmlify($data->guid)); @@ -2837,12 +2840,12 @@ class Diaspora $text = unxmlify($data->text); $provider_display_name = notags(unxmlify($data->provider_display_name)); - $contact = self::allowed_contact_by_handle($importer, $author, false); + $contact = self::allowedContactByHandle($importer, $author, false); if (!$contact) { return false; } - $message_id = self::message_exists($importer["uid"], $guid); + $message_id = self::messageExists($importer["uid"], $guid); if ($message_id) { return true; } @@ -2870,7 +2873,7 @@ class Diaspora $datarray["object-type"] = ACTIVITY_OBJ_NOTE; // Add OEmbed and other information to the body - if (!self::is_redmatrix($contact["url"])) { + if (!self::isRedmatrix($contact["url"])) { $body = add_page_info_to_body($body, false, true); } } @@ -2897,7 +2900,7 @@ class Diaspora $datarray["owner-avatar"] = $datarray["author-avatar"]; $datarray["guid"] = $guid; - $datarray["uri"] = $datarray["parent-uri"] = self::get_uri_from_guid($author, $guid); + $datarray["uri"] = $datarray["parent-uri"] = self::getUriFromGuid($author, $guid); $datarray["verb"] = ACTIVITY_POST; $datarray["gravity"] = GRAVITY_PARENT; @@ -2905,7 +2908,7 @@ class Diaspora $datarray["protocol"] = PROTOCOL_DIASPORA; $datarray["source"] = $xml; - $datarray["body"] = self::replace_people_guid($body, $contact["url"]); + $datarray["body"] = self::replacePeopleGuid($body, $contact["url"]); if ($provider_display_name != "") { $datarray["app"] = $provider_display_name; @@ -2923,7 +2926,7 @@ class Diaspora $datarray["coord"] = $address["lat"]." ".$address["lng"]; } - self::fetch_guid($datarray); + self::fetchGuid($datarray); $message_id = item_store($datarray); if ($message_id) { @@ -2945,7 +2948,7 @@ class Diaspora * * @return string the handle in the format user@domain.tld */ - private static function my_handle($contact) + private static function myHandle($contact) { if ($contact["addr"] != "") { return $contact["addr"]; @@ -2974,7 +2977,7 @@ class Diaspora * * @return string The encrypted data */ - public static function encode_private_data($msg, $user, $contact, $prvkey, $pubkey) + public static function encodePrivateData($msg, $user, $contact, $prvkey, $pubkey) { logger("Message: ".$msg, LOGGER_DATA); @@ -2989,7 +2992,7 @@ class Diaspora $iv = openssl_random_pseudo_bytes(16); $b_iv = base64_encode($iv); - $ciphertext = self::aes_encrypt($aes_key, $iv, $msg); + $ciphertext = self::aesEncrypt($aes_key, $iv, $msg); $json = json_encode(array("iv" => $b_iv, "key" => $b_aes_key)); @@ -3012,12 +3015,12 @@ class Diaspora * * @return string The envelope */ - public static function build_magic_envelope($msg, $user) + public static function buildMagicEnvelope($msg, $user) { $b64url_data = base64url_encode($msg); $data = str_replace(array("\n", "\r", " ", "\t"), array("", "", "", ""), $b64url_data); - $key_id = base64url_encode(self::my_handle($user)); + $key_id = base64url_encode(self::myHandle($user)); $type = "application/xml"; $encoding = "base64url"; $alg = "RSA-SHA256"; @@ -3055,14 +3058,14 @@ class Diaspora * * @return string The message that will be transmitted to other servers */ - private static function build_message($msg, $user, $contact, $prvkey, $pubkey, $public = false) + private static function buildMessage($msg, $user, $contact, $prvkey, $pubkey, $public = false) { // The message is put into an envelope with the sender's signature - $envelope = self::build_magic_envelope($msg, $user); + $envelope = self::buildMagicEnvelope($msg, $user); // Private messages are put into a second envelope, encrypted with the receivers public key if (!$public) { - $envelope = self::encode_private_data($envelope, $user, $contact, $prvkey, $pubkey); + $envelope = self::encodePrivateData($envelope, $user, $contact, $prvkey, $pubkey); } return $envelope; @@ -3169,7 +3172,7 @@ class Diaspora * * @return string The post XML */ - public static function build_post_xml($type, $message) + public static function buildPostXml($type, $message) { $data = array($type => $message); @@ -3189,9 +3192,9 @@ class Diaspora * * @return int Result of the transmission */ - private static function build_and_transmit($owner, $contact, $type, $message, $public_batch = false, $guid = "", $spool = false) + private static function buildAndTransmit($owner, $contact, $type, $message, $public_batch = false, $guid = "", $spool = false) { - $msg = self::build_post_xml($type, $message); + $msg = self::buildPostXml($type, $message); logger('message: '.$msg, LOGGER_DATA); logger('send guid '.$guid, LOGGER_DEBUG); @@ -3201,7 +3204,7 @@ class Diaspora $owner['uprvkey'] = $owner['prvkey']; } - $envelope = self::build_message($msg, $owner, $contact, $owner['uprvkey'], $contact['pubkey'], $public_batch); + $envelope = self::buildMessage($msg, $owner, $contact, $owner['uprvkey'], $contact['pubkey'], $public_batch); if ($spool) { add_to_queue($contact['id'], NETWORK_DIASPORA, $envelope, $public_batch); @@ -3238,7 +3241,7 @@ class Diaspora logger("Send account migration ".print_r($message, true), LOGGER_DEBUG); - return self::build_and_transmit($owner, $contact, "account_migration", $message); + return self::buildAndTransmit($owner, $contact, "account_migration", $message); } /** @@ -3249,13 +3252,13 @@ class Diaspora * * @return int The result of the transmission */ - public static function send_share($owner, $contact) + public static function sendShare($owner, $contact) { /** * @todo support the different possible combinations of "following" and "sharing" * Currently, Diaspora only interprets the "sharing" field * - * Before switching this code productive, we have to check all "send_share" calls if "rel" is set correctly + * Before switching this code productive, we have to check all "sendShare" calls if "rel" is set correctly */ /* @@ -3272,14 +3275,14 @@ class Diaspora } */ - $message = array("author" => self::my_handle($owner), + $message = array("author" => self::myHandle($owner), "recipient" => $contact["addr"], "following" => "true", "sharing" => "true"); logger("Send share ".print_r($message, true), LOGGER_DEBUG); - return self::build_and_transmit($owner, $contact, "contact", $message); + return self::buildAndTransmit($owner, $contact, "contact", $message); } /** @@ -3292,14 +3295,14 @@ class Diaspora */ public static function sendUnshare($owner, $contact) { - $message = array("author" => self::my_handle($owner), + $message = array("author" => self::myHandle($owner), "recipient" => $contact["addr"], "following" => "false", "sharing" => "false"); logger("Send unshare ".print_r($message, true), LOGGER_DEBUG); - return self::build_and_transmit($owner, $contact, "contact", $message); + return self::buildAndTransmit($owner, $contact, "contact", $message); } /** @@ -3310,7 +3313,7 @@ class Diaspora * * @return array|bool Reshare details or "false" if no reshare */ - public static function is_reshare($body, $complete = true) + public static function isReshare($body, $complete = true) { $body = trim($body); @@ -3356,7 +3359,7 @@ class Diaspora ); if ($r) { $ret= array(); - $ret["root_handle"] = self::handle_from_contact($r[0]["contact-id"]); + $ret["root_handle"] = self::handleFromContact($r[0]["contact-id"]); $ret["root_guid"] = $guid; return($ret); } @@ -3406,7 +3409,7 @@ class Diaspora * * @return array with event data */ - private static function build_event($event_id) + private static function buildEvent($event_id) { $r = q("SELECT `guid`, `uid`, `start`, `finish`, `nofinish`, `summary`, `desc`, `location`, `adjust` FROM `event` WHERE `id` = %d", intval($event_id)); if (!DBM::is_result($r)) { @@ -3431,7 +3434,7 @@ class Diaspora $owner = $r[0]; - $eventdata['author'] = self::my_handle($owner); + $eventdata['author'] = self::myHandle($owner); if ($event['guid']) { $eventdata['guid'] = $event['guid']; @@ -3483,23 +3486,23 @@ class Diaspora * 'type' -> Message type ("status_message" or "reshare") * 'message' -> Array of XML elements of the status */ - public static function build_status($item, $owner) + public static function buildStatus($item, $owner) { - $cachekey = "diaspora:build_status:".$item['guid']; + $cachekey = "diaspora:buildStatus:".$item['guid']; $result = Cache::get($cachekey); if (!is_null($result)) { return $result; } - $myaddr = self::my_handle($owner); + $myaddr = self::myHandle($owner); $public = (($item["private"]) ? "false" : "true"); $created = datetime_convert("UTC", "UTC", $item["created"], 'Y-m-d\TH:i:s\Z'); // Detect a share element and do a reshare - if (!$item['private'] && ($ret = self::is_reshare($item["body"]))) { + if (!$item['private'] && ($ret = self::isReshare($item["body"]))) { $message = array("author" => $myaddr, "guid" => $item["guid"], "created_at" => $created, @@ -3556,7 +3559,7 @@ class Diaspora } if ($item['event-id'] > 0) { - $event = self::build_event($item['event-id']); + $event = self::buildEvent($item['event-id']); if (count($event)) { $message['event'] = $event; @@ -3585,11 +3588,11 @@ class Diaspora * * @return int The result of the transmission */ - public static function send_status($item, $owner, $contact, $public_batch = false) + public static function sendStatus($item, $owner, $contact, $public_batch = false) { - $status = self::build_status($item, $owner); + $status = self::buildStatus($item, $owner); - return self::build_and_transmit($owner, $contact, $status["type"], $status["message"], $public_batch, $item["guid"]); + return self::buildAndTransmit($owner, $contact, $status["type"], $status["message"], $public_batch, $item["guid"]); } /** @@ -3600,7 +3603,7 @@ class Diaspora * * @return array The data for a "like" */ - private static function construct_like($item, $owner) + private static function constructLike($item, $owner) { $p = q( "SELECT `guid`, `uri`, `parent-uri` FROM `item` WHERE `uri` = '%s' LIMIT 1", @@ -3619,7 +3622,7 @@ class Diaspora $positive = "false"; } - return(array("author" => self::my_handle($owner), + return(array("author" => self::myHandle($owner), "guid" => $item["guid"], "parent_guid" => $parent["guid"], "parent_type" => $target_type, @@ -3635,8 +3638,8 @@ class Diaspora * * @return array The data for an "EventParticipation" */ - private static function construct_attend($item, $owner) { - + private static function constructAttend($item, $owner) + { $p = q( "SELECT `guid`, `uri`, `parent-uri` FROM `item` WHERE `uri` = '%s' LIMIT 1", dbesc($item["thr-parent"]) @@ -3662,7 +3665,7 @@ class Diaspora return false; } - return(array("author" => self::my_handle($owner), + return(array("author" => self::myHandle($owner), "guid" => $item["guid"], "parent_guid" => $parent["guid"], "status" => $attend_answer, @@ -3677,9 +3680,9 @@ class Diaspora * * @return array The data for a comment */ - private static function construct_comment($item, $owner) + private static function constructComment($item, $owner) { - $cachekey = "diaspora:construct_comment:".$item['guid']; + $cachekey = "diaspora:constructComment:".$item['guid']; $result = Cache::get($cachekey); if (!is_null($result)) { @@ -3701,7 +3704,7 @@ class Diaspora $text = html_entity_decode(bb2diaspora($item["body"])); $created = datetime_convert("UTC", "UTC", $item["created"], 'Y-m-d\TH:i:s\Z'); - $comment = array("author" => self::my_handle($owner), + $comment = array("author" => self::myHandle($owner), "guid" => $item["guid"], "created_at" => $created, "parent_guid" => $parent["guid"], @@ -3710,7 +3713,7 @@ class Diaspora // Send the thread parent guid only if it is a threaded comment if ($item['thr-parent'] != $item['parent-uri']) { - $comment['thread_parent_guid'] = self::get_guid_from_uri($item['thr-parent'], $item['uid']); + $comment['thread_parent_guid'] = self::getGuidFromUri($item['thr-parent'], $item['uid']); } Cache::set($cachekey, $comment, CACHE_QUARTER_HOUR); @@ -3728,16 +3731,16 @@ class Diaspora * * @return int The result of the transmission */ - public static function send_followup($item, $owner, $contact, $public_batch = false) + public static function sendFollowup($item, $owner, $contact, $public_batch = false) { if (in_array($item['verb'], array(ACTIVITY_ATTEND, ACTIVITY_ATTENDNO, ACTIVITY_ATTENDMAYBE))) { - $message = self::construct_attend($item, $owner); + $message = self::constructAttend($item, $owner); $type = "event_participation"; } elseif (in_array($item["verb"], array(ACTIVITY_LIKE, ACTIVITY_DISLIKE))) { - $message = self::construct_like($item, $owner); + $message = self::constructLike($item, $owner); $type = "like"; } else { - $message = self::construct_comment($item, $owner); + $message = self::constructComment($item, $owner); $type = "comment"; } @@ -3747,7 +3750,7 @@ class Diaspora $message["author_signature"] = self::signature($owner, $message); - return self::build_and_transmit($owner, $contact, $type, $message, $public_batch, $item["guid"]); + return self::buildAndTransmit($owner, $contact, $type, $message, $public_batch, $item["guid"]); } /** @@ -3758,7 +3761,7 @@ class Diaspora * * @return string The message */ - private static function message_from_signature($item, $signature) + private static function messageFromSignature($item, $signature) { // Split the signed text $signed_parts = explode(";", $signature['signed_text']); @@ -3808,10 +3811,10 @@ class Diaspora * * @return int The result of the transmission */ - public static function send_relay($item, $owner, $contact, $public_batch = false) + public static function sendRelay($item, $owner, $contact, $public_batch = false) { if ($item["deleted"]) { - return self::send_retraction($item, $owner, $contact, $public_batch, true); + return self::sendRetraction($item, $owner, $contact, $public_batch, true); } elseif (in_array($item["verb"], array(ACTIVITY_LIKE, ACTIVITY_DISLIKE))) { $type = "like"; } else { @@ -3837,13 +3840,13 @@ class Diaspora // Old way - is used by the internal Friendica functions /// @todo Change all signatur storing functions to the new format if ($signature['signed_text'] && $signature['signature'] && $signature['signer']) { - $message = self::message_from_signature($item, $signature); + $message = self::messageFromSignature($item, $signature); } else {// New way $msg = json_decode($signature['signed_text'], true); $message = array(); if (is_array($msg)) { - foreach ($msg AS $field => $data) { + foreach ($msg as $field => $data) { if (!$item["deleted"]) { if ($field == "diaspora_handle") { $field = "author"; @@ -3864,7 +3867,7 @@ class Diaspora logger("Relayed data ".print_r($message, true), LOGGER_DEBUG); - return self::build_and_transmit($owner, $contact, $type, $message, $public_batch, $item["guid"]); + return self::buildAndTransmit($owner, $contact, $type, $message, $public_batch, $item["guid"]); } /** @@ -3878,9 +3881,9 @@ class Diaspora * * @return int The result of the transmission */ - public static function send_retraction($item, $owner, $contact, $public_batch = false, $relay = false) + public static function sendRetraction($item, $owner, $contact, $public_batch = false, $relay = false) { - $itemaddr = self::handle_from_contact($item["contact-id"], $item["gcontact-id"]); + $itemaddr = self::handleFromContact($item["contact-id"], $item["gcontact-id"]); $msg_type = "retraction"; @@ -3898,7 +3901,7 @@ class Diaspora logger("Got message ".print_r($message, true), LOGGER_DEBUG); - return self::build_and_transmit($owner, $contact, $msg_type, $message, $public_batch, $item["guid"]); + return self::buildAndTransmit($owner, $contact, $msg_type, $message, $public_batch, $item["guid"]); } /** @@ -3910,9 +3913,9 @@ class Diaspora * * @return int The result of the transmission */ - public static function send_mail($item, $owner, $contact) + public static function sendMail($item, $owner, $contact) { - $myaddr = self::my_handle($owner); + $myaddr = self::myHandle($owner); $r = q( "SELECT * FROM `conv` WHERE `id` = %d AND `uid` = %d LIMIT 1", @@ -3960,7 +3963,7 @@ class Diaspora $type = "conversation"; } - return self::build_and_transmit($owner, $contact, $type, $message, false, $item["guid"]); + return self::buildAndTransmit($owner, $contact, $type, $message, false, $item["guid"]); } /** @@ -4041,9 +4044,11 @@ class Diaspora /** * @brief Sends profile data * - * @param int $uid The user id + * @param int $uid The user id + * @param bool $recips optional, default false + * @return void */ - public static function send_profile($uid, $recips = false) + public static function sendProfile($uid, $recips = false) { if (!$uid) { return; @@ -4067,7 +4072,7 @@ class Diaspora foreach ($recips as $recip) { logger("Send updated profile data for user ".$uid." to contact ".$recip["id"], LOGGER_DEBUG); - self::build_and_transmit($profile, $recip, "profile", $message, false, "", true); + self::buildAndTransmit($profile, $recip, "profile", $message, false, "", true); } } @@ -4079,7 +4084,7 @@ class Diaspora * * @return bool Success */ - public static function store_like_signature($contact, $post_id) + public static function storeLikeSignature($contact, $post_id) { // Is the contact the owner? Then fetch the private key if (!$contact['self'] || ($contact['uid'] == 0)) { @@ -4103,7 +4108,7 @@ class Diaspora return false; } - $message = self::construct_like($r[0], $contact); + $message = self::constructLike($r[0], $contact); $message["author_signature"] = self::signature($contact, $message); /* @@ -4126,7 +4131,7 @@ class Diaspora * * @return bool Success */ - public static function store_comment_signature($item, $contact, $uprvkey, $message_id) + public static function storeCommentSignature($item, $contact, $uprvkey, $message_id) { if ($uprvkey == "") { logger('No private key, so not storing comment signature', LOGGER_DEBUG); @@ -4135,7 +4140,7 @@ class Diaspora $contact["uprvkey"] = $uprvkey; - $message = self::construct_comment($item, $contact); + $message = self::constructComment($item, $contact); $message["author_signature"] = self::signature($contact, $message); /* diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index 7ff8f8f60..ed762084c 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -298,6 +298,7 @@ class OStatus * @param array $importer user record of the importing user * @param array $contact contact * @param string $hub Called by reference, returns the fetched hub data + * @return void */ public static function import($xml, $importer, &$contact, &$hub) { @@ -309,7 +310,7 @@ class OStatus * * @param string $xml The XML * @param array $importer user record of the importing user - * @param array $contact + * @param array $contact contact * @param string $hub Called by reference, returns the fetched hub data * @param boolean $stored Is the post fresh imported or from the database? * @param boolean $initialize Is it the leading post so that data has to be initialized? @@ -537,6 +538,10 @@ class OStatus return true; } + /** + * @param object $item item + * @return void + */ private static function deleteNotice($item) { $condition = array('uid' => $item['uid'], 'author-link' => $item['author-link'], 'uri' => $item['uri']); @@ -567,6 +572,7 @@ class OStatus * @param object $entry The xml entry that is processed * @param array $item The item array * @param array $importer user record of the importing user + * @return void */ private static function processPost($xpath, $entry, &$item, $importer) { @@ -708,6 +714,7 @@ class OStatus * * @param string $conversation The link to the conversation * @param string $conversation_uri The conversation in "uri" format + * @return void */ private static function fetchConversation($conversation, $conversation_uri) { @@ -768,6 +775,7 @@ class OStatus * @param string $xml The feed * @param string $conversation conversation * @param string $conversation_uri conversation uri + * @return void */ private static function storeConversation($xml, $conversation = '', $conversation_uri = '') { @@ -844,13 +852,14 @@ class OStatus /** * @brief Fetch the own post so that it can be stored later - * @param array $item The item array * * We want to store the original data for later processing. * This function is meant for cases where we process a feed with multiple entries. * In that case we need to fetch the single posts here. * * @param string $self The link to the self item + * @param array $item The item array + * @return void */ private static function fetchSelf($self, &$item) { @@ -885,6 +894,7 @@ class OStatus * @param string $related The link to the related item * @param string $related_uri The related item in "uri" format * @param array $importer user record of the importing user + * @return void */ private static function fetchRelated($related, $related_uri, $importer) { @@ -1293,6 +1303,7 @@ class OStatus * @param object $doc XML document * @param object $root XML root element where the hub links are added * @param object $nick nick + * @return void */ public static function hublinks($doc, $root, $nick) { @@ -1306,6 +1317,7 @@ class OStatus * @param object $doc XML document * @param object $root XML root element where the hub links are added * @param array $item Data of the item that is to be posted + * @return void */ private static function getAttachment($doc, $root, $item) { @@ -1582,7 +1594,7 @@ class OStatus * @param object $doc XML document * @param array $item Data of the item that is to be posted * @param array $owner Contact data of the poster - * @param $repeated_guid + * @param string $repeated_guid guid * @param bool $toplevel Is it for en entry element (false) or a feed entry (true)? * * @return object Entry element @@ -1872,6 +1884,7 @@ class OStatus * @param string $title Title for the post * @param string $verb The activity verb * @param bool $complete Add the "status_net" element? + * @return void */ private static function entryContent($doc, $entry, $item, $owner, $title, $verb = "", $complete = true) { @@ -1914,6 +1927,7 @@ class OStatus * @param array $item Data of the item that is to be posted * @param array $owner Contact data of the poster * @param bool $complete default true + * @return void */ private static function entryFooter($doc, $entry, $item, $owner, $complete = true) { diff --git a/src/Worker/Delivery.php b/src/Worker/Delivery.php index 14fe3027f..216d2520d 100644 --- a/src/Worker/Delivery.php +++ b/src/Worker/Delivery.php @@ -485,7 +485,7 @@ class Delivery { break; if ($mail) { - Diaspora::send_mail($item,$owner,$contact); + Diaspora::sendMail($item,$owner,$contact); break; } @@ -498,7 +498,7 @@ class Delivery { if (($target_item['deleted']) && (($target_item['uri'] === $target_item['parent-uri']) || $followup)) { // top-level retraction logger('diaspora retract: '.$loc); - Diaspora::send_retraction($target_item,$owner,$contact,$public_message); + Diaspora::sendRetraction($target_item,$owner,$contact,$public_message); break; } elseif ($relocate) { Diaspora::sendAccountMigration($owner, $contact, $uid); @@ -506,17 +506,17 @@ class Delivery { } elseif ($followup) { // send comments and likes to owner to relay logger('diaspora followup: '.$loc); - Diaspora::send_followup($target_item,$owner,$contact,$public_message); + Diaspora::sendFollowup($target_item,$owner,$contact,$public_message); break; } elseif ($target_item['uri'] !== $target_item['parent-uri']) { // we are the relay - send comments, likes and relayable_retractions to our conversants logger('diaspora relay: '.$loc); - Diaspora::send_relay($target_item,$owner,$contact,$public_message); + Diaspora::sendRelay($target_item,$owner,$contact,$public_message); break; } elseif ($top_level && !$walltowall) { // currently no workable solution for sending walltowall logger('diaspora status: '.$loc); - Diaspora::send_status($target_item,$owner,$contact,$public_message); + Diaspora::sendStatus($target_item,$owner,$contact,$public_message); break; } diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php index f3096e41a..ac8cf123c 100644 --- a/src/Worker/Notifier.php +++ b/src/Worker/Notifier.php @@ -525,7 +525,7 @@ class Notifier { if ($diaspora_delivery) { if (!$followup) { - $r0 = Diaspora::relay_list(); + $r0 = Diaspora::relayList(); } $r1 = q("SELECT `batch`, ANY_VALUE(`id`) AS `id`, ANY_VALUE(`name`) AS `name`, ANY_VALUE(`network`) AS `network` diff --git a/src/Worker/ProfileUpdate.php b/src/Worker/ProfileUpdate.php index 43c76965d..e33aa5d9a 100644 --- a/src/Worker/ProfileUpdate.php +++ b/src/Worker/ProfileUpdate.php @@ -14,6 +14,6 @@ class ProfileUpdate { return; } - Diaspora::send_profile($uid); + Diaspora::sendProfile($uid); } } From da5857529fbefdb75e167b61ce44bc990c0d33e8 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 23 Nov 2017 20:41:35 +0000 Subject: [PATCH 102/175] Additional features still had got problems --- include/features.php | 58 ++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/include/features.php b/include/features.php index 9895fd6f7..ade93a18e 100644 --- a/include/features.php +++ b/include/features.php @@ -14,13 +14,13 @@ use Friendica\Core\PConfig; * @return boolean */ function feature_enabled($uid, $feature) { - $x = Config::get('feature_lock', $feature); + $x = Config::get('feature_lock', $feature, false); - if (is_null($x)) { - $x = PConfig::get($uid, 'feature', $feature); - if (is_null($x)) { - $x = Config::get('feature', $feature); - if (is_null($x)) { + if (!$x) { + $x = PConfig::get($uid, 'feature', $feature, false); + if (!$x) { + $x = Config::get('feature', $feature, false); + if (!$x) { $x = get_feature_default($feature); } } @@ -67,53 +67,53 @@ function get_features($filtered = true) { 'general' => array( t('General Features'), //array('expire', t('Content Expiration'), t('Remove old posts/comments after a period of time')), - array('multi_profiles', t('Multiple Profiles'), t('Ability to create multiple profiles'), false, Config::get('feature_lock','multi_profiles')), - array('photo_location', t('Photo Location'), t('Photo metadata is normally stripped. This extracts the location (if present) prior to stripping metadata and links it to a map.'), false, Config::get('feature_lock','photo_location')), - array('export_calendar', t('Export Public Calendar'), t('Ability for visitors to download the public calendar'), false, Config::get('feature_lock','export_calendar')), + array('multi_profiles', t('Multiple Profiles'), t('Ability to create multiple profiles'), false, Config::get('feature_lock','multi_profiles', false)), + array('photo_location', t('Photo Location'), t('Photo metadata is normally stripped. This extracts the location (if present) prior to stripping metadata and links it to a map.'), false, Config::get('feature_lock','photo_location', false)), + array('export_calendar', t('Export Public Calendar'), t('Ability for visitors to download the public calendar'), false, Config::get('feature_lock','export_calendar', false)), ), // Post composition 'composition' => array( t('Post Composition Features'), - array('preview', t('Post Preview'), t('Allow previewing posts and comments before publishing them'), false, Config::get('feature_lock','preview')), - array('aclautomention', t('Auto-mention Forums'), t('Add/remove mention when a forum page is selected/deselected in ACL window.'), false, Config::get('feature_lock','aclautomention')), + array('preview', t('Post Preview'), t('Allow previewing posts and comments before publishing them'), false, Config::get('feature_lock','preview', false)), + array('aclautomention', t('Auto-mention Forums'), t('Add/remove mention when a forum page is selected/deselected in ACL window.'), false, Config::get('feature_lock','aclautomention', false)), ), // Network sidebar widgets 'widgets' => array( t('Network Sidebar Widgets'), - array('archives', t('Search by Date'), t('Ability to select posts by date ranges'), false, Config::get('feature_lock','archives')), - array('forumlist_widget', t('List Forums'), t('Enable widget to display the forums your are connected with'), true, Config::get('feature_lock','forumlist_widget')), - array('groups', t('Group Filter'), t('Enable widget to display Network posts only from selected group'), false, Config::get('feature_lock','groups')), - array('networks', t('Network Filter'), t('Enable widget to display Network posts only from selected network'), false, Config::get('feature_lock','networks')), - array('savedsearch', t('Saved Searches'), t('Save search terms for re-use'), false, Config::get('feature_lock','savedsearch')), + array('archives', t('Search by Date'), t('Ability to select posts by date ranges'), false, Config::get('feature_lock','archives', false)), + array('forumlist_widget', t('List Forums'), t('Enable widget to display the forums your are connected with'), true, Config::get('feature_lock','forumlist_widget', false)), + array('groups', t('Group Filter'), t('Enable widget to display Network posts only from selected group'), false, Config::get('feature_lock','groups', false)), + array('networks', t('Network Filter'), t('Enable widget to display Network posts only from selected network'), false, Config::get('feature_lock','networks', false)), + array('savedsearch', t('Saved Searches'), t('Save search terms for re-use'), false, Config::get('feature_lock','savedsearch', false)), ), // Network tabs 'net_tabs' => array( t('Network Tabs'), - array('personal_tab', t('Network Personal Tab'), t('Enable tab to display only Network posts that you\'ve interacted on'), false, Config::get('feature_lock','personal_tab')), - array('new_tab', t('Network New Tab'), t('Enable tab to display only new Network posts (from the last 12 hours)'), false, Config::get('feature_lock','new_tab')), - array('link_tab', t('Network Shared Links Tab'), t('Enable tab to display only Network posts with links in them'), false, Config::get('feature_lock','link_tab')), + array('personal_tab', t('Network Personal Tab'), t('Enable tab to display only Network posts that you\'ve interacted on'), false, Config::get('feature_lock','personal_tab', false)), + array('new_tab', t('Network New Tab'), t('Enable tab to display only new Network posts (from the last 12 hours)'), false, Config::get('feature_lock','new_tab', false)), + array('link_tab', t('Network Shared Links Tab'), t('Enable tab to display only Network posts with links in them'), false, Config::get('feature_lock','link_tab', false)), ), // Item tools 'tools' => array( t('Post/Comment Tools'), - array('multi_delete', t('Multiple Deletion'), t('Select and delete multiple posts/comments at once'), false, Config::get('feature_lock','multi_delete')), - array('edit_posts', t('Edit Sent Posts'), t('Edit and correct posts and comments after sending'), false, Config::get('feature_lock','edit_posts')), - array('commtag', t('Tagging'), t('Ability to tag existing posts'), false, Config::get('feature_lock','commtag')), - array('categories', t('Post Categories'), t('Add categories to your posts'), false, Config::get('feature_lock','categories')), - array('filing', t('Saved Folders'), t('Ability to file posts under folders'), false, Config::get('feature_lock','filing')), - array('dislike', t('Dislike Posts'), t('Ability to dislike posts/comments'), false, Config::get('feature_lock','dislike')), - array('star_posts', t('Star Posts'), t('Ability to mark special posts with a star indicator'), false, Config::get('feature_lock','star_posts')), - array('ignore_posts', t('Mute Post Notifications'), t('Ability to mute notifications for a thread'), false, Config::get('feature_lock','ignore_posts')), + array('multi_delete', t('Multiple Deletion'), t('Select and delete multiple posts/comments at once'), false, Config::get('feature_lock','multi_delete', false)), + array('edit_posts', t('Edit Sent Posts'), t('Edit and correct posts and comments after sending'), false, Config::get('feature_lock','edit_posts', false)), + array('commtag', t('Tagging'), t('Ability to tag existing posts'), false, Config::get('feature_lock','commtag', false)), + array('categories', t('Post Categories'), t('Add categories to your posts'), false, Config::get('feature_lock','categories', false)), + array('filing', t('Saved Folders'), t('Ability to file posts under folders'), false, Config::get('feature_lock','filing', false)), + array('dislike', t('Dislike Posts'), t('Ability to dislike posts/comments'), false, Config::get('feature_lock','dislike', false)), + array('star_posts', t('Star Posts'), t('Ability to mark special posts with a star indicator'), false, Config::get('feature_lock','star_posts', false)), + array('ignore_posts', t('Mute Post Notifications'), t('Ability to mute notifications for a thread'), false, Config::get('feature_lock','ignore_posts', false)), ), // Advanced Profile Settings 'advanced_profile' => array( t('Advanced Profile Settings'), - array('forumlist_profile', t('List Forums'), t('Show visitors public community forums at the Advanced Profile Page'), false, Config::get('feature_lock','forumlist_profile')), + array('forumlist_profile', t('List Forums'), t('Show visitors public community forums at the Advanced Profile Page'), false, Config::get('feature_lock','forumlist_profile', false)), ), ); @@ -125,7 +125,7 @@ function get_features($filtered = true) { $kquantity = count($arr[$k]); for ($y = 0; $y < $kquantity; $y ++) { if (is_array($arr[$k][$y])) { - if (is_null($arr[$k][$y][4])) { + if (!$arr[$k][$y][4]) { $has_items = true; } else { From 130e02ddef74ef10ff3a0864a40bf0485ba0daf5 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Thu, 23 Nov 2017 19:22:30 -0500 Subject: [PATCH 103/175] Review null_date and spaces at end of line --- src/Object/Contact.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Object/Contact.php b/src/Object/Contact.php index 50981659b..d799a7d89 100644 --- a/src/Object/Contact.php +++ b/src/Object/Contact.php @@ -103,7 +103,7 @@ class Contact extends BaseObject dba::update('contact', array('term-date' => datetime_convert()), array('id' => $contact['id'])); if ($contact['url'] != '') { - dba::update('contact', array('term-date' => datetime_convert()), array('`nurl` = ? AND `term-date` <= 1000-00-00', normalise_link($contact['url']))); + dba::update('contact', array('term-date' => datetime_convert()), array('`nurl` = ? AND `term-date` <= ?', normalise_link($contact['url']), NULL_DATE)); } } else { /* @todo @@ -484,7 +484,7 @@ class Contact extends BaseObject WHERE `uid` = %d ) ", intval($uid), intval($uid) ); - + return $r; } @@ -501,7 +501,7 @@ class Contact extends BaseObject AND `pending` = 0 LIMIT %d, %d", intval($uid), intval($uid), intval($start), intval($count) ); - + return $r; } From 40c37d76fe054df12242c27271f71c220b7d2dc5 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 23 Nov 2017 20:34:35 -0500 Subject: [PATCH 104/175] Don't cache the xmpp/password PConfig value --- src/Util/ExAuth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Util/ExAuth.php b/src/Util/ExAuth.php index 0769be2e6..aa3300c4e 100644 --- a/src/Util/ExAuth.php +++ b/src/Util/ExAuth.php @@ -226,7 +226,7 @@ class ExAuth } if ($Error) { $this->writeLog(LOG_INFO, 'check against alternate password for ' . $sUser . '@' . $aCommand[2]); - $sPassword = PConfig::get($uid, 'xmpp', 'password'); + $sPassword = PConfig::get($uid, 'xmpp', 'password', null, true); $Error = ($aCommand[3] != $sPassword); } } else { From 9df0457340b6497ccc2ccce0f99f18bb9274f9e0 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Thu, 23 Nov 2017 20:59:00 -0500 Subject: [PATCH 105/175] whitespace remove whitespace --- src/Object/Contact.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Object/Contact.php b/src/Object/Contact.php index d799a7d89..fff82e600 100644 --- a/src/Object/Contact.php +++ b/src/Object/Contact.php @@ -501,7 +501,6 @@ class Contact extends BaseObject AND `pending` = 0 LIMIT %d, %d", intval($uid), intval($uid), intval($start), intval($count) ); - return $r; } From b41bf77ec8187b6c7bdc5229510032662901e416 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 23 Nov 2017 23:40:54 -0500 Subject: [PATCH 106/175] Add HTTPException class files --- src/Network/HTTPException.php | 23 +++++++++++++++++++ .../HTTPException/BadGatewayException.php | 10 ++++++++ .../HTTPException/BadRequestException.php | 10 ++++++++ .../HTTPException/ConflictException.php | 10 ++++++++ .../ExpectationFailedException.php | 10 ++++++++ .../HTTPException/ForbiddenException.php | 10 ++++++++ .../HTTPException/GatewayTimeoutException.php | 10 ++++++++ src/Network/HTTPException/GoneException.php | 10 ++++++++ .../HTTPException/ImATeapotException.php | 11 +++++++++ .../InternalServerErrorException.php | 10 ++++++++ .../HTTPException/LenghtRequiredException.php | 10 ++++++++ .../MethodNotAllowedException.php | 10 ++++++++ .../HTTPException/NonAcceptableException.php | 10 ++++++++ .../HTTPException/NotFoundException.php | 9 ++++++++ .../HTTPException/NotImplementedException.php | 10 ++++++++ .../PreconditionFailedException.php | 10 ++++++++ .../ServiceUnavaiableException.php | 10 ++++++++ .../TooManyRequestsException.php | 10 ++++++++ .../HTTPException/UnauthorizedException.php | 10 ++++++++ .../UnprocessableEntityException.php | 10 ++++++++ .../UnsupportedMediaTypeException.php | 10 ++++++++ 21 files changed, 223 insertions(+) create mode 100644 src/Network/HTTPException.php create mode 100644 src/Network/HTTPException/BadGatewayException.php create mode 100644 src/Network/HTTPException/BadRequestException.php create mode 100644 src/Network/HTTPException/ConflictException.php create mode 100644 src/Network/HTTPException/ExpectationFailedException.php create mode 100644 src/Network/HTTPException/ForbiddenException.php create mode 100644 src/Network/HTTPException/GatewayTimeoutException.php create mode 100644 src/Network/HTTPException/GoneException.php create mode 100644 src/Network/HTTPException/ImATeapotException.php create mode 100644 src/Network/HTTPException/InternalServerErrorException.php create mode 100644 src/Network/HTTPException/LenghtRequiredException.php create mode 100644 src/Network/HTTPException/MethodNotAllowedException.php create mode 100644 src/Network/HTTPException/NonAcceptableException.php create mode 100644 src/Network/HTTPException/NotFoundException.php create mode 100644 src/Network/HTTPException/NotImplementedException.php create mode 100644 src/Network/HTTPException/PreconditionFailedException.php create mode 100644 src/Network/HTTPException/ServiceUnavaiableException.php create mode 100644 src/Network/HTTPException/TooManyRequestsException.php create mode 100644 src/Network/HTTPException/UnauthorizedException.php create mode 100644 src/Network/HTTPException/UnprocessableEntityException.php create mode 100644 src/Network/HTTPException/UnsupportedMediaTypeException.php diff --git a/src/Network/HTTPException.php b/src/Network/HTTPException.php new file mode 100644 index 000000000..eec4a9ced --- /dev/null +++ b/src/Network/HTTPException.php @@ -0,0 +1,23 @@ +httpdesc == "") { + $this->httpdesc = preg_replace("|([a-z])([A-Z])|",'$1 $2', str_replace("Exception","",get_class($this))); + } + parent::__construct($message, $code, $previous); + } +} diff --git a/src/Network/HTTPException/BadGatewayException.php b/src/Network/HTTPException/BadGatewayException.php new file mode 100644 index 000000000..1bb8b29e9 --- /dev/null +++ b/src/Network/HTTPException/BadGatewayException.php @@ -0,0 +1,10 @@ + Date: Thu, 23 Nov 2017 23:47:52 -0500 Subject: [PATCH 107/175] Fix httpdesc to work with new namespace --- src/Network/HTTPException.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Network/HTTPException.php b/src/Network/HTTPException.php index eec4a9ced..7602290c2 100644 --- a/src/Network/HTTPException.php +++ b/src/Network/HTTPException.php @@ -11,12 +11,16 @@ namespace Friendica\Network; use Exception; -class HTTPException extends Exception { +class HTTPException extends Exception +{ var $httpcode = 200; var $httpdesc = ""; - public function __construct($message = "", $code = 0, Exception $previous = null) { - if ($this->httpdesc == "") { - $this->httpdesc = preg_replace("|([a-z])([A-Z])|",'$1 $2', str_replace("Exception","",get_class($this))); + + public function __construct($message = '', $code = 0, Exception $previous = null) + { + if ($this->httpdesc == '') { + $classname = str_replace('Exception', '', str_replace('Friendica\Network\HTTPException\\', '', get_class($this))); + $this->httpdesc = preg_replace("|([a-z])([A-Z])|",'$1 $2', $classname); } parent::__construct($message, $code, $previous); } From 1f4fc87fd995fd048fd8ea28d42709a7b0d2c4cb Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 23 Nov 2017 23:48:15 -0500 Subject: [PATCH 108/175] Use new HTTPExceptions in API --- include/api.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/api.php b/include/api.php index 50aa18c7e..a5e806384 100644 --- a/include/api.php +++ b/include/api.php @@ -12,11 +12,19 @@ use Friendica\Core\Config; use Friendica\Core\NotificationsManager; use Friendica\Core\Worker; use Friendica\Database\DBM; +use Friendica\Network\HTTPException; +use Friendica\Network\HTTPException\BadRequestException; +use Friendica\Network\HTTPException\ForbiddenException; +use Friendica\Network\HTTPException\InternalServerErrorException; +use Friendica\Network\HTTPException\MethodNotAllowedException; +use Friendica\Network\HTTPException\NotFoundException; +use Friendica\Network\HTTPException\NotImplementedException; +use Friendica\Network\HTTPException\UnauthorizedException; +use Friendica\Network\HTTPException\TooManyRequestsException; use Friendica\Object\Contact; use Friendica\Protocol\Diaspora; use Friendica\Util\XML; -require_once 'include/HTTPExceptions.php'; require_once 'include/bbcode.php'; require_once 'include/datetime.php'; require_once 'include/conversation.php'; From 9943393b71d844141fa39f739fa93042cf0b114e Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 23 Nov 2017 23:52:23 -0500 Subject: [PATCH 109/175] Remove include/HTTPExceptions.php --- include/HTTPExceptions.php | 105 ------------------------------------- 1 file changed, 105 deletions(-) delete mode 100644 include/HTTPExceptions.php diff --git a/include/HTTPExceptions.php b/include/HTTPExceptions.php deleted file mode 100644 index 8571c99de..000000000 --- a/include/HTTPExceptions.php +++ /dev/null @@ -1,105 +0,0 @@ -httpdesc=="") { - $this->httpdesc = preg_replace("|([a-z])([A-Z])|",'$1 $2', str_replace("Exception","",get_class($this))); - } - parent::__construct($message, $code, $previous); - } -} - -// 4xx -class TooManyRequestsException extends HTTPException { - var $httpcode = 429; -} - -class UnauthorizedException extends HTTPException { - var $httpcode = 401; -} - -class ForbiddenException extends HTTPException { - var $httpcode = 403; -} - -class NotFoundException extends HTTPException { - var $httpcode = 404; -} - -class GoneException extends HTTPException { - var $httpcode = 410; -} - -class MethodNotAllowedException extends HTTPException { - var $httpcode = 405; -} - -class NonAcceptableException extends HTTPException { - var $httpcode = 406; -} - -class LenghtRequiredException extends HTTPException { - var $httpcode = 411; -} - -class PreconditionFailedException extends HTTPException { - var $httpcode = 412; -} - -class UnsupportedMediaTypeException extends HTTPException { - var $httpcode = 415; -} - -class ExpetationFailesException extends HTTPException { - var $httpcode = 417; -} - -class ConflictException extends HTTPException { - var $httpcode = 409; -} - -class UnprocessableEntityException extends HTTPException { - var $httpcode = 422; -} - -class ImATeapotException extends HTTPException { - var $httpcode = 418; - var $httpdesc = "I'm A Teapot"; -} - -class BadRequestException extends HTTPException { - var $httpcode = 400; -} - -// 5xx - -class ServiceUnavaiableException extends HTTPException { - var $httpcode = 503; -} - -class BadGatewayException extends HTTPException { - var $httpcode = 502; -} - -class GatewayTimeoutException extends HTTPException { - var $httpcode = 504; -} - -class NotImplementedException extends HTTPException { - var $httpcode = 501; -} - -class InternalServerErrorException extends HTTPException { - var $httpcode = 500; -} - - - From 4a4be4d6649764ed0317cee59bd632c33ef01f0e Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 24 Nov 2017 07:44:02 +0000 Subject: [PATCH 110/175] Fix some SQL problems --- include/items.php | 2 +- src/Object/Contact.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/items.php b/include/items.php index b25191534..c2247277f 100644 --- a/include/items.php +++ b/include/items.php @@ -426,7 +426,7 @@ function uri_to_guid($uri, $host = "") { * @return array Item array with removed conversation data */ function store_conversation($arr) { - if (in_array($arr['network'], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) { + if (in_array($arr['network'], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS)) && !empty($arr['uri'])) { $conversation = array('item-uri' => $arr['uri'], 'received' => DBM::date()); if (isset($arr['parent-uri']) && ($arr['parent-uri'] != $arr['uri'])) { diff --git a/src/Object/Contact.php b/src/Object/Contact.php index fff82e600..4f0b237de 100644 --- a/src/Object/Contact.php +++ b/src/Object/Contact.php @@ -138,7 +138,7 @@ class Contact extends BaseObject */ public static function unmarkForArchival(array $contact) { - $condition = array('`id` => ? AND (`term-date` > ? OR `archive`)', $contact[`id`], NULL_DATE); + $condition = array('`id` = ? AND (`term-date` > ? OR `archive`)', $contact[`id`], NULL_DATE); $exists = dba::exists('contact', $condition); // We don't need to update, we never marked this contact for archival @@ -613,7 +613,7 @@ class Contact extends BaseObject 'readonly' => 0, 'pending' => 0) ); - $s = dba::select('contact', array('id'), array('nurl' => normalise_link($data["url"]), 'uid' => $uid), array('order' => 'id', 'limit' => 2)); + $s = dba::select('contact', array('id'), array('nurl' => normalise_link($data["url"]), 'uid' => $uid), array('order' => array('id'), 'limit' => 2)); $contacts = dba::inArray($s); if (!DBM::is_result($contacts)) { return 0; From d672f39930cea45e87222dce5e860bddfb8d92c5 Mon Sep 17 00:00:00 2001 From: hoergen Date: Fri, 24 Nov 2017 22:11:57 +0100 Subject: [PATCH 111/175] Bookmarklet for sharing links to friendica --- util/bookmarklet-share2friendica/README.md | 46 +++++++++++++++++++ .../bookmarklet-share2friendica.js | 1 + 2 files changed, 47 insertions(+) create mode 100644 util/bookmarklet-share2friendica/README.md create mode 100644 util/bookmarklet-share2friendica/bookmarklet-share2friendica.js diff --git a/util/bookmarklet-share2friendica/README.md b/util/bookmarklet-share2friendica/README.md new file mode 100644 index 000000000..013363072 --- /dev/null +++ b/util/bookmarklet-share2friendica/README.md @@ -0,0 +1,46 @@ +# Bookmarklet-share2friendica + +Javascript bookmarklet to share websites with your friendica account + +## Getting Started + +### Installing + +Open the file bookmarklet-share2friendica.js and change 'YourFriendicaDoomain.tld" with your friendica domain + +If you friendica is at https://myfriend.myfami.ly/ , the original ... +```javascript +javascript:(function(){f='https://YourFriendicaDomain.tld/bookmarklet/?url='+encodeURIC.... +``` +... has to be changed to ... + +```javascript +javascript:(function(){f='https://myfriend.myfami.ly/bookmarklet/?url='+encodeURIC.... +``` + +*Please copy the whole script, not only the part mentioned here!* + + +## Additional notes if it doesn't work + +* Make sure the site you want to share is allowed to run javascript. (enable it in your script blocker) +* Check the apostrophes that are used. Sometimes it is changed by the copy and paste process depending on the editor you are using, or if you copy it from a website. Correct it and it will work again. + + + +## Authors + +* **diaspora** - *Initial work* - [Share all teh internetz!](https://share.diasporafoundation.org/about.html) +* **hoergen** - *Adaptation to Friendica (2017)* - [hoergen.org](https://hoergen.org) + +## License + +This project is licensed under the same license like friendica + +## Acknowledgments + +* Hat tip to anyone who's code was used +* Hat tip to everyone who does everyday a little something ot make this world better +* Had tip but spent it + + diff --git a/util/bookmarklet-share2friendica/bookmarklet-share2friendica.js b/util/bookmarklet-share2friendica/bookmarklet-share2friendica.js new file mode 100644 index 000000000..584dee240 --- /dev/null +++ b/util/bookmarklet-share2friendica/bookmarklet-share2friendica.js @@ -0,0 +1 @@ +javascript:(function(){f='https://YourFriendicaDomain.tld/bookmarklet/?url='+encodeURIComponent(window.location.href)+'&title='+encodeURIComponent(document.title);a=function(){if(!window.open(f+'&jump=doclose','friendica','location=yes,links=no,scrollbars=no,toolbar=no,width=620,height=250'))location.href=f+'jump=yes'};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})() From 3046455b1cf1feefbaf5db332c042cdc4a45ee3a Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 24 Nov 2017 21:39:12 +0000 Subject: [PATCH 112/175] Some posts weren't shown --- include/conversation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 5e764e670..c95710722 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1536,8 +1536,8 @@ function conv_sort(array $item_list, $order) */ foreach ($parents as $i => $parent) { $parents[$i]['children'] = - get_item_children($item_array, $parent, $thread_allowed) - + get_item_children($item_array, $parent, false); + array_merge(get_item_children($item_array, $parent, $thread_allowed), + get_item_children($item_array, $parent, false)); } foreach ($parents as $i => $parent) { From abc0b90fa9199b570c68a470eea44acf62655e2d Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 24 Nov 2017 22:15:35 +0000 Subject: [PATCH 113/175] getpostsbyurl hadn't worked --- src/Object/Contact.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Object/Contact.php b/src/Object/Contact.php index 4f0b237de..d7e785362 100644 --- a/src/Object/Contact.php +++ b/src/Object/Contact.php @@ -734,6 +734,8 @@ class Contact extends BaseObject */ public static function getPostsFromUrl($contact_url) { + $a = self::getApp(); + require_once 'include/conversation.php'; // There are no posts with "uid = 0" with connector networks @@ -759,7 +761,6 @@ class Contact extends BaseObject " ORDER BY `item`.`created` DESC LIMIT %d, %d", intval($author_id), intval(local_user()), intval($a->pager['start']), intval($a->pager['itemspage']) ); - $a = self::getApp(); $o = conversation($a, $r, 'community', false); From d7f0c08bce12d09bbf4c4ade2fe9768ae554fd80 Mon Sep 17 00:00:00 2001 From: hoergen Date: Sat, 25 Nov 2017 01:49:18 +0100 Subject: [PATCH 114/175] Added Description for creating a bookmark --- util/bookmarklet-share2friendica/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/util/bookmarklet-share2friendica/README.md b/util/bookmarklet-share2friendica/README.md index 013363072..ad30baa9d 100644 --- a/util/bookmarklet-share2friendica/README.md +++ b/util/bookmarklet-share2friendica/README.md @@ -20,6 +20,7 @@ javascript:(function(){f='https://myfriend.myfami.ly/bookmarklet/?url='+encodeUR *Please copy the whole script, not only the part mentioned here!* +Then create a new bookmark, give it a name like "share2Friendica" and paste the script in the address field. Save it. Now you can click on that bookmarklet every time you want to share a website, you are currently reading. A new small window will open where title is prefilled and the website you want to share is put as attachement in the body of the new post. ## Additional notes if it doesn't work From 4ddcc77c775e42aab3bb0df3fa2942c6da345db9 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 25 Nov 2017 10:07:49 +0000 Subject: [PATCH 115/175] Always show small preview pictures, not the big ones --- doc/htconfig.md | 1 + include/items.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/htconfig.md b/doc/htconfig.md index 9e0a2184d..3f5b28b91 100644 --- a/doc/htconfig.md +++ b/doc/htconfig.md @@ -23,6 +23,7 @@ Example: To set the directory value please add this line to your .htconfig.php: ## system ## * **allowed_link_protocols** (Array) - Allowed protocols in links URLs, add at your own risk. http is always allowed. +* **always_show_preview** (Boolean) - Only show small preview picures. Default value is false. * **birthday_input_format** - Default value is "ymd". * **block_local_dir** (Boolean) - Blocks the access to the directory of the local users. * **auth_cookie_lifetime** (Integer) - Number of days that should pass without any activity before a user who chose "Remember me" when logging in is considered logged out. Defaults to 7. diff --git a/include/items.php b/include/items.php index c2247277f..cffa12728 100644 --- a/include/items.php +++ b/include/items.php @@ -207,7 +207,8 @@ function add_page_info_data($data) { $preview = str_replace(array("[", "]"), array("[", "]"), htmlentities($data["images"][0]["src"], ENT_QUOTES, 'UTF-8', false)); // if the preview picture is larger than 500 pixels then show it in a larger mode // But only, if the picture isn't higher than large (To prevent huge posts) - if (($data["images"][0]["width"] >= 500) && ($data["images"][0]["width"] >= $data["images"][0]["height"])) { + if (!Config::get('system', 'always_show_preview') && ($data["images"][0]["width"] >= 500) + && ($data["images"][0]["width"] >= $data["images"][0]["height"])) { $text .= " image='".$preview."'"; } else { $text .= " preview='".$preview."'"; From 3cb906c420579617e742f6bd1d22cda748893443 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 25 Nov 2017 11:59:20 +0000 Subject: [PATCH 116/175] Issue 3911: Fetch keywords for feeds --- include/feed.php | 5 ++++- mod/contacts.php | 2 +- view/templates/contact_edit.tpl | 3 +-- view/theme/frio/templates/contact_edit.tpl | 2 +- view/theme/vier/templates/contact_edit.tpl | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/feed.php b/include/feed.php index 22deff535..0be6a5781 100644 --- a/include/feed.php +++ b/include/feed.php @@ -344,7 +344,7 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) { $item["title"] = ''; } - if ($contact["fetch_further_information"]) { + if (!empty($contact["fetch_further_information"]) && ($contact["fetch_further_information"] < 3)) { $preview = ""; // Handle enclosures and treat them as preview picture @@ -384,6 +384,9 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) { if (!strstr($item["body"], '[url') && ($item['plink'] != '')) { $item["body"] .= "[hr][url]".$item['plink']."[/url]"; } + if ($contact["fetch_further_information"] == 3) { + $item["tag"] = add_page_keywords($item["plink"], false, $preview, true, $contact["ffi_keyword_blacklist"]); + } } if (!$simulate) { diff --git a/mod/contacts.php b/mod/contacts.php index 1859c2aa6..d294f6518 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -577,7 +577,7 @@ function contacts_content(App $a) { if ($contact['network'] == NETWORK_FEED) { $fetch_further_information = array('fetch_further_information', t('Fetch further information for feeds'), $contact['fetch_further_information'], t('Fetch further information for feeds'), - array('0'=>t('Disabled'), '1'=>t('Fetch information'), '2'=>t('Fetch information and keywords'))); + array('0' => t('Disabled'), '1' => t('Fetch information'), '3' => t('Fetch keywords'), '2' => t('Fetch information and keywords'))); } if (in_array($contact['network'], array(NETWORK_FEED, NETWORK_MAIL, NETWORK_MAIL2))) $poll_interval = contact_poll_interval($contact['priority'],(! $poll_enabled)); diff --git a/view/templates/contact_edit.tpl b/view/templates/contact_edit.tpl index bad1b63c3..449316189 100644 --- a/view/templates/contact_edit.tpl +++ b/view/templates/contact_edit.tpl @@ -1,4 +1,3 @@ -
{{* Insert Tab-Nav *}} @@ -71,7 +70,7 @@ {{include file="field_checkbox.tpl" field=$notify}} {{if $fetch_further_information}} {{include file="field_select.tpl" field=$fetch_further_information}} - {{if $fetch_further_information.2 == 2 }} {{include file="field_textarea.tpl" field=$ffi_keyword_blacklist}} {{/if}} + {{if $fetch_further_information.2 == 2 || $fetch_further_information.2 == 3}} {{include file="field_textarea.tpl" field=$ffi_keyword_blacklist}} {{/if}} {{/if}} {{include file="field_checkbox.tpl" field=$hidden}} diff --git a/view/theme/frio/templates/contact_edit.tpl b/view/theme/frio/templates/contact_edit.tpl index 540aebef5..52f3fc545 100644 --- a/view/theme/frio/templates/contact_edit.tpl +++ b/view/theme/frio/templates/contact_edit.tpl @@ -134,7 +134,7 @@ {{include file="field_checkbox.tpl" field=$notify}} {{if $fetch_further_information}} {{include file="field_select.tpl" field=$fetch_further_information}} - {{if $fetch_further_information.2 == 2 }} {{include file="field_textarea.tpl" field=$ffi_keyword_blacklist}} {{/if}} + {{if $fetch_further_information.2 == 2 || $fetch_further_information.2 == 3}} {{include file="field_textarea.tpl" field=$ffi_keyword_blacklist}} {{/if}} {{/if}} {{include file="field_checkbox.tpl" field=$hidden}} diff --git a/view/theme/vier/templates/contact_edit.tpl b/view/theme/vier/templates/contact_edit.tpl index f4f85d611..9dc11a31c 100644 --- a/view/theme/vier/templates/contact_edit.tpl +++ b/view/theme/vier/templates/contact_edit.tpl @@ -71,7 +71,7 @@ {{include file="field_checkbox.tpl" field=$notify}} {{if $fetch_further_information}} {{include file="field_select.tpl" field=$fetch_further_information}} - {{if $fetch_further_information.2 == 2 }} {{include file="field_textarea.tpl" field=$ffi_keyword_blacklist}} {{/if}} + {{if $fetch_further_information.2 == 2 || $fetch_further_information.2 == 3}} {{include file="field_textarea.tpl" field=$ffi_keyword_blacklist}} {{/if}} {{/if}} {{include file="field_checkbox.tpl" field=$hidden}} From 8c2b678aaa3811af6b9ab086e5066a4dda6ff984 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 25 Nov 2017 15:16:55 +0100 Subject: [PATCH 117/175] silence accounts from global community page --- util/global_community_silence.php | 61 +++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100755 util/global_community_silence.php diff --git a/util/global_community_silence.php b/util/global_community_silence.php new file mode 100755 index 000000000..b25c2af22 --- /dev/null +++ b/util/global_community_silence.php @@ -0,0 +1,61 @@ +#!/usr/bin/env php + util/global_community_silence.php http://example.com/profile/bob + * + * will silence bob@example.com so that his postings wont appear at + * the global community page. + * + * Author: Tobias Diekershoff + * + * License: AGPLv3 or later, same as Friendica + **/ + +if ($argc!=2 || $argv[1]=="-h" || $argv[1]=="--help" || $argv[1]=="-?") { + echo "Usage: ".$argv[0]." [-h|profile_url]\r\n"; + echo " -h, -?, --help ... show this help\r\n"; + echo " profile_url ...... The URL of the profile you want to silence\r\n"; + echo "\r\n"; + echo "Example: Silence bob@example.com\r\n"; + echo "$> ".$argv[0]." https://exaple.com/profiles/bob\r\n"; + echo "\r\n"; + exit(0); +} + +use Friendica\Database\DBM; +require_once("boot.php"); +require_once('include/dba.php'); +require_once("include/text.php"); +$a = get_app(); +require_once ".htconfig.php"; + +dba::connect($db_host, $db_user, $db_pass, $db_data); +unset($db_host, $db_user, $db_pass, $db_data); + +/** + * 1. make nurl from last parameter + * 2. check DB (contact) if there is a contact with uid=0 and that nurl, get the ID + * 3. set the flag hidden=1 for the contact entry with the found ID + **/ + +$nurl = normalise_link($argv[1]); +$r = dba::select("contact", array("id"), array("nurl" => $nurl, "uid" => 0), array("limit"=> 1)); +if (DBM::is_result($r)) { + dba::update("contact", array("hidden"=>1), array("id"=>$r["id"])); + echo "NOTICE: The account should be silenced from the global community page\r\n"; +} else { + echo "NOTICE: Could not find any entry for this URL (".$nurl.")\r\n"; +} + +?> From 1adff81a251141df401108bc2f86654dfa5d33c8 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 25 Nov 2017 14:43:28 +0000 Subject: [PATCH 118/175] Documentation for "fetch further information" --- mod/contacts.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mod/contacts.php b/mod/contacts.php index d294f6518..8889e6513 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -576,8 +576,14 @@ function contacts_content(App $a) { $lost_contact = (($contact['archive'] && $contact['term-date'] > NULL_DATE && $contact['term-date'] < datetime_convert('','','now')) ? t('Communications lost with this contact!') : ''); if ($contact['network'] == NETWORK_FEED) { - $fetch_further_information = array('fetch_further_information', t('Fetch further information for feeds'), $contact['fetch_further_information'], t('Fetch further information for feeds'), - array('0' => t('Disabled'), '1' => t('Fetch information'), '3' => t('Fetch keywords'), '2' => t('Fetch information and keywords'))); + $fetch_further_information = array('fetch_further_information', + t('Fetch further information for feeds'), + $contact['fetch_further_information'], + t("Fetch information like preview pictures, title and teaser from the feed item. You can activate this if the feed doesn't contain much text. Keywords are taken from the meta header in the feed item and are posted as hash tags."), + array('0' => t('Disabled'), + '1' => t('Fetch information'), + '3' => t('Fetch keywords'), + '2' => t('Fetch information and keywords'))); } if (in_array($contact['network'], array(NETWORK_FEED, NETWORK_MAIL, NETWORK_MAIL2))) $poll_interval = contact_poll_interval($contact['priority'],(! $poll_enabled)); From 9f0e8cffbabee81adc9ab345068c4507e3ddd700 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 25 Nov 2017 16:25:53 +0100 Subject: [PATCH 119/175] use all profile formats, typos --- util/global_community_silence.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/util/global_community_silence.php b/util/global_community_silence.php index b25c2af22..d18efd345 100755 --- a/util/global_community_silence.php +++ b/util/global_community_silence.php @@ -28,12 +28,14 @@ if ($argc!=2 || $argv[1]=="-h" || $argv[1]=="--help" || $argv[1]=="-?") { echo " profile_url ...... The URL of the profile you want to silence\r\n"; echo "\r\n"; echo "Example: Silence bob@example.com\r\n"; - echo "$> ".$argv[0]." https://exaple.com/profiles/bob\r\n"; + echo "$> ".$argv[0]." https://example.com/profiles/bob\r\n"; echo "\r\n"; exit(0); } use Friendica\Database\DBM; +use Friendica\Network\Probe; + require_once("boot.php"); require_once('include/dba.php'); require_once("include/text.php"); @@ -48,11 +50,16 @@ unset($db_host, $db_user, $db_pass, $db_data); * 2. check DB (contact) if there is a contact with uid=0 and that nurl, get the ID * 3. set the flag hidden=1 for the contact entry with the found ID **/ - -$nurl = normalise_link($argv[1]); -$r = dba::select("contact", array("id"), array("nurl" => $nurl, "uid" => 0), array("limit"=> 1)); +$net = Probe::uri($argv[1]); +if (in_array($net['network'], array(NETWORK_PHANTOM, NETWORK_MAIL))) { + echo "This account seems not to exist."; + echo "\r\n"; + exit(1); +} +$nurl = normalise_link($net['url']); +$r = dba::select("contact", array("id"), array("nurl" => $nurl, "uid" => 0), array("limit" => 1)); if (DBM::is_result($r)) { - dba::update("contact", array("hidden"=>1), array("id"=>$r["id"])); + dba::update("contact", array("hidden" => true), array("id" => $r["id"])); echo "NOTICE: The account should be silenced from the global community page\r\n"; } else { echo "NOTICE: Could not find any entry for this URL (".$nurl.")\r\n"; From 2d65eae2f5354912f4e6ff92c739ae96f7fbdc1a Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 25 Nov 2017 16:40:03 +0100 Subject: [PATCH 120/175] Script to block an account from the node --- util/global_community_block.php | 65 +++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100755 util/global_community_block.php diff --git a/util/global_community_block.php b/util/global_community_block.php new file mode 100755 index 000000000..705054bb7 --- /dev/null +++ b/util/global_community_block.php @@ -0,0 +1,65 @@ +#!/usr/bin/env php + util/global_community_block.php http://example.com/profile/bob + * + * will block bob@example.com. + * + * Author: Tobias Diekershoff + * + * License: AGPLv3 or later, same as Friendica + **/ + +if ($argc!=2 || $argv[1]=="-h" || $argv[1]=="--help" || $argv[1]=="-?") { + echo "Usage: ".$argv[0]." [-h|profile_url]\r\n"; + echo " -h, -?, --help ... show this help\r\n"; + echo " profile_url ...... The URL of the profile you want to silence\r\n"; + echo "\r\n"; + echo "Example: block bob@example.com\r\n"; + echo "$> ".$argv[0]." https://example.com/profiles/bob\r\n"; + echo "\r\n"; + exit(0); +} + +use Friendica\Database\DBM; +use Friendica\Network\Probe; + +require_once("boot.php"); +require_once('include/dba.php'); +require_once("include/text.php"); +$a = get_app(); +require_once ".htconfig.php"; + +dba::connect($db_host, $db_user, $db_pass, $db_data); +unset($db_host, $db_user, $db_pass, $db_data); + +/** + * 1. make nurl from last parameter + * 2. check DB (contact) if there is a contact with uid=0 and that nurl, get the ID + * 3. set the flag hidden=1 for the contact entry with the found ID + **/ +$net = Probe::uri($argv[1]); +if (in_array($net['network'], array(NETWORK_PHANTOM, NETWORK_MAIL))) { + echo "This account seems not to exist."; + echo "\r\n"; + exit(1); +} +$nurl = normalise_link($net['url']); +$r = dba::select("contact", array("id"), array("nurl" => $nurl, "uid" => 0), array("limit" => 1)); +if (DBM::is_result($r)) { + dba::update("contact", array("blocked" => true), array("id" => $r["id"])); + echo "NOTICE: The account should be blocked from the node now\r\n"; +} else { + echo "NOTICE: Could not find any entry for this URL (".$nurl.")\r\n"; +} + +?> From d9185540a5462207d0256a4c879e3a98809dda23 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 25 Nov 2017 16:45:20 +0100 Subject: [PATCH 121/175] some minor stuff --- util/global_community_block.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/global_community_block.php b/util/global_community_block.php index 705054bb7..a0f8ec223 100755 --- a/util/global_community_block.php +++ b/util/global_community_block.php @@ -19,7 +19,7 @@ * License: AGPLv3 or later, same as Friendica **/ -if ($argc!=2 || $argv[1]=="-h" || $argv[1]=="--help" || $argv[1]=="-?") { +if ($argc != 2 || $argv[1] == "-h" || $argv[1] == "--help" || $argv[1] == "-?") { echo "Usage: ".$argv[0]." [-h|profile_url]\r\n"; echo " -h, -?, --help ... show this help\r\n"; echo " profile_url ...... The URL of the profile you want to silence\r\n"; @@ -33,11 +33,11 @@ if ($argc!=2 || $argv[1]=="-h" || $argv[1]=="--help" || $argv[1]=="-?") { use Friendica\Database\DBM; use Friendica\Network\Probe; -require_once("boot.php"); +require_once('boot.php'); require_once('include/dba.php'); -require_once("include/text.php"); +require_once('include/text.php'); $a = get_app(); -require_once ".htconfig.php"; +require_once('.htconfig.php'); dba::connect($db_host, $db_user, $db_pass, $db_data); unset($db_host, $db_user, $db_pass, $db_data); From 32d71dbfccd90ad37cd49162acf26703402ab440 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 25 Nov 2017 16:55:58 +0100 Subject: [PATCH 122/175] update to the silence script --- util/global_community_silence.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/util/global_community_silence.php b/util/global_community_silence.php index d18efd345..221a3f355 100755 --- a/util/global_community_silence.php +++ b/util/global_community_silence.php @@ -5,16 +5,16 @@ * @brief tool to silence accounts on the global community page * * With this tool, you can silence an account on the global community page. - * Postings from silenced accounts will not be displayes on the community + * Postings from silenced accounts will not be displayed on the community * page. This silencing does only affect the display on the community page, * accounts following the silenced accounts will still get their postings. * - * Usage: pass the URL of the to be silenced account as only parameter + * Usage: pass the URL of the profile to be silenced account as only parameter * at the command line when running this tool. E.g. * * $> util/global_community_silence.php http://example.com/profile/bob * - * will silence bob@example.com so that his postings wont appear at + * will silence bob@example.com so that his postings won't appear at * the global community page. * * Author: Tobias Diekershoff @@ -22,7 +22,7 @@ * License: AGPLv3 or later, same as Friendica **/ -if ($argc!=2 || $argv[1]=="-h" || $argv[1]=="--help" || $argv[1]=="-?") { +if ($argc != 2 || $argv[1] == "-h" || $argv[1] == "--help" || $argv[1] == "-?") { echo "Usage: ".$argv[0]." [-h|profile_url]\r\n"; echo " -h, -?, --help ... show this help\r\n"; echo " profile_url ...... The URL of the profile you want to silence\r\n"; @@ -36,11 +36,11 @@ if ($argc!=2 || $argv[1]=="-h" || $argv[1]=="--help" || $argv[1]=="-?") { use Friendica\Database\DBM; use Friendica\Network\Probe; -require_once("boot.php"); +require_once'"boot.php'); require_once('include/dba.php'); -require_once("include/text.php"); +require_once('include/text.php'); $a = get_app(); -require_once ".htconfig.php"; +require_once('.htconfig.php'); dba::connect($db_host, $db_user, $db_pass, $db_data); unset($db_host, $db_user, $db_pass, $db_data); From ba184f903888c362e99ddfb2defdcb4490a1f8a6 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 25 Nov 2017 16:00:51 +0000 Subject: [PATCH 123/175] Show the preview picture even if the posting contains the huge image --- include/bbcode.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/bbcode.php b/include/bbcode.php index 83ea3fcfa..196c3ca3c 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -52,7 +52,10 @@ function bb_attachment($Text, $simplehtml = false, $tryoembed = true) { $data["title"] = str_replace(array("http://", "https://"), "", $data["title"]); } - if (((strpos($data["text"], "[img=") !== false) || (strpos($data["text"], "[img]") !== false)) && ($data["image"] != "")) { + if (((strpos($data["text"], "[img=") !== false) + || (strpos($data["text"], "[img]") !== false) + || Config::get('system', 'always_show_preview')) + && ($data["image"] != "")) { $data["preview"] = $data["image"]; $data["image"] = ""; } From 8a91e631cf6aa0663b789e81e6c4c077e011419b Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 25 Nov 2017 17:02:42 +0100 Subject: [PATCH 124/175] some more minor stuff --- util/global_community_block.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/util/global_community_block.php b/util/global_community_block.php index a0f8ec223..cb6789e45 100755 --- a/util/global_community_block.php +++ b/util/global_community_block.php @@ -33,11 +33,11 @@ if ($argc != 2 || $argv[1] == "-h" || $argv[1] == "--help" || $argv[1] == "-?") use Friendica\Database\DBM; use Friendica\Network\Probe; -require_once('boot.php'); -require_once('include/dba.php'); -require_once('include/text.php'); +require_once 'boot.php'; +require_once 'include/dba.php'; +require_once 'include/text.php'; $a = get_app(); -require_once('.htconfig.php'); +require_once '.htconfig.php'; dba::connect($db_host, $db_user, $db_pass, $db_data); unset($db_host, $db_user, $db_pass, $db_data); @@ -49,14 +49,14 @@ unset($db_host, $db_user, $db_pass, $db_data); **/ $net = Probe::uri($argv[1]); if (in_array($net['network'], array(NETWORK_PHANTOM, NETWORK_MAIL))) { - echo "This account seems not to exist."; + echo 'This account seems not to exist.'; echo "\r\n"; exit(1); } $nurl = normalise_link($net['url']); -$r = dba::select("contact", array("id"), array("nurl" => $nurl, "uid" => 0), array("limit" => 1)); +$r = dba::select('contact', array('id'), array('nurl' => $nurl, 'uid' => 0), array('limit' => 1)); if (DBM::is_result($r)) { - dba::update("contact", array("blocked" => true), array("id" => $r["id"])); + dba::update('contact', array('blocked' => true), array('id' => $r['id'])); echo "NOTICE: The account should be blocked from the node now\r\n"; } else { echo "NOTICE: Could not find any entry for this URL (".$nurl.")\r\n"; From 2d61aaf118efcaae102d201ccfd4062490b0a49b Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 25 Nov 2017 17:05:27 +0100 Subject: [PATCH 125/175] some minor stuff --- util/global_community_silence.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/global_community_silence.php b/util/global_community_silence.php index 221a3f355..b90ea10ea 100755 --- a/util/global_community_silence.php +++ b/util/global_community_silence.php @@ -36,11 +36,11 @@ if ($argc != 2 || $argv[1] == "-h" || $argv[1] == "--help" || $argv[1] == "-?") use Friendica\Database\DBM; use Friendica\Network\Probe; -require_once'"boot.php'); -require_once('include/dba.php'); -require_once('include/text.php'); +require_once 'boot.php'; +require_once 'include/dba.php'; +require_once 'include/text.php'; $a = get_app(); -require_once('.htconfig.php'); +require_once'.htconfig.php'; dba::connect($db_host, $db_user, $db_pass, $db_data); unset($db_host, $db_user, $db_pass, $db_data); From 2ac797be8e0ba3f1daf19415b73d64e35a37c608 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 25 Nov 2017 17:10:29 +0100 Subject: [PATCH 126/175] let there be SPACE --- util/global_community_silence.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/global_community_silence.php b/util/global_community_silence.php index b90ea10ea..e6c936f0d 100755 --- a/util/global_community_silence.php +++ b/util/global_community_silence.php @@ -40,7 +40,7 @@ require_once 'boot.php'; require_once 'include/dba.php'; require_once 'include/text.php'; $a = get_app(); -require_once'.htconfig.php'; +require_once '.htconfig.php'; dba::connect($db_host, $db_user, $db_pass, $db_data); unset($db_host, $db_user, $db_pass, $db_data); From 21a3a6f45b2cb7573e0f2013d179bddd254a526d Mon Sep 17 00:00:00 2001 From: Silke Meyer Date: Sat, 25 Nov 2017 17:26:36 +0100 Subject: [PATCH 127/175] Markdown formatting and minor changes --- doc/SSL.md | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/doc/SSL.md b/doc/SSL.md index 95de83305..9d2bee775 100644 --- a/doc/SSL.md +++ b/doc/SSL.md @@ -69,30 +69,28 @@ If you can successfully access your Friendica instance through https, there are This is the simplest way to enforce site-wide secure access. Every time a user tries to access any Friendica page by any mean (manual address bar entry or link), the web server issues a Permanent Redirect response with the secure protocol prepended to the requested URL. -With Apache, simply add the following lines to the [code].htaccess[/code] file in the root folder of your Friendica instance (thanks to [url=https://github.com/AlfredSK]AlfredSK[/url]): +With Apache, enable the modules rewrite and ssl (with a shared hosting provider, this should be enabled already): -[code] -#Force SSL connections + sudo a2enmod rewrite ssl -RewriteEngine On -RewriteCond %{SERVER_PORT} 80 -RewriteRule ^(.*)$ https://your.friendica.domain/$1 [R=301,L] -[/code] +Add the following lines to the .htaccess file in the root folder of your Friendica instance (thanks to [url=https://github.com/AlfredSK]AlfredSK[/url]): -With nginx, configure your [code]server[/code] directive this way (thanks to [url=https://bjornjohansen.no/redirect-to-https-with-nginx/]Bjørn Johansen[/url]): + RewriteEngine On + RewriteCond %{SERVER_PORT} 80 + RewriteRule ^(.*)$ https://your.friendica.domain/$1 [R=301,L] -[code] -server { - listen 80; - listen [::]:80; - server_name your.friendica.domain; - return 301 https://$server_name$request_uri; -} -[/code] +With nginx, configure your server directive this way ([documentation](https://www.nginx.com/blog/creating-nginx-rewrite-rules/)): + + server { + listen 80; + server_name your.friendica.domain; + return 301 https://$server_name$request_uri; + } ### SSL Settings In the Admin Settings, there are three SSL-related settings: -- **SSL link policy**: this affects how Friendica generates internal links. If your SSL installation was successful, we recommend "Force all links to SSL" just in case your web server configuration can't be altered like described above. -- **Force SSL**: This forces all external links to HTTPS, which may solve Mixed-Content issues, but not all websites support HTTPS yet. Use at your own risk. -- **Verify SSL**: Enabling this will prevent Friendica to interact with self-signed SSL sites. We recommend you leave it on as a self-signed SSL certificate can be a vectorfor a man-in-the-middle attack. \ No newline at end of file + +1. **SSL link policy**: this affects how Friendica generates internal links. If your SSL installation was successful, we recommend "Force all links to SSL" just in case your web server configuration can't be altered like described above. +2. **Force SSL**: This forces all external links to HTTPS, which may solve Mixed-Content issues, but not all websites support HTTPS yet. Use at your own risk. +3. **Verify SSL**: Enabling this will prevent Friendica to interact with self-signed SSL sites. We recommend you leave it on as a self-signed SSL certificate can be a vectorfor a man-in-the-middle attack. From 9bb1be91d9817cddce17e61dc0e41709196808ee Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 25 Nov 2017 21:43:36 +0100 Subject: [PATCH 128/175] updated links to Friendiqa --- doc/FAQ.md | 2 +- doc/de/FAQ.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/FAQ.md b/doc/FAQ.md index 22adba54b..32c5f74cd 100644 --- a/doc/FAQ.md +++ b/doc/FAQ.md @@ -157,7 +157,7 @@ Friendica is using a [Twitter/GNU Social compatible API](help/api), which means Here is a list of known working clients: * Android - * [Friendiqa](https://github.com/lubuwest/friendiqa) (you can find the APK file in the listed files in the repository) + * [Friendiqa](https://github.com/lubuwest/friendiqa) (available in Google Playstore or from a binary repository you can add to [F-Droid](https://freunde.ma-nic.de/display/3e98eba8185a13c5bdbf3d1539646854)) * AndStatus * Twidere * Mustard and Mustard-Mod diff --git a/doc/de/FAQ.md b/doc/de/FAQ.md index 3507efc5a..2464ec1e0 100644 --- a/doc/de/FAQ.md +++ b/doc/de/FAQ.md @@ -171,7 +171,7 @@ Das bedeutet, dass du jeden Twitter/GNU Social Client verwenden kannst in dem du Hier ist eine Liste von Clients bei denen dies möglich ist, bzw. die speziell für Friendica entwickelt werden: * Android - * [Friendiqa](https://github.com/lubuwest/friendiqa) (ydie APK Datei findest du in den gelisteten Dateien im Repository) + * [Friendiqa](https://github.com/lubuwest/friendiqa) (Gibt es im Google Playstore oder als [binary Repository](https://freunde.ma-nic.de/display/3e98eba8185a13c5bdbf3d1539646854) für F-Droid) * AndStatus * Twidere * Mustard and Mustard-Mod From 5c7694d00e130d4ced55d708fb0f90d51717a2f2 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 25 Nov 2017 21:57:19 +0100 Subject: [PATCH 129/175] export cal is now in core --- doc/events.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/events.md b/doc/events.md index 63944964f..eb6b77d33 100644 --- a/doc/events.md +++ b/doc/events.md @@ -62,6 +62,11 @@ Additionally it will be added to their calendar and thus be shown in their event Recipients of the event-posting can comment or dis-/like the event, as with a regular posting. Furthermore they can announce that they will attend, not attend or may-be attend the event with a single click. +### Calendar Export + +If you want to export your public events to ical or csv, you can activate an additional feature in your user settings (Additional features -> General Features -> Export Public Calendar). +Afterwards a link will be shown in the events page of your profile to access the calendar. + ### Addons #### OpenStreetMap @@ -69,7 +74,3 @@ Furthermore they can announce that they will attend, not attend or may-be attend If this addon is activated on your friendica node, the content of the location field will be matched with the identification service of OSM when you submit the event. Should OSM find anything matching, a map for the location will be embedded automatically at the end of the events view. -#### Calendar Export - -If this addon is activated the public events you have created will be published in ical or csv file. -The URL of the published file is ``example.com/cal/nickname/export/format`` (where format is either ical of csv). From add6f85cdf5400548504b02ac23b379422b31a44 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 25 Nov 2017 22:57:00 +0100 Subject: [PATCH 130/175] added German translation to the events documentation, THX Ratten --- doc/de/events.md | 66 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 doc/de/events.md diff --git a/doc/de/events.md b/doc/de/events.md new file mode 100644 index 000000000..4da36a746 --- /dev/null +++ b/doc/de/events.md @@ -0,0 +1,66 @@ +# Veranstaltungen + +* [Home](Zur Startseite der Hilfe) + +Veranstaltungen sind spezielle Postings. +Die Veranstaltungen, die Du und deine Kontakte teilen, können unter [/events](/events) auf deiner Instanz aufgefunden werden. +Um da hinzukommen gehe über den Tab "Veranstalltungen", abhänig von dem Theme, das du benutzt, ist der eventuell ein zusätzlicher link im Navigationsmenü der Seite vorhanden. + + +## Veranstaltungsübersicht + +Die Übersichtsseite zeigt den Kalender des aktuellen Monats an, plus einige Tage am Beginn und am Ende. +Angezeit werden alle Veranstalltungen des aktuellen Monats, die von dir angelegt wurden oder die von deinen Kontakten geteilt wurden. +Dies beinhaltet auch Geburstagserinnerungen, welche mit dir geteilt wurden. + +Es gibt Buttons mit denen die Ansicht zwischen Monatlich/Wöchentlich und Täglich wechseln kann. +Um eine neue Veranstaltung anzulegen, kannst du dem Link "Veranstaltung erstellen" folgen oder einen Doppel-Klick in das Kalenderfeld, in dem die Veranstalltung stehen soll, machen. +Mit einem Klick auf eine bereits existierende Veranstalltung, öffnet sich ein Pop-up Fenster, welches dir die Veranstaltung anzeigt. + +## Erstelle eine neue Veranstaltung + +Folge einer der oben beschriebenen Methoden, dann erreichst du das Formular um die Veranstaltungsdaten einzutragen. Felder mit *** müsen ausgefüllt werden. + +* **Veranstaltungsbeginn**: trage den Anfang der Veranstaltung ein. +* **Veranstaltungsende**: trage das Ende der Veranstaltung ein. + +Wenn du in eines dieser Felder klickst, wird sich ein Popup Fesnster öffnen, wo du Tag und Uhrzeit eintragen kannst. +Wenn du einen Doppel-Klick auf die Box im Kalender machst, werden diese Felder automatisch ausgefüllt. +Das Veranstaltungsende muss nach dem Veranstaltungsanfang liegen. +Aber du musst es nicht angeben. Wenn eine Veranstaltung ein offenes Ende hat oder das Veranstaltungsende nicht wichtig ist, klicke in die Box zwei Felder darunter. + +* **An Zeitzone des Betrachters anpassen**: Wenn du die Box anklickst, wird die Anfangs und Endzeit der Veranstaltung automatisch an die lokale Zeitzone, wie in den Zeitzonen-Einstellung angepasst. + +Dies vermeidet verfrühte Geburstagsglückwünsche, oder die Beführchtung, das du den Geburstag deines Freundes auf der anderen Seite der Welt vergisst und ähnliche Ereignisse. + +* **Titel**: Titel der Veranstaltung +* **Beschreibung**: eine längere Beschreibung der Veranstaltung +* **Ort**: Ort, wo die Veranstaltung stattfinden wird + +Diese 3 Felder beschreiben deine Veranstaltung. +Im Beschreibungs- und Orts-Feld kannst du BBCode zum formatieren des Textes verwenden. + +* **Veranstaltung teilen**: wenn diese Box aktiviert wird, kannst du in der ACL auswählen mit wem du diese Veranstaltung teilen willst. Dies funktioniert wie die Kontrolle jedes anderen Postings. + +Wenn du Veranstaltungen teilst, werden diese auf deine Pinnwand gepostet mit den Zugriffsberechtigungen, die du ausgewählt hast. Bevor du das machst, kannst du dir die Veranstaltung als Vorschau in einem Popup-Fenster anzeigen lassen. + +### Interaktionen mit Veranstaltungen + +Wenn du eine Veranstaltung veröffendlichst, kannst du auswählen, wer sie bekommen wird, wie bei einem normalen Posting. +Die Empfänger sehen deine Veranstaltung in einem Posting in ihrem Network-Stream. +Zusätzlich wird die Veranstaltung zu ihrem Kalender hinzugefügt und somit in ihrer Veranstaltungsübersicht angezeigt. + +Empfänger von einem Veranstaltungs-Posting, können dies kommentieren oder dis-/liken, wie bei einem normalen Posting. +Zusätzlich können sie sagen ob sie teilnehmen, oder vielleicht teilnehmen an der Veranstaltung mit einem einzigen Klick. + +### Kalender exportieren + +Wenn du deine öffentlichen Kalender Einträge exportieren möchtest, kannst du dies in den Einstellungen aktivieren (Einstellungen -> Zusätzliche Features -> Allgemeine Features -> Öffentlichen Kalender exportieren). +Im Anschluss sind auf der Veranstaltungs-Übersichtsseite zwei Links zu den exportierten Einträgen (im ical oder csv Format) verfügbar. + +### Addons + +#### OpenStreetMap + +Wenn du diese Addon aktivierst auf deinem Frendica-Knoten, wird der Inhalt des Ort-Feldes mit den Identifikations-Service von OpenStreetMap verbunden, wenn du die Veranstaltung postest. +Wenn Openstreetmap etwas passendes findet, wird eine Karte mit dem Ort automatisch eingebettet, am Ende der Veranstalltungsanzeige. From 2236f60cfa5814f74719ecb2641130cb32e6aa36 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 25 Nov 2017 18:05:32 -0500 Subject: [PATCH 131/175] Add new legacy password field --- boot.php | 2 +- include/dbstructure.php | 1 + update.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/boot.php b/boot.php index 9cdaefb21..5ee4d5f4a 100644 --- a/boot.php +++ b/boot.php @@ -45,7 +45,7 @@ define('FRIENDICA_PLATFORM', 'Friendica'); define('FRIENDICA_CODENAME', 'Asparagus'); define('FRIENDICA_VERSION', '3.6-dev'); define('DFRN_PROTOCOL_VERSION', '2.23'); -define('DB_UPDATE_VERSION', 1235); +define('DB_UPDATE_VERSION', 1236); /** * @brief Constant with a HTML line break. diff --git a/include/dbstructure.php b/include/dbstructure.php index dde3dc6f1..65dda55c3 100644 --- a/include/dbstructure.php +++ b/include/dbstructure.php @@ -1682,6 +1682,7 @@ function db_definition() { "guid" => array("type" => "varchar(64)", "not null" => "1", "default" => ""), "username" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "password" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), + "legacy_password" => array("type" => "tinyint(1)", "not null" => "1", "default" => "1"), "nickname" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "email" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "openid" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), diff --git a/update.php b/update.php index 5cf9bbc2d..7530d1a38 100644 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@ Date: Sat, 25 Nov 2017 18:42:00 -0500 Subject: [PATCH 132/175] Add paragonie/random_compat to Composer dependencies --- composer.json | 3 +- composer.lock | 50 +++- vendor/composer/autoload_classmap.php | 42 +++- vendor/composer/autoload_files.php | 1 + vendor/composer/autoload_static.php | 43 +++- vendor/composer/installed.json | 50 ++++ vendor/paragonie/random_compat/LICENSE | 22 ++ vendor/paragonie/random_compat/build-phar.sh | 5 + vendor/paragonie/random_compat/composer.json | 37 +++ .../dist/random_compat.phar.pubkey | 5 + .../dist/random_compat.phar.pubkey.asc | 11 + .../random_compat/lib/byte_safe_strings.php | 181 ++++++++++++++ .../random_compat/lib/cast_to_int.php | 75 ++++++ .../random_compat/lib/error_polyfill.php | 49 ++++ vendor/paragonie/random_compat/lib/random.php | 223 ++++++++++++++++++ .../lib/random_bytes_com_dotnet.php | 88 +++++++ .../lib/random_bytes_dev_urandom.php | 167 +++++++++++++ .../lib/random_bytes_libsodium.php | 88 +++++++ .../lib/random_bytes_libsodium_legacy.php | 92 ++++++++ .../random_compat/lib/random_bytes_mcrypt.php | 77 ++++++ .../random_compat/lib/random_int.php | 190 +++++++++++++++ .../random_compat/other/build_phar.php | 57 +++++ .../random_compat/psalm-autoload.php | 9 + vendor/paragonie/random_compat/psalm.xml | 16 ++ 24 files changed, 1573 insertions(+), 8 deletions(-) create mode 100644 vendor/paragonie/random_compat/LICENSE create mode 100644 vendor/paragonie/random_compat/build-phar.sh create mode 100644 vendor/paragonie/random_compat/composer.json create mode 100644 vendor/paragonie/random_compat/dist/random_compat.phar.pubkey create mode 100644 vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc create mode 100644 vendor/paragonie/random_compat/lib/byte_safe_strings.php create mode 100644 vendor/paragonie/random_compat/lib/cast_to_int.php create mode 100644 vendor/paragonie/random_compat/lib/error_polyfill.php create mode 100644 vendor/paragonie/random_compat/lib/random.php create mode 100644 vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php create mode 100644 vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php create mode 100644 vendor/paragonie/random_compat/lib/random_bytes_libsodium.php create mode 100644 vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php create mode 100644 vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php create mode 100644 vendor/paragonie/random_compat/lib/random_int.php create mode 100644 vendor/paragonie/random_compat/other/build_phar.php create mode 100644 vendor/paragonie/random_compat/psalm-autoload.php create mode 100644 vendor/paragonie/random_compat/psalm.xml diff --git a/composer.json b/composer.json index eb739a8cd..d0014aee1 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,8 @@ "league/html-to-markdown": "~4.4.1", "defuse/php-encryption": "1.*", "pear/Text_LanguageDetect": "1.*", - "pear-pear.php.net/Text_Highlighter": "*" + "pear-pear.php.net/Text_Highlighter": "*", + "paragonie/random_compat": "^2.0" }, "repositories": [ { diff --git a/composer.lock b/composer.lock index 1d59865b9..3c35c7c1a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "a6a3dae4b15752d8f377b1fc1e5a2b47", + "content-hash": "a5c0c297b0e8185f2bcd3aad20ec5acc", "packages": [ { "name": "defuse/php-encryption", @@ -211,6 +211,54 @@ ], "time": "2017-08-29T18:23:54+00:00" }, + { + "name": "paragonie/random_compat", + "version": "v2.0.11", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/5da4d3c796c275c55f057af5a643ae297d96b4d8", + "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "pseudorandom", + "random" + ], + "time": "2017-09-27T21:40:39+00:00" + }, { "name": "pear-pear.php.net/Archive_Tar", "version": "1.4.3", diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 10e576ad0..cbb194b74 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -10,35 +10,71 @@ return array( 'Console_Getopt' => $vendorDir . '/pear-pear.php.net/Console_Getopt/Console/Getopt.php', 'Detection\\MobileDetect' => $vendorDir . '/mobiledetect/mobiledetectlib/namespaced/Detection/MobileDetect.php', 'Friendica\\App' => $baseDir . '/src/App.php', + 'Friendica\\BaseObject' => $baseDir . '/src/BaseObject.php', + 'Friendica\\Content\\ForumManager' => $baseDir . '/src/Content/ForumManager.php', 'Friendica\\Content\\Smilies' => $baseDir . '/src/Content/Smilies.php', - 'Friendica\\Core\\BaseObject' => $baseDir . '/src/Core/BaseObject.php', 'Friendica\\Core\\Cache' => $baseDir . '/src/Core/Cache.php', 'Friendica\\Core\\Config' => $baseDir . '/src/Core/Config.php', - 'Friendica\\Core\\Conversation' => $baseDir . '/src/Core/Conversation.php', - 'Friendica\\Core\\Item' => $baseDir . '/src/Core/Item.php', 'Friendica\\Core\\NotificationsManager' => $baseDir . '/src/Core/NotificationsManager.php', 'Friendica\\Core\\PConfig' => $baseDir . '/src/Core/PConfig.php', 'Friendica\\Core\\System' => $baseDir . '/src/Core/System.php', 'Friendica\\Core\\Worker' => $baseDir . '/src/Core/Worker.php', 'Friendica\\Database\\DBM' => $baseDir . '/src/Database/DBM.php', 'Friendica\\Model\\GlobalContact' => $baseDir . '/src/Model/GlobalContact.php', + 'Friendica\\Model\\User' => $baseDir . '/src/Model/User.php', + 'Friendica\\Network\\HTTPException' => $baseDir . '/src/Network/HTTPException.php', + 'Friendica\\Network\\HTTPException\\BadGatewayException' => $baseDir . '/src/Network/HTTPException/BadGatewayException.php', + 'Friendica\\Network\\HTTPException\\BadRequestException' => $baseDir . '/src/Network/HTTPException/BadRequestException.php', + 'Friendica\\Network\\HTTPException\\ConflictException' => $baseDir . '/src/Network/HTTPException/ConflictException.php', + 'Friendica\\Network\\HTTPException\\ExpectationFailedException' => $baseDir . '/src/Network/HTTPException/ExpectationFailedException.php', + 'Friendica\\Network\\HTTPException\\ForbiddenException' => $baseDir . '/src/Network/HTTPException/ForbiddenException.php', + 'Friendica\\Network\\HTTPException\\GatewayTimeoutException' => $baseDir . '/src/Network/HTTPException/GatewayTimeoutException.php', + 'Friendica\\Network\\HTTPException\\GoneException' => $baseDir . '/src/Network/HTTPException/GoneException.php', + 'Friendica\\Network\\HTTPException\\ImATeapotException' => $baseDir . '/src/Network/HTTPException/ImATeapotException.php', + 'Friendica\\Network\\HTTPException\\InternalServerErrorException' => $baseDir . '/src/Network/HTTPException/InternalServerErrorException.php', + 'Friendica\\Network\\HTTPException\\LenghtRequiredException' => $baseDir . '/src/Network/HTTPException/LenghtRequiredException.php', + 'Friendica\\Network\\HTTPException\\MethodNotAllowedException' => $baseDir . '/src/Network/HTTPException/MethodNotAllowedException.php', + 'Friendica\\Network\\HTTPException\\NonAcceptableException' => $baseDir . '/src/Network/HTTPException/NonAcceptableException.php', + 'Friendica\\Network\\HTTPException\\NotFoundException' => $baseDir . '/src/Network/HTTPException/NotFoundException.php', + 'Friendica\\Network\\HTTPException\\NotImplementedException' => $baseDir . '/src/Network/HTTPException/NotImplementedException.php', + 'Friendica\\Network\\HTTPException\\PreconditionFailedException' => $baseDir . '/src/Network/HTTPException/PreconditionFailedException.php', + 'Friendica\\Network\\HTTPException\\ServiceUnavaiableException' => $baseDir . '/src/Network/HTTPException/ServiceUnavaiableException.php', + 'Friendica\\Network\\HTTPException\\TooManyRequestsException' => $baseDir . '/src/Network/HTTPException/TooManyRequestsException.php', + 'Friendica\\Network\\HTTPException\\UnauthorizedException' => $baseDir . '/src/Network/HTTPException/UnauthorizedException.php', + 'Friendica\\Network\\HTTPException\\UnprocessableEntityException' => $baseDir . '/src/Network/HTTPException/UnprocessableEntityException.php', + 'Friendica\\Network\\HTTPException\\UnsupportedMediaTypeException' => $baseDir . '/src/Network/HTTPException/UnsupportedMediaTypeException.php', 'Friendica\\Network\\Probe' => $baseDir . '/src/Network/Probe.php', + 'Friendica\\Object\\Contact' => $baseDir . '/src/Object/Contact.php', + 'Friendica\\Object\\Conversation' => $baseDir . '/src/Object/Conversation.php', + 'Friendica\\Object\\Item' => $baseDir . '/src/Object/Item.php', + 'Friendica\\Object\\Profile' => $baseDir . '/src/Object/Profile.php', 'Friendica\\ParseUrl' => $baseDir . '/src/ParseUrl.php', 'Friendica\\Protocol\\DFRN' => $baseDir . '/src/Protocol/DFRN.php', 'Friendica\\Protocol\\Diaspora' => $baseDir . '/src/Protocol/Diaspora.php', 'Friendica\\Protocol\\OStatus' => $baseDir . '/src/Protocol/OStatus.php', 'Friendica\\Protocol\\PortableContact' => $baseDir . '/src/Protocol/PortableContact.php', + 'Friendica\\Render\\ITemplateEngine' => $baseDir . '/src/Render/ITemplateEngine.php', + 'Friendica\\Util\\Emailer' => $baseDir . '/src/Util/Emailer.php', + 'Friendica\\Util\\ExAuth' => $baseDir . '/src/Util/ExAuth.php', 'Friendica\\Util\\Lock' => $baseDir . '/src/Util/Lock.php', 'Friendica\\Util\\XML' => $baseDir . '/src/Util/XML.php', 'Friendica\\Worker\\CheckVersion' => $baseDir . '/src/Worker/CheckVersion.php', + 'Friendica\\Worker\\CreateShadowEntry' => $baseDir . '/src/Worker/CreateShadowEntry.php', 'Friendica\\Worker\\Cron' => $baseDir . '/src/Worker/Cron.php', 'Friendica\\Worker\\CronHooks' => $baseDir . '/src/Worker/CronHooks.php', 'Friendica\\Worker\\CronJobs' => $baseDir . '/src/Worker/CronJobs.php', 'Friendica\\Worker\\DBClean' => $baseDir . '/src/Worker/DBClean.php', 'Friendica\\Worker\\DBUpdate' => $baseDir . '/src/Worker/DBUpdate.php', + 'Friendica\\Worker\\Delivery' => $baseDir . '/src/Worker/Delivery.php', 'Friendica\\Worker\\Directory' => $baseDir . '/src/Worker/Directory.php', 'Friendica\\Worker\\DiscoverPoCo' => $baseDir . '/src/Worker/DiscoverPoCo.php', + 'Friendica\\Worker\\Expire' => $baseDir . '/src/Worker/Expire.php', + 'Friendica\\Worker\\GProbe' => $baseDir . '/src/Worker/GProbe.php', + 'Friendica\\Worker\\Notifier' => $baseDir . '/src/Worker/Notifier.php', 'Friendica\\Worker\\OnePoll' => $baseDir . '/src/Worker/OnePoll.php', + 'Friendica\\Worker\\ProfileUpdate' => $baseDir . '/src/Worker/ProfileUpdate.php', + 'Friendica\\Worker\\PubSubPublish' => $baseDir . '/src/Worker/PubSubPublish.php', + 'Friendica\\Worker\\Queue' => $baseDir . '/src/Worker/Queue.php', 'Friendica\\Worker\\RemoveContact' => $baseDir . '/src/Worker/RemoveContact.php', 'Friendica\\Worker\\SpoolPost' => $baseDir . '/src/Worker/SpoolPost.php', 'Friendica\\Worker\\TagUpdate' => $baseDir . '/src/Worker/TagUpdate.php', diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 94f91a1b5..a11144496 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -8,4 +8,5 @@ $baseDir = dirname($vendorDir); return array( '2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php', '8170285c807a9f24f165f37b15bc9a36' => $vendorDir . '/defuse/php-encryption/Crypto.php', + '5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php', ); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 8a188c2fa..89c44f4f4 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -9,6 +9,7 @@ class ComposerStaticInitFriendica public static $files = array ( '2cffec82183ee1cea088009cef9a6fc3' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php', '8170285c807a9f24f165f37b15bc9a36' => __DIR__ . '/..' . '/defuse/php-encryption/Crypto.php', + '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php', ); public static $prefixLengthsPsr4 = array ( @@ -62,35 +63,71 @@ class ComposerStaticInitFriendica 'Console_Getopt' => __DIR__ . '/..' . '/pear-pear.php.net/Console_Getopt/Console/Getopt.php', 'Detection\\MobileDetect' => __DIR__ . '/..' . '/mobiledetect/mobiledetectlib/namespaced/Detection/MobileDetect.php', 'Friendica\\App' => __DIR__ . '/../..' . '/src/App.php', + 'Friendica\\BaseObject' => __DIR__ . '/../..' . '/src/BaseObject.php', + 'Friendica\\Content\\ForumManager' => __DIR__ . '/../..' . '/src/Content/ForumManager.php', 'Friendica\\Content\\Smilies' => __DIR__ . '/../..' . '/src/Content/Smilies.php', - 'Friendica\\Core\\BaseObject' => __DIR__ . '/../..' . '/src/Core/BaseObject.php', 'Friendica\\Core\\Cache' => __DIR__ . '/../..' . '/src/Core/Cache.php', 'Friendica\\Core\\Config' => __DIR__ . '/../..' . '/src/Core/Config.php', - 'Friendica\\Core\\Conversation' => __DIR__ . '/../..' . '/src/Core/Conversation.php', - 'Friendica\\Core\\Item' => __DIR__ . '/../..' . '/src/Core/Item.php', 'Friendica\\Core\\NotificationsManager' => __DIR__ . '/../..' . '/src/Core/NotificationsManager.php', 'Friendica\\Core\\PConfig' => __DIR__ . '/../..' . '/src/Core/PConfig.php', 'Friendica\\Core\\System' => __DIR__ . '/../..' . '/src/Core/System.php', 'Friendica\\Core\\Worker' => __DIR__ . '/../..' . '/src/Core/Worker.php', 'Friendica\\Database\\DBM' => __DIR__ . '/../..' . '/src/Database/DBM.php', 'Friendica\\Model\\GlobalContact' => __DIR__ . '/../..' . '/src/Model/GlobalContact.php', + 'Friendica\\Model\\User' => __DIR__ . '/../..' . '/src/Model/User.php', + 'Friendica\\Network\\HTTPException' => __DIR__ . '/../..' . '/src/Network/HTTPException.php', + 'Friendica\\Network\\HTTPException\\BadGatewayException' => __DIR__ . '/../..' . '/src/Network/HTTPException/BadGatewayException.php', + 'Friendica\\Network\\HTTPException\\BadRequestException' => __DIR__ . '/../..' . '/src/Network/HTTPException/BadRequestException.php', + 'Friendica\\Network\\HTTPException\\ConflictException' => __DIR__ . '/../..' . '/src/Network/HTTPException/ConflictException.php', + 'Friendica\\Network\\HTTPException\\ExpectationFailedException' => __DIR__ . '/../..' . '/src/Network/HTTPException/ExpectationFailedException.php', + 'Friendica\\Network\\HTTPException\\ForbiddenException' => __DIR__ . '/../..' . '/src/Network/HTTPException/ForbiddenException.php', + 'Friendica\\Network\\HTTPException\\GatewayTimeoutException' => __DIR__ . '/../..' . '/src/Network/HTTPException/GatewayTimeoutException.php', + 'Friendica\\Network\\HTTPException\\GoneException' => __DIR__ . '/../..' . '/src/Network/HTTPException/GoneException.php', + 'Friendica\\Network\\HTTPException\\ImATeapotException' => __DIR__ . '/../..' . '/src/Network/HTTPException/ImATeapotException.php', + 'Friendica\\Network\\HTTPException\\InternalServerErrorException' => __DIR__ . '/../..' . '/src/Network/HTTPException/InternalServerErrorException.php', + 'Friendica\\Network\\HTTPException\\LenghtRequiredException' => __DIR__ . '/../..' . '/src/Network/HTTPException/LenghtRequiredException.php', + 'Friendica\\Network\\HTTPException\\MethodNotAllowedException' => __DIR__ . '/../..' . '/src/Network/HTTPException/MethodNotAllowedException.php', + 'Friendica\\Network\\HTTPException\\NonAcceptableException' => __DIR__ . '/../..' . '/src/Network/HTTPException/NonAcceptableException.php', + 'Friendica\\Network\\HTTPException\\NotFoundException' => __DIR__ . '/../..' . '/src/Network/HTTPException/NotFoundException.php', + 'Friendica\\Network\\HTTPException\\NotImplementedException' => __DIR__ . '/../..' . '/src/Network/HTTPException/NotImplementedException.php', + 'Friendica\\Network\\HTTPException\\PreconditionFailedException' => __DIR__ . '/../..' . '/src/Network/HTTPException/PreconditionFailedException.php', + 'Friendica\\Network\\HTTPException\\ServiceUnavaiableException' => __DIR__ . '/../..' . '/src/Network/HTTPException/ServiceUnavaiableException.php', + 'Friendica\\Network\\HTTPException\\TooManyRequestsException' => __DIR__ . '/../..' . '/src/Network/HTTPException/TooManyRequestsException.php', + 'Friendica\\Network\\HTTPException\\UnauthorizedException' => __DIR__ . '/../..' . '/src/Network/HTTPException/UnauthorizedException.php', + 'Friendica\\Network\\HTTPException\\UnprocessableEntityException' => __DIR__ . '/../..' . '/src/Network/HTTPException/UnprocessableEntityException.php', + 'Friendica\\Network\\HTTPException\\UnsupportedMediaTypeException' => __DIR__ . '/../..' . '/src/Network/HTTPException/UnsupportedMediaTypeException.php', 'Friendica\\Network\\Probe' => __DIR__ . '/../..' . '/src/Network/Probe.php', + 'Friendica\\Object\\Contact' => __DIR__ . '/../..' . '/src/Object/Contact.php', + 'Friendica\\Object\\Conversation' => __DIR__ . '/../..' . '/src/Object/Conversation.php', + 'Friendica\\Object\\Item' => __DIR__ . '/../..' . '/src/Object/Item.php', + 'Friendica\\Object\\Profile' => __DIR__ . '/../..' . '/src/Object/Profile.php', 'Friendica\\ParseUrl' => __DIR__ . '/../..' . '/src/ParseUrl.php', 'Friendica\\Protocol\\DFRN' => __DIR__ . '/../..' . '/src/Protocol/DFRN.php', 'Friendica\\Protocol\\Diaspora' => __DIR__ . '/../..' . '/src/Protocol/Diaspora.php', 'Friendica\\Protocol\\OStatus' => __DIR__ . '/../..' . '/src/Protocol/OStatus.php', 'Friendica\\Protocol\\PortableContact' => __DIR__ . '/../..' . '/src/Protocol/PortableContact.php', + 'Friendica\\Render\\ITemplateEngine' => __DIR__ . '/../..' . '/src/Render/ITemplateEngine.php', + 'Friendica\\Util\\Emailer' => __DIR__ . '/../..' . '/src/Util/Emailer.php', + 'Friendica\\Util\\ExAuth' => __DIR__ . '/../..' . '/src/Util/ExAuth.php', 'Friendica\\Util\\Lock' => __DIR__ . '/../..' . '/src/Util/Lock.php', 'Friendica\\Util\\XML' => __DIR__ . '/../..' . '/src/Util/XML.php', 'Friendica\\Worker\\CheckVersion' => __DIR__ . '/../..' . '/src/Worker/CheckVersion.php', + 'Friendica\\Worker\\CreateShadowEntry' => __DIR__ . '/../..' . '/src/Worker/CreateShadowEntry.php', 'Friendica\\Worker\\Cron' => __DIR__ . '/../..' . '/src/Worker/Cron.php', 'Friendica\\Worker\\CronHooks' => __DIR__ . '/../..' . '/src/Worker/CronHooks.php', 'Friendica\\Worker\\CronJobs' => __DIR__ . '/../..' . '/src/Worker/CronJobs.php', 'Friendica\\Worker\\DBClean' => __DIR__ . '/../..' . '/src/Worker/DBClean.php', 'Friendica\\Worker\\DBUpdate' => __DIR__ . '/../..' . '/src/Worker/DBUpdate.php', + 'Friendica\\Worker\\Delivery' => __DIR__ . '/../..' . '/src/Worker/Delivery.php', 'Friendica\\Worker\\Directory' => __DIR__ . '/../..' . '/src/Worker/Directory.php', 'Friendica\\Worker\\DiscoverPoCo' => __DIR__ . '/../..' . '/src/Worker/DiscoverPoCo.php', + 'Friendica\\Worker\\Expire' => __DIR__ . '/../..' . '/src/Worker/Expire.php', + 'Friendica\\Worker\\GProbe' => __DIR__ . '/../..' . '/src/Worker/GProbe.php', + 'Friendica\\Worker\\Notifier' => __DIR__ . '/../..' . '/src/Worker/Notifier.php', 'Friendica\\Worker\\OnePoll' => __DIR__ . '/../..' . '/src/Worker/OnePoll.php', + 'Friendica\\Worker\\ProfileUpdate' => __DIR__ . '/../..' . '/src/Worker/ProfileUpdate.php', + 'Friendica\\Worker\\PubSubPublish' => __DIR__ . '/../..' . '/src/Worker/PubSubPublish.php', + 'Friendica\\Worker\\Queue' => __DIR__ . '/../..' . '/src/Worker/Queue.php', 'Friendica\\Worker\\RemoveContact' => __DIR__ . '/../..' . '/src/Worker/RemoveContact.php', 'Friendica\\Worker\\SpoolPost' => __DIR__ . '/../..' . '/src/Worker/SpoolPost.php', 'Friendica\\Worker\\TagUpdate' => __DIR__ . '/../..' . '/src/Worker/TagUpdate.php', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 7685eabf0..b350d96df 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -489,5 +489,55 @@ "mcrypt", "security" ] + }, + { + "name": "paragonie/random_compat", + "version": "v2.0.11", + "version_normalized": "2.0.11.0", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/5da4d3c796c275c55f057af5a643ae297d96b4d8", + "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "time": "2017-09-27T21:40:39+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "pseudorandom", + "random" + ] } ] diff --git a/vendor/paragonie/random_compat/LICENSE b/vendor/paragonie/random_compat/LICENSE new file mode 100644 index 000000000..45c7017df --- /dev/null +++ b/vendor/paragonie/random_compat/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Paragon Initiative Enterprises + +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/vendor/paragonie/random_compat/build-phar.sh b/vendor/paragonie/random_compat/build-phar.sh new file mode 100644 index 000000000..b4a5ba31c --- /dev/null +++ b/vendor/paragonie/random_compat/build-phar.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +basedir=$( dirname $( readlink -f ${BASH_SOURCE[0]} ) ) + +php -dphar.readonly=0 "$basedir/other/build_phar.php" $* \ No newline at end of file diff --git a/vendor/paragonie/random_compat/composer.json b/vendor/paragonie/random_compat/composer.json new file mode 100644 index 000000000..1c5978c6f --- /dev/null +++ b/vendor/paragonie/random_compat/composer.json @@ -0,0 +1,37 @@ +{ + "name": "paragonie/random_compat", + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "random", + "pseudorandom" + ], + "license": "MIT", + "type": "library", + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "support": { + "issues": "https://github.com/paragonie/random_compat/issues", + "email": "info@paragonie.com", + "source": "https://github.com/paragonie/random_compat" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "autoload": { + "files": [ + "lib/random.php" + ] + } +} diff --git a/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey new file mode 100644 index 000000000..eb50ebfcd --- /dev/null +++ b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey @@ -0,0 +1,5 @@ +-----BEGIN PUBLIC KEY----- +MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEEd+wCqJDrx5B4OldM0dQE0ZMX+lx1ZWm +pui0SUqD4G29L3NGsz9UhJ/0HjBdbnkhIK5xviT0X5vtjacF6ajgcCArbTB+ds+p ++h7Q084NuSuIpNb6YPfoUFgC/CL9kAoc +-----END PUBLIC KEY----- diff --git a/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc new file mode 100644 index 000000000..6a1d7f300 --- /dev/null +++ b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.22 (MingW32) + +iQEcBAABAgAGBQJWtW1hAAoJEGuXocKCZATaJf0H+wbZGgskK1dcRTsuVJl9IWip +QwGw/qIKI280SD6/ckoUMxKDCJiFuPR14zmqnS36k7N5UNPnpdTJTS8T11jttSpg +1LCmgpbEIpgaTah+cELDqFCav99fS+bEiAL5lWDAHBTE/XPjGVCqeehyPYref4IW +NDBIEsvnHPHPLsn6X5jq4+Yj5oUixgxaMPiR+bcO4Sh+RzOVB6i2D0upWfRXBFXA +NNnsg9/zjvoC7ZW73y9uSH+dPJTt/Vgfeiv52/v41XliyzbUyLalf02GNPY+9goV +JHG1ulEEBJOCiUD9cE1PUIJwHA/HqyhHIvV350YoEFiHl8iSwm7SiZu5kPjaq74= +=B6+8 +-----END PGP SIGNATURE----- diff --git a/vendor/paragonie/random_compat/lib/byte_safe_strings.php b/vendor/paragonie/random_compat/lib/byte_safe_strings.php new file mode 100644 index 000000000..3de86b223 --- /dev/null +++ b/vendor/paragonie/random_compat/lib/byte_safe_strings.php @@ -0,0 +1,181 @@ + RandomCompat_strlen($binary_string)) { + return ''; + } + + return (string) mb_substr($binary_string, $start, $length, '8bit'); + } + + } else { + + /** + * substr() implementation that isn't brittle to mbstring.func_overload + * + * This version just uses the default substr() + * + * @param string $binary_string + * @param int $start + * @param int $length (optional) + * + * @throws TypeError + * + * @return string + */ + function RandomCompat_substr($binary_string, $start, $length = null) + { + if (!is_string($binary_string)) { + throw new TypeError( + 'RandomCompat_substr(): First argument should be a string' + ); + } + + if (!is_int($start)) { + throw new TypeError( + 'RandomCompat_substr(): Second argument should be an integer' + ); + } + + if ($length !== null) { + if (!is_int($length)) { + throw new TypeError( + 'RandomCompat_substr(): Third argument should be an integer, or omitted' + ); + } + + return (string) substr($binary_string, $start, $length); + } + + return (string) substr($binary_string, $start); + } + } +} diff --git a/vendor/paragonie/random_compat/lib/cast_to_int.php b/vendor/paragonie/random_compat/lib/cast_to_int.php new file mode 100644 index 000000000..9a4fab991 --- /dev/null +++ b/vendor/paragonie/random_compat/lib/cast_to_int.php @@ -0,0 +1,75 @@ + operators might accidentally let a float + * through. + * + * @param int|float $number The number we want to convert to an int + * @param bool $fail_open Set to true to not throw an exception + * + * @return float|int + * @psalm-suppress InvalidReturnType + * + * @throws TypeError + */ + function RandomCompat_intval($number, $fail_open = false) + { + if (is_int($number) || is_float($number)) { + $number += 0; + } elseif (is_numeric($number)) { + $number += 0; + } + + if ( + is_float($number) + && + $number > ~PHP_INT_MAX + && + $number < PHP_INT_MAX + ) { + $number = (int) $number; + } + + if (is_int($number)) { + return (int) $number; + } elseif (!$fail_open) { + throw new TypeError( + 'Expected an integer.' + ); + } + return $number; + } +} diff --git a/vendor/paragonie/random_compat/lib/error_polyfill.php b/vendor/paragonie/random_compat/lib/error_polyfill.php new file mode 100644 index 000000000..6a91990ce --- /dev/null +++ b/vendor/paragonie/random_compat/lib/error_polyfill.php @@ -0,0 +1,49 @@ += 70000) { + return; +} + +if (!defined('RANDOM_COMPAT_READ_BUFFER')) { + define('RANDOM_COMPAT_READ_BUFFER', 8); +} + +$RandomCompatDIR = dirname(__FILE__); + +require_once $RandomCompatDIR . '/byte_safe_strings.php'; +require_once $RandomCompatDIR . '/cast_to_int.php'; +require_once $RandomCompatDIR . '/error_polyfill.php'; + +if (!is_callable('random_bytes')) { + /** + * PHP 5.2.0 - 5.6.x way to implement random_bytes() + * + * We use conditional statements here to define the function in accordance + * to the operating environment. It's a micro-optimization. + * + * In order of preference: + * 1. Use libsodium if available. + * 2. fread() /dev/urandom if available (never on Windows) + * 3. mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM) + * 4. COM('CAPICOM.Utilities.1')->GetRandom() + * + * See RATIONALE.md for our reasoning behind this particular order + */ + if (extension_loaded('libsodium')) { + // See random_bytes_libsodium.php + if (PHP_VERSION_ID >= 50300 && is_callable('\\Sodium\\randombytes_buf')) { + require_once $RandomCompatDIR . '/random_bytes_libsodium.php'; + } elseif (method_exists('Sodium', 'randombytes_buf')) { + require_once $RandomCompatDIR . '/random_bytes_libsodium_legacy.php'; + } + } + + /** + * Reading directly from /dev/urandom: + */ + if (DIRECTORY_SEPARATOR === '/') { + // DIRECTORY_SEPARATOR === '/' on Unix-like OSes -- this is a fast + // way to exclude Windows. + $RandomCompatUrandom = true; + $RandomCompat_basedir = ini_get('open_basedir'); + + if (!empty($RandomCompat_basedir)) { + $RandomCompat_open_basedir = explode( + PATH_SEPARATOR, + strtolower($RandomCompat_basedir) + ); + $RandomCompatUrandom = (array() !== array_intersect( + array('/dev', '/dev/', '/dev/urandom'), + $RandomCompat_open_basedir + )); + $RandomCompat_open_basedir = null; + } + + if ( + !is_callable('random_bytes') + && + $RandomCompatUrandom + && + @is_readable('/dev/urandom') + ) { + // Error suppression on is_readable() in case of an open_basedir + // or safe_mode failure. All we care about is whether or not we + // can read it at this point. If the PHP environment is going to + // panic over trying to see if the file can be read in the first + // place, that is not helpful to us here. + + // See random_bytes_dev_urandom.php + require_once $RandomCompatDIR . '/random_bytes_dev_urandom.php'; + } + // Unset variables after use + $RandomCompat_basedir = null; + } else { + $RandomCompatUrandom = false; + } + + /** + * mcrypt_create_iv() + * + * We only want to use mcypt_create_iv() if: + * + * - random_bytes() hasn't already been defined + * - the mcrypt extensions is loaded + * - One of these two conditions is true: + * - We're on Windows (DIRECTORY_SEPARATOR !== '/') + * - We're not on Windows and /dev/urandom is readabale + * (i.e. we're not in a chroot jail) + * - Special case: + * - If we're not on Windows, but the PHP version is between + * 5.6.10 and 5.6.12, we don't want to use mcrypt. It will + * hang indefinitely. This is bad. + * - If we're on Windows, we want to use PHP >= 5.3.7 or else + * we get insufficient entropy errors. + */ + if ( + !is_callable('random_bytes') + && + // Windows on PHP < 5.3.7 is broken, but non-Windows is not known to be. + (DIRECTORY_SEPARATOR === '/' || PHP_VERSION_ID >= 50307) + && + // Prevent this code from hanging indefinitely on non-Windows; + // see https://bugs.php.net/bug.php?id=69833 + ( + DIRECTORY_SEPARATOR !== '/' || + (PHP_VERSION_ID <= 50609 || PHP_VERSION_ID >= 50613) + ) + && + extension_loaded('mcrypt') + ) { + // See random_bytes_mcrypt.php + require_once $RandomCompatDIR . '/random_bytes_mcrypt.php'; + } + $RandomCompatUrandom = null; + + /** + * This is a Windows-specific fallback, for when the mcrypt extension + * isn't loaded. + */ + if ( + !is_callable('random_bytes') + && + extension_loaded('com_dotnet') + && + class_exists('COM') + ) { + $RandomCompat_disabled_classes = preg_split( + '#\s*,\s*#', + strtolower(ini_get('disable_classes')) + ); + + if (!in_array('com', $RandomCompat_disabled_classes)) { + try { + $RandomCompatCOMtest = new COM('CAPICOM.Utilities.1'); + if (method_exists($RandomCompatCOMtest, 'GetRandom')) { + // See random_bytes_com_dotnet.php + require_once $RandomCompatDIR . '/random_bytes_com_dotnet.php'; + } + } catch (com_exception $e) { + // Don't try to use it. + } + } + $RandomCompat_disabled_classes = null; + $RandomCompatCOMtest = null; + } + + /** + * throw new Exception + */ + if (!is_callable('random_bytes')) { + /** + * We don't have any more options, so let's throw an exception right now + * and hope the developer won't let it fail silently. + * + * @param mixed $length + * @return void + * @throws Exception + */ + function random_bytes($length) + { + unset($length); // Suppress "variable not used" warnings. + throw new Exception( + 'There is no suitable CSPRNG installed on your system' + ); + } + } +} + +if (!is_callable('random_int')) { + require_once $RandomCompatDIR . '/random_int.php'; +} + +$RandomCompatDIR = null; diff --git a/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php b/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php new file mode 100644 index 000000000..fc1926e5c --- /dev/null +++ b/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php @@ -0,0 +1,88 @@ +GetRandom($bytes, 0)); + if (RandomCompat_strlen($buf) >= $bytes) { + /** + * Return our random entropy buffer here: + */ + return RandomCompat_substr($buf, 0, $bytes); + } + ++$execCount; + } while ($execCount < $bytes); + + /** + * If we reach here, PHP has failed us. + */ + throw new Exception( + 'Could not gather sufficient random data' + ); + } +} \ No newline at end of file diff --git a/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php b/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php new file mode 100644 index 000000000..df5b91524 --- /dev/null +++ b/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php @@ -0,0 +1,167 @@ + 0); + + /** + * Is our result valid? + */ + if (is_string($buf)) { + if (RandomCompat_strlen($buf) === $bytes) { + /** + * Return our random entropy buffer here: + */ + return $buf; + } + } + } + + /** + * If we reach here, PHP has failed us. + */ + throw new Exception( + 'Error reading from source device' + ); + } +} diff --git a/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php b/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php new file mode 100644 index 000000000..4af1a2422 --- /dev/null +++ b/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php @@ -0,0 +1,88 @@ + 2147483647) { + $buf = ''; + for ($i = 0; $i < $bytes; $i += 1073741824) { + $n = ($bytes - $i) > 1073741824 + ? 1073741824 + : $bytes - $i; + $buf .= \Sodium\randombytes_buf($n); + } + } else { + $buf = \Sodium\randombytes_buf($bytes); + } + + if ($buf !== false) { + if (RandomCompat_strlen($buf) === $bytes) { + return $buf; + } + } + + /** + * If we reach here, PHP has failed us. + */ + throw new Exception( + 'Could not gather sufficient random data' + ); + } +} diff --git a/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php b/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php new file mode 100644 index 000000000..705af5262 --- /dev/null +++ b/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php @@ -0,0 +1,92 @@ + 2147483647) { + for ($i = 0; $i < $bytes; $i += 1073741824) { + $n = ($bytes - $i) > 1073741824 + ? 1073741824 + : $bytes - $i; + $buf .= Sodium::randombytes_buf((int) $n); + } + } else { + $buf .= Sodium::randombytes_buf((int) $bytes); + } + + if (is_string($buf)) { + if (RandomCompat_strlen($buf) === $bytes) { + return $buf; + } + } + + /** + * If we reach here, PHP has failed us. + */ + throw new Exception( + 'Could not gather sufficient random data' + ); + } +} diff --git a/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php b/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php new file mode 100644 index 000000000..aac9c013d --- /dev/null +++ b/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php @@ -0,0 +1,77 @@ + operators might accidentally let a float + * through. + */ + + try { + $min = RandomCompat_intval($min); + } catch (TypeError $ex) { + throw new TypeError( + 'random_int(): $min must be an integer' + ); + } + + try { + $max = RandomCompat_intval($max); + } catch (TypeError $ex) { + throw new TypeError( + 'random_int(): $max must be an integer' + ); + } + + /** + * Now that we've verified our weak typing system has given us an integer, + * let's validate the logic then we can move forward with generating random + * integers along a given range. + */ + if ($min > $max) { + throw new Error( + 'Minimum value must be less than or equal to the maximum value' + ); + } + + if ($max === $min) { + return (int) $min; + } + + /** + * Initialize variables to 0 + * + * We want to store: + * $bytes => the number of random bytes we need + * $mask => an integer bitmask (for use with the &) operator + * so we can minimize the number of discards + */ + $attempts = $bits = $bytes = $mask = $valueShift = 0; + + /** + * At this point, $range is a positive number greater than 0. It might + * overflow, however, if $max - $min > PHP_INT_MAX. PHP will cast it to + * a float and we will lose some precision. + */ + $range = $max - $min; + + /** + * Test for integer overflow: + */ + if (!is_int($range)) { + + /** + * Still safely calculate wider ranges. + * Provided by @CodesInChaos, @oittaa + * + * @ref https://gist.github.com/CodesInChaos/03f9ea0b58e8b2b8d435 + * + * We use ~0 as a mask in this case because it generates all 1s + * + * @ref https://eval.in/400356 (32-bit) + * @ref http://3v4l.org/XX9r5 (64-bit) + */ + $bytes = PHP_INT_SIZE; + $mask = ~0; + + } else { + + /** + * $bits is effectively ceil(log($range, 2)) without dealing with + * type juggling + */ + while ($range > 0) { + if ($bits % 8 === 0) { + ++$bytes; + } + ++$bits; + $range >>= 1; + $mask = $mask << 1 | 1; + } + $valueShift = $min; + } + + $val = 0; + /** + * Now that we have our parameters set up, let's begin generating + * random integers until one falls between $min and $max + */ + do { + /** + * The rejection probability is at most 0.5, so this corresponds + * to a failure probability of 2^-128 for a working RNG + */ + if ($attempts > 128) { + throw new Exception( + 'random_int: RNG is broken - too many rejections' + ); + } + + /** + * Let's grab the necessary number of random bytes + */ + $randomByteString = random_bytes($bytes); + + /** + * Let's turn $randomByteString into an integer + * + * This uses bitwise operators (<< and |) to build an integer + * out of the values extracted from ord() + * + * Example: [9F] | [6D] | [32] | [0C] => + * 159 + 27904 + 3276800 + 201326592 => + * 204631455 + */ + $val &= 0; + for ($i = 0; $i < $bytes; ++$i) { + $val |= ord($randomByteString[$i]) << ($i * 8); + } + + /** + * Apply mask + */ + $val &= $mask; + $val += $valueShift; + + ++$attempts; + /** + * If $val overflows to a floating point number, + * ... or is larger than $max, + * ... or smaller than $min, + * then try again. + */ + } while (!is_int($val) || $val > $max || $val < $min); + + return (int) $val; + } +} diff --git a/vendor/paragonie/random_compat/other/build_phar.php b/vendor/paragonie/random_compat/other/build_phar.php new file mode 100644 index 000000000..70ef4b2ed --- /dev/null +++ b/vendor/paragonie/random_compat/other/build_phar.php @@ -0,0 +1,57 @@ +buildFromDirectory(dirname(__DIR__).'/lib'); +rename( + dirname(__DIR__).'/lib/index.php', + dirname(__DIR__).'/lib/random.php' +); + +/** + * If we pass an (optional) path to a private key as a second argument, we will + * sign the Phar with OpenSSL. + * + * If you leave this out, it will produce an unsigned .phar! + */ +if ($argc > 1) { + if (!@is_readable($argv[1])) { + echo 'Could not read the private key file:', $argv[1], "\n"; + exit(255); + } + $pkeyFile = file_get_contents($argv[1]); + + $private = openssl_get_privatekey($pkeyFile); + if ($private !== false) { + $pkey = ''; + openssl_pkey_export($private, $pkey); + $phar->setSignatureAlgorithm(Phar::OPENSSL, $pkey); + + /** + * Save the corresponding public key to the file + */ + if (!@is_readable($dist.'/random_compat.phar.pubkey')) { + $details = openssl_pkey_get_details($private); + file_put_contents( + $dist.'/random_compat.phar.pubkey', + $details['key'] + ); + } + } else { + echo 'An error occurred reading the private key from OpenSSL.', "\n"; + exit(255); + } +} diff --git a/vendor/paragonie/random_compat/psalm-autoload.php b/vendor/paragonie/random_compat/psalm-autoload.php new file mode 100644 index 000000000..d71d1b818 --- /dev/null +++ b/vendor/paragonie/random_compat/psalm-autoload.php @@ -0,0 +1,9 @@ + + + + + + + + + + + + From 797aac9a3b576a09dd95525a6dc102e0a2820d6f Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 26 Nov 2017 00:59:27 +0100 Subject: [PATCH 133/175] Events docs had an obsolete paragraph --- doc/de/events.md | 6 ------ doc/events.md | 7 ------- 2 files changed, 13 deletions(-) diff --git a/doc/de/events.md b/doc/de/events.md index 4da36a746..809b8c0e4 100644 --- a/doc/de/events.md +++ b/doc/de/events.md @@ -58,9 +58,3 @@ Zusätzlich können sie sagen ob sie teilnehmen, oder vielleicht teilnehmen an d Wenn du deine öffentlichen Kalender Einträge exportieren möchtest, kannst du dies in den Einstellungen aktivieren (Einstellungen -> Zusätzliche Features -> Allgemeine Features -> Öffentlichen Kalender exportieren). Im Anschluss sind auf der Veranstaltungs-Übersichtsseite zwei Links zu den exportierten Einträgen (im ical oder csv Format) verfügbar. -### Addons - -#### OpenStreetMap - -Wenn du diese Addon aktivierst auf deinem Frendica-Knoten, wird der Inhalt des Ort-Feldes mit den Identifikations-Service von OpenStreetMap verbunden, wenn du die Veranstaltung postest. -Wenn Openstreetmap etwas passendes findet, wird eine Karte mit dem Ort automatisch eingebettet, am Ende der Veranstalltungsanzeige. diff --git a/doc/events.md b/doc/events.md index eb6b77d33..be0040d29 100644 --- a/doc/events.md +++ b/doc/events.md @@ -67,10 +67,3 @@ Furthermore they can announce that they will attend, not attend or may-be attend If you want to export your public events to ical or csv, you can activate an additional feature in your user settings (Additional features -> General Features -> Export Public Calendar). Afterwards a link will be shown in the events page of your profile to access the calendar. -### Addons - -#### OpenStreetMap - -If this addon is activated on your friendica node, the content of the location field will be matched with the identification service of OSM when you submit the event. -Should OSM find anything matching, a map for the location will be embedded automatically at the end of the events view. - From a7088f5b674ac0f67e98188fb533d1327faf5fd3 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 26 Nov 2017 02:03:59 +0000 Subject: [PATCH 134/175] Images that are uploaded to public forums are now public --- mod/item.php | 232 +++++++++++++++++++++++++-------------------------- 1 file changed, 116 insertions(+), 116 deletions(-) diff --git a/mod/item.php b/mod/item.php index 4aafa2299..8ae99948a 100644 --- a/mod/item.php +++ b/mod/item.php @@ -423,122 +423,6 @@ function item_post(App $a) { } } - /* - * When a photo was uploaded into the message using the (profile wall) ajax - * uploader, The permissions are initially set to disallow anybody but the - * owner from seeing it. This is because the permissions may not yet have been - * set for the post. If it's private, the photo permissions should be set - * appropriately. But we didn't know the final permissions on the post until - * now. So now we'll look for links of uploaded messages that are in the - * post and set them to the same permissions as the post itself. - */ - - $match = null; - - if ((! $preview) && preg_match_all("/\[img([\=0-9x]*?)\](.*?)\[\/img\]/",$body,$match)) { - $images = $match[2]; - if (count($images)) { - - $objecttype = ACTIVITY_OBJ_IMAGE; - - foreach ($images as $image) { - if (! stristr($image,System::baseUrl() . '/photo/')) { - continue; - } - $image_uri = substr($image,strrpos($image,'/') + 1); - $image_uri = substr($image_uri,0, strpos($image_uri,'-')); - if (! strlen($image_uri)) { - continue; - } - $srch = '<' . intval($contact_id) . '>'; - - $r = q("SELECT `id` FROM `photo` WHERE `allow_cid` = '%s' AND `allow_gid` = '' AND `deny_cid` = '' AND `deny_gid` = '' - AND `resource-id` = '%s' AND `uid` = %d LIMIT 1", - dbesc($srch), - dbesc($image_uri), - intval($profile_uid) - ); - - if (! DBM::is_result($r)) { - continue; - } - - $r = q("UPDATE `photo` SET `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s' - WHERE `resource-id` = '%s' AND `uid` = %d AND `album` = '%s' ", - dbesc($str_contact_allow), - dbesc($str_group_allow), - dbesc($str_contact_deny), - dbesc($str_group_deny), - dbesc($image_uri), - intval($profile_uid), - dbesc( t('Wall Photos')) - ); - } - } - } - - - /* - * Next link in any attachment references we find in the post. - */ - $match = false; - - if ((! $preview) && preg_match_all("/\[attachment\](.*?)\[\/attachment\]/", $body, $match)) { - $attaches = $match[1]; - if (count($attaches)) { - foreach ($attaches as $attach) { - $r = q("SELECT * FROM `attach` WHERE `uid` = %d AND `id` = %d LIMIT 1", - intval($profile_uid), - intval($attach) - ); - if (DBM::is_result($r)) { - $r = q("UPDATE `attach` SET `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s' - WHERE `uid` = %d AND `id` = %d", - dbesc($str_contact_allow), - dbesc($str_group_allow), - dbesc($str_contact_deny), - dbesc($str_group_deny), - intval($profile_uid), - intval($attach) - ); - } - } - } - } - - // embedded bookmark or attachment in post? set bookmark flag - - $bookmark = 0; - $data = get_attachment_data($body); - if (preg_match_all("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism", $body, $match, PREG_SET_ORDER) || isset($data["type"])) { - $objecttype = ACTIVITY_OBJ_BOOKMARK; - $bookmark = 1; - } - - $body = bb_translate_video($body); - - - // Fold multi-line [code] sequences - $body = preg_replace('/\[\/code\]\s*\[code\]/ism', "\n", $body); - - $body = scale_external_images($body, false); - - // Setting the object type if not defined before - if (!$objecttype) { - $objecttype = ACTIVITY_OBJ_NOTE; // Default value - require_once 'include/plaintext.php'; - $objectdata = get_attached_data($body); - - if ($post["type"] == "link") { - $objecttype = ACTIVITY_OBJ_BOOKMARK; - } elseif ($post["type"] == "video") { - $objecttype = ACTIVITY_OBJ_VIDEO; - } elseif ($post["type"] == "photo") { - $objecttype = ACTIVITY_OBJ_IMAGE; - } - - } - // Look for any tags and linkify them $str_tags = ''; $inform = ''; @@ -645,6 +529,122 @@ function item_post(App $a) { $_REQUEST['origin'] = false; } + /* + * When a photo was uploaded into the message using the (profile wall) ajax + * uploader, The permissions are initially set to disallow anybody but the + * owner from seeing it. This is because the permissions may not yet have been + * set for the post. If it's private, the photo permissions should be set + * appropriately. But we didn't know the final permissions on the post until + * now. So now we'll look for links of uploaded messages that are in the + * post and set them to the same permissions as the post itself. + */ + + $match = null; + + if (!$preview && preg_match_all("/\[img([\=0-9x]*?)\](.*?)\[\/img\]/",$body,$match)) { + $images = $match[2]; + if (count($images)) { + + $objecttype = ACTIVITY_OBJ_IMAGE; + + foreach ($images as $image) { + if (! stristr($image,System::baseUrl() . '/photo/')) { + continue; + } + $image_uri = substr($image,strrpos($image,'/') + 1); + $image_uri = substr($image_uri,0, strpos($image_uri,'-')); + if (! strlen($image_uri)) { + continue; + } + $srch = '<' . intval($contact_id) . '>'; + + $r = q("SELECT `id` FROM `photo` WHERE `allow_cid` = '%s' AND `allow_gid` = '' AND `deny_cid` = '' AND `deny_gid` = '' + AND `resource-id` = '%s' AND `uid` = %d LIMIT 1", + dbesc($srch), + dbesc($image_uri), + intval($profile_uid) + ); + + if (! DBM::is_result($r)) { + continue; + } + + $r = q("UPDATE `photo` SET `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s' + WHERE `resource-id` = '%s' AND `uid` = %d AND `album` = '%s' ", + dbesc($str_contact_allow), + dbesc($str_group_allow), + dbesc($str_contact_deny), + dbesc($str_group_deny), + dbesc($image_uri), + intval($profile_uid), + dbesc( t('Wall Photos')) + ); + } + } + } + + + /* + * Next link in any attachment references we find in the post. + */ + $match = false; + + if ((! $preview) && preg_match_all("/\[attachment\](.*?)\[\/attachment\]/", $body, $match)) { + $attaches = $match[1]; + if (count($attaches)) { + foreach ($attaches as $attach) { + $r = q("SELECT * FROM `attach` WHERE `uid` = %d AND `id` = %d LIMIT 1", + intval($profile_uid), + intval($attach) + ); + if (DBM::is_result($r)) { + $r = q("UPDATE `attach` SET `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s' + WHERE `uid` = %d AND `id` = %d", + dbesc($str_contact_allow), + dbesc($str_group_allow), + dbesc($str_contact_deny), + dbesc($str_group_deny), + intval($profile_uid), + intval($attach) + ); + } + } + } + } + + // embedded bookmark or attachment in post? set bookmark flag + + $bookmark = 0; + $data = get_attachment_data($body); + if (preg_match_all("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism", $body, $match, PREG_SET_ORDER) || isset($data["type"])) { + $objecttype = ACTIVITY_OBJ_BOOKMARK; + $bookmark = 1; + } + + $body = bb_translate_video($body); + + + // Fold multi-line [code] sequences + $body = preg_replace('/\[\/code\]\s*\[code\]/ism', "\n", $body); + + $body = scale_external_images($body, false); + + // Setting the object type if not defined before + if (!$objecttype) { + $objecttype = ACTIVITY_OBJ_NOTE; // Default value + require_once 'include/plaintext.php'; + $objectdata = get_attached_data($body); + + if ($objectdata["type"] == "link") { + $objecttype = ACTIVITY_OBJ_BOOKMARK; + } elseif ($objectdata["type"] == "video") { + $objecttype = ACTIVITY_OBJ_VIDEO; + } elseif ($objectdata["type"] == "photo") { + $objecttype = ACTIVITY_OBJ_IMAGE; + } + + } + $attachments = ''; $match = false; From d38c040d50f28447209357a52c257f934bc24059 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 25 Nov 2017 21:15:50 -0500 Subject: [PATCH 135/175] Update random_string with random_bytes - Updated update.php --- include/text.php | 32 +++++++++++++++++++++----------- update.php | 2 +- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/include/text.php b/include/text.php index 616c4adb8..f49ccc8ab 100644 --- a/include/text.php +++ b/include/text.php @@ -41,18 +41,28 @@ function replace_macros($s, $r) { return $output; } +// PHP < 7 polyfill +if (!is_callable('intdiv')) { + function intdiv($a, $b) { + return ($a - $a % $b) / $b; + } +} -// random string, there are 86 characters max in text mode, 128 for hex -// output is urlsafe +/** + * @brief Generates a pseudo-random string of hexadecimal characters + * + * Only supports pair numbers of output characters. + * + * @param int $size + * @return string + */ +function random_string($size = 64) +{ + $bytes = random_bytes(intdiv((int) $size, 2)); -define('RANDOM_STRING_HEX', 0x00); -define('RANDOM_STRING_TEXT', 0x01); + $return = bin2hex($bytes); -function random_string($size = 64, $type = RANDOM_STRING_HEX) { - // generate a bit of entropy and run it through the whirlpool - $s = hash('whirlpool', (string) rand() . uniqid(rand(),true) . (string) rand(), (($type == RANDOM_STRING_TEXT) ? true : false)); - $s = (($type == RANDOM_STRING_TEXT) ? str_replace("\n", "", base64url_encode($s,true)) : $s); - return substr($s,0,$size); + return $return; } /** @@ -1147,7 +1157,7 @@ function get_mood_verbs() { /** * @brief Translate days and months names. - * + * * @param string $s String with day or month name. * @return string Translated string. */ @@ -1165,7 +1175,7 @@ function day_translate($s) { /** * @brief Translate short days and months names. - * + * * @param string $s String with short day or month name. * @return string Translated string. */ diff --git a/update.php b/update.php index 5cf9bbc2d..21074c1d8 100644 --- a/update.php +++ b/update.php @@ -616,7 +616,7 @@ function update_1075() { foreach ($r as $rr) { $found = true; do { - $guid = substr(random_string(),0,16); + $guid = random_string(16); $x = q("SELECT `uid` FROM `user` WHERE `guid` = '%s' LIMIT 1", dbesc($guid) ); From cb7648359cf0e8191d779a2ee5b6a766e8115175 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 26 Nov 2017 02:31:26 +0000 Subject: [PATCH 136/175] When we are requesting a conneczion, the contactis no longer "blocked" --- mod/contacts.php | 1 + view/templates/contact_edit.tpl | 3 ++- view/theme/frio/templates/contact_edit.tpl | 3 ++- view/theme/vier/templates/contact_edit.tpl | 3 ++- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mod/contacts.php b/mod/contacts.php index 8889e6513..35be8e79e 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -647,6 +647,7 @@ function contacts_content(App $a) { '$blocked' => (($contact['blocked']) ? t('Currently blocked') : ''), '$ignored' => (($contact['readonly']) ? t('Currently ignored') : ''), '$archived' => (($contact['archive']) ? t('Currently archived') : ''), + '$pending' => (($contact['pending']) ? t('Awaiting connection acknowledge') : ''), '$hidden' => array('hidden', t('Hide this contact from others'), ($contact['hidden'] == 1), t('Replies/likes to your public posts may still be visible')), '$notify' => array('notify', t('Notification for new posts'), ($contact['notify_new_posts'] == 1), t('Send a notification of every new post of this contact')), '$fetch_further_information' => $fetch_further_information, diff --git a/view/templates/contact_edit.tpl b/view/templates/contact_edit.tpl index 449316189..ab38a1c6c 100644 --- a/view/templates/contact_edit.tpl +++ b/view/templates/contact_edit.tpl @@ -39,7 +39,8 @@ {{if $lost_contact}}
  • {{$lost_contact}}
  • {{/if}} {{if $insecure}}
  • {{$insecure}}
  • {{/if}} - {{if $blocked}}
  • {{$blocked}}
  • {{/if}} + {{if $blocked && !$pending}}
  • {{$blocked}}
  • {{/if}} + {{if $pending}}
  • {{$pending}}
  • {{/if}} {{if $ignored}}
  • {{$ignored}}
  • {{/if}} {{if $archived}}
  • {{$archived}}
  • {{/if}} diff --git a/view/theme/frio/templates/contact_edit.tpl b/view/theme/frio/templates/contact_edit.tpl index 52f3fc545..8a202197b 100644 --- a/view/theme/frio/templates/contact_edit.tpl +++ b/view/theme/frio/templates/contact_edit.tpl @@ -52,7 +52,8 @@ {{if $lost_contact}}
  • {{$lost_contact}}
  • {{/if}} {{if $insecure}}
  • {{$insecure}}
  • {{/if}} - {{if $blocked}}
  • {{$blocked}}
  • {{/if}} + {{if $blocked && !$pending}}
  • {{$blocked}}
  • {{/if}} + {{if $pending}}
  • {{$pending}}
  • {{/if}} {{if $ignored}}
  • {{$ignored}}
  • {{/if}} {{if $archived}}
  • {{$archived}}
  • {{/if}} diff --git a/view/theme/vier/templates/contact_edit.tpl b/view/theme/vier/templates/contact_edit.tpl index 9dc11a31c..945895ba6 100644 --- a/view/theme/vier/templates/contact_edit.tpl +++ b/view/theme/vier/templates/contact_edit.tpl @@ -40,7 +40,8 @@ {{if $lost_contact}}
  • {{$lost_contact}}
  • {{/if}} {{if $insecure}}
  • {{$insecure}}
  • {{/if}} - {{if $blocked}}
  • {{$blocked}}
  • {{/if}} + {{if $blocked && !$pending}}
  • {{$blocked}}
  • {{/if}} + {{if $pending}}
  • {{$pending}}
  • {{/if}} {{if $ignored}}
  • {{$ignored}}
  • {{/if}} {{if $archived}}
  • {{$archived}}
  • {{/if}} From 2844947f5c284748ff30012fbc4caecb2c59c794 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Sun, 26 Nov 2017 04:33:21 +0100 Subject: [PATCH 137/175] tag cloud: add doxygen docu --- include/tags.php | 60 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 10 deletions(-) diff --git a/include/tags.php b/include/tags.php index 01c39d925..6c13b8296 100644 --- a/include/tags.php +++ b/include/tags.php @@ -151,7 +151,19 @@ function update_items() { dba::close($messages); } -function tagadelic($uid, $count = 0, $owner_id = 0, $flags = 0, $type = TERM_HASHTAG) { +/** + * @brief Get alphabetical sorted array of used tags/terms of an user including + * a weighting by frequency of use. + * + * @param int $uid The user ID. + * @param int $count Max number of displayed tags/terms. + * @param int $owner_id The contact id of the owner of the tagged items. + * @param string $flags Special item flags. + * @param int $type The tag/term type. + * + * @return arr Alphabetical sorted array of used tags of an user. + */ +function tagadelic($uid, $count = 0, $owner_id = 0, $flags = '', $type = TERM_HASHTAG) { require_once('include/security.php'); $item_condition = item_condition(); @@ -186,14 +198,25 @@ function tagadelic($uid, $count = 0, $owner_id = 0, $flags = 0, $type = TERM_HAS return tag_calc($r); } -function wtagblock($uid, $count = 0,$owner_id = 0, $flags = 0, $type = TERM_HASHTAG) { +/** + * @brief Construct a tag/term cloud block for an user. + * + * @param int $uid The user ID. + * @param int $count Max number of displayed tags/terms. + * @param int $owner_id The contact ID of the owner of the tagged items. + * @param string $flags Special item flags. + * @param int $type The tag/term type. + * + * @return string HTML formatted output. + */ +function wtagblock($uid, $count = 0,$owner_id = 0, $flags = '', $type = TERM_HASHTAG) { $o = ''; $r = tagadelic($uid, $count, $owner_id, $flags, $type); - if($r && $owner_id) { + if (count($r)) { $contact = dba::select( "contact", array("url"), - array("id" => $owner_id), + array("id" => $uid), array("limit" => 1) ); $url = System::removedBaseUrl($contact['url']); @@ -216,6 +239,12 @@ function wtagblock($uid, $count = 0,$owner_id = 0, $flags = 0, $type = TERM_HASH return $o; } +/** + * @brief Calculate weighting of tags according to the frequency of use. + * + * @param array $arr Array of tags/terms with tag/term name and total count of use. + * @return array Alphabetical sorted array of used tags/terms of an user. + */ function tag_calc($arr) { $tags = array(); $min = 1e9; @@ -245,23 +274,34 @@ function tag_calc($arr) { return $tags; } -function tags_sort($a,$b) { +/** + * @brief Compare function to sort tags/terms alphabetically. + * + * @param type $a + * @param type $b + * + * @return int + */ +function tags_sort($a, $b) { if (strtolower($a[0]) == strtolower($b[0])) { return 0; } - return((strtolower($a[0]) < strtolower($b[0])) ? -1 : 1); + return ((strtolower($a[0]) < strtolower($b[0])) ? -1 : 1); } - -function tagcloud_wall_widget($arr = array()) { +/** + * @brief Insert a tag cloud widget for the present profile. + * + * @param int $limit Max number of displayed tags. + * @return string HTML formattat output. + */ +function tagcloud_wall_widget($limit = 50) { $a = get_app(); if(!$a->profile['profile_uid'] || !$a->profile['url']) { return ""; } - $limit = ((array_key_exists('limit', $arr)) ? intval($arr['limit']) : 50); - if(feature_enabled($a->profile['profile_uid'], 'tagadelic')) { $owner_id = Contact::getIdForURL($a->profile['url']); From 655b2cd0d379d1b15cf432400515496c0a963d74 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Sun, 26 Nov 2017 04:36:45 +0100 Subject: [PATCH 138/175] tag cloud: clear align settings in the tagcloud widget --- view/templates/tagblock_widget.tpl | 1 + 1 file changed, 1 insertion(+) diff --git a/view/templates/tagblock_widget.tpl b/view/templates/tagblock_widget.tpl index 114d32290..fd007c9c1 100644 --- a/view/templates/tagblock_widget.tpl +++ b/view/templates/tagblock_widget.tpl @@ -9,4 +9,5 @@ {{/foreach}}
    +
    From d459a825aec07962a06841d5a51f1d1935be7aea Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 26 Nov 2017 10:58:15 +0100 Subject: [PATCH 139/175] add Ratten to the special contributors who are not found in git and messages.po files --- util/make_credits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/make_credits.py b/util/make_credits.py index 917679d4a..fb13322b1 100755 --- a/util/make_credits.py +++ b/util/make_credits.py @@ -32,7 +32,7 @@ dontinclude = ['root', 'friendica', 'bavatar', 'tony baldwin', 'Taek', 'silke m' path = os.path.abspath(argv[0].split('util/make_credits.py')[0]) print('> base directory is assumed to be: '+path) # a place to store contributors -contributors = ["Andi Stadler", "Vít Šesták 'v6ak'"] +contributors = ["Andi Stadler", "Ratten", "Vít Šesták 'v6ak'"] # get the contributors print('> getting contributors to the friendica core repository') p = subprocess.Popen(['git', 'shortlog', '--no-merges', '-s'], From 6cb637e8abc94072fdae165d7a1b1af292f59685 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 26 Nov 2017 11:31:07 +0000 Subject: [PATCH 140/175] Default features should now work with the forumwidget again --- include/features.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/include/features.php b/include/features.php index ade93a18e..f2a81fc6e 100644 --- a/include/features.php +++ b/include/features.php @@ -16,14 +16,10 @@ use Friendica\Core\PConfig; function feature_enabled($uid, $feature) { $x = Config::get('feature_lock', $feature, false); - if (!$x) { - $x = PConfig::get($uid, 'feature', $feature, false); - if (!$x) { - $x = Config::get('feature', $feature, false); - if (!$x) { - $x = get_feature_default($feature); - } - } + if ($x === false) { + $x = get_feature_default($feature); + $x = Config::get('feature', $feature, $x); + $x = PConfig::get($uid, 'feature', $feature, $x); } $arr = array('uid' => $uid, 'feature' => $feature, 'enabled' => $x); @@ -125,10 +121,9 @@ function get_features($filtered = true) { $kquantity = count($arr[$k]); for ($y = 0; $y < $kquantity; $y ++) { if (is_array($arr[$k][$y])) { - if (!$arr[$k][$y][4]) { + if ($arr[$k][$y][4] === false) { $has_items = true; - } - else { + } else { unset($arr[$k][$y]); } } From 774a7193d2e09392eb7659aa95546d1043d25776 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 26 Nov 2017 11:43:02 +0000 Subject: [PATCH 141/175] Added clarification --- src/Core/Config.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Core/Config.php b/src/Core/Config.php index 219831ad9..a1ea5ae1f 100644 --- a/src/Core/Config.php +++ b/src/Core/Config.php @@ -13,13 +13,14 @@ use dba; /** * @brief Arbitrary sytem configuration storage - * Note: - * Please do not store booleans - convert to 0/1 integer values - * The Config::get() functions return boolean false for keys that are unset, - * and this could lead to subtle bugs. * - * There are a few places in the code (such as the admin panel) where boolean - * configurations need to be fixed as of 10/08/2011. + * Note: + * If we ever would decide to return exactly the variable type as entered, + * we will have fun with the additional features. :-) + * + * The config class always returns strings but in the default features + * we use a "false" to determine if the config value isn't set. + * */ class Config { From d5c38b9fc9c51112d3870d7237121840eb0e2d99 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 26 Nov 2017 07:57:29 -0500 Subject: [PATCH 142/175] Add odd number of character support to random_string() --- include/text.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/include/text.php b/include/text.php index f49ccc8ab..5df1d65ce 100644 --- a/include/text.php +++ b/include/text.php @@ -41,26 +41,19 @@ function replace_macros($s, $r) { return $output; } -// PHP < 7 polyfill -if (!is_callable('intdiv')) { - function intdiv($a, $b) { - return ($a - $a % $b) / $b; - } -} - /** * @brief Generates a pseudo-random string of hexadecimal characters * - * Only supports pair numbers of output characters. - * * @param int $size * @return string */ function random_string($size = 64) { - $bytes = random_bytes(intdiv((int) $size, 2)); + $byte_size = ceil($size / 2); - $return = bin2hex($bytes); + $bytes = random_bytes($byte_size); + + $return = substr(bin2hex($bytes), 0, $size); return $return; } From e4995dbad569673b7e4c5bbbb06b1c34f9bae063 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 26 Nov 2017 13:12:54 +0000 Subject: [PATCH 143/175] Good looking and better performance --- include/features.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/features.php b/include/features.php index f2a81fc6e..4e9e7d9d9 100644 --- a/include/features.php +++ b/include/features.php @@ -16,10 +16,14 @@ use Friendica\Core\PConfig; function feature_enabled($uid, $feature) { $x = Config::get('feature_lock', $feature, false); + if ($x === false) { + $x = PConfig::get($uid, 'feature', $feature, false); + } + if ($x === false) { + $x = Config::get('feature', $feature, false); + } if ($x === false) { $x = get_feature_default($feature); - $x = Config::get('feature', $feature, $x); - $x = PConfig::get($uid, 'feature', $feature, $x); } $arr = array('uid' => $uid, 'feature' => $feature, 'enabled' => $x); From f059b33390a00170fc240c93398f5f10cd0d6e1c Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 26 Nov 2017 13:58:24 +0000 Subject: [PATCH 144/175] Avoid empty user export when there are UTF8 problems --- mod/uexport.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/uexport.php b/mod/uexport.php index 2ada9bc28..5a897f4ab 100644 --- a/mod/uexport.php +++ b/mod/uexport.php @@ -126,7 +126,7 @@ function uexport_account($a) { ); //echo "
    "; var_dump(json_encode($output)); killme();
    -	echo json_encode($output);
    +	echo json_encode($output, JSON_PARTIAL_OUTPUT_ON_ERROR);
     }
     
     /**
    @@ -154,6 +154,6 @@ function uexport_all(App $a) {
     		);
     
     		$output = array('item' => $r);
    -		echo json_encode($output) . "\n";
    +		echo json_encode($output, JSON_PARTIAL_OUTPUT_ON_ERROR). "\n";
     	}
     }
    
    From 2bf8ebaab9924dbe092b6a2c5c712956ce45f145 Mon Sep 17 00:00:00 2001
    From: Tobias Diekershoff 
    Date: Sun, 26 Nov 2017 15:19:40 +0100
    Subject: [PATCH 145/175] this and should be an or
    
    ---
     doc/Developers-Intro.md | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/doc/Developers-Intro.md b/doc/Developers-Intro.md
    index be44e8187..0707d5ba5 100644
    --- a/doc/Developers-Intro.md
    +++ b/doc/Developers-Intro.md
    @@ -126,7 +126,7 @@ If you want to get involved here:
     * Look at the first steps that were made (e.g. the clean theme).
     Ask us to find out whom to talk to about their experiences.
     * Talk to design people if you know any.
    -* Let us know about your plans [in the dev forum](https://forum.friendi.ca/profile/developers) and the [theme developer forum](https://friendica.eu/profile/ftdevs).
    +* Let us know about your plans [in the dev forum](https://forum.friendi.ca/profile/developers) or the [theme developer forum](https://friendica.eu/profile/ftdevs).
     Do not worry about cross-posting.
     
     ###Client software
    
    From ac6b191976226918c898c0e62ca7cb606652bf34 Mon Sep 17 00:00:00 2001
    From: rabuzarus <>
    Date: Sun, 26 Nov 2017 16:14:16 +0100
    Subject: [PATCH 146/175] tag cloud: use dba for db request
    
    ---
     include/tags.php | 18 +++++++++---------
     1 file changed, 9 insertions(+), 9 deletions(-)
    
    diff --git a/include/tags.php b/include/tags.php
    index 6c13b8296..7ea15f0b9 100644
    --- a/include/tags.php
    +++ b/include/tags.php
    @@ -168,7 +168,8 @@ function tagadelic($uid, $count = 0, $owner_id = 0, $flags = '', $type = TERM_HA
     
     	$item_condition = item_condition();
     	$sql_options = item_permissions_sql($uid);
    -	$count = intval($count);
    +	$limit = $count ? sprintf("LIMIT %d", intval($count)) : "";
    +
     	if ($flags) {
     		if ($flags === 'wall') {
     			$sql_options .= " AND `item`.`wall` ";
    @@ -180,16 +181,15 @@ function tagadelic($uid, $count = 0, $owner_id = 0, $flags = '', $type = TERM_HA
     	}
     
     	// Fetch tags
    -	$r = q("SELECT `term`, COUNT(`term`) AS `total` FROM `term`
    +	$r = dba::p("SELECT `term`, COUNT(`term`) AS `total` FROM `term`
     		LEFT JOIN `item` ON `term`.`oid` = `item`.`id`
    -		WHERE `term`.`uid` = %d AND `term`.`type` = %d
    -		AND `term`.`otype` = %d
    +		WHERE `term`.`uid` = ? AND `term`.`type` = ?
    +		AND `term`.`otype` = ?
     		AND $item_condition $sql_options
    -		GROUP BY `term` ORDER BY `total` DESC %s",
    -		intval($uid),
    -		intval($type),
    -		intval(TERM_OBJ_POST),
    -		((intval($count)) ? "LIMIT $count" : '')
    +		GROUP BY `term` ORDER BY `total` DESC ? $limit",
    +		$uid,
    +		$type,
    +		TERM_OBJ_POST
     	);
     	if(!DBM::is_result($r)) {
     		return array();
    
    From 7d8370a17829c260dbf4a7623aed10d37b1f3420 Mon Sep 17 00:00:00 2001
    From: rabuzarus <>
    Date: Sun, 26 Nov 2017 16:24:26 +0100
    Subject: [PATCH 147/175] tag cloud: fix query
    
    ---
     include/tags.php | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/include/tags.php b/include/tags.php
    index 7ea15f0b9..ba8770e6f 100644
    --- a/include/tags.php
    +++ b/include/tags.php
    @@ -186,7 +186,7 @@ function tagadelic($uid, $count = 0, $owner_id = 0, $flags = '', $type = TERM_HA
     		WHERE `term`.`uid` = ? AND `term`.`type` = ?
     		AND `term`.`otype` = ?
     		AND $item_condition $sql_options
    -		GROUP BY `term` ORDER BY `total` DESC ? $limit",
    +		GROUP BY `term` ORDER BY `total` DESC $limit",
     		$uid,
     		$type,
     		TERM_OBJ_POST
    
    From 661f9af93ad92cb2c3e5a267f808c13661868495 Mon Sep 17 00:00:00 2001
    From: Michael 
    Date: Sun, 26 Nov 2017 16:17:32 +0000
    Subject: [PATCH 148/175] Network page: Selecting a forum overrides the group
     selection
    
    ---
     mod/network.php | 10 ++++++----
     1 file changed, 6 insertions(+), 4 deletions(-)
    
    diff --git a/mod/network.php b/mod/network.php
    index f58fad6fd..64863b080 100644
    --- a/mod/network.php
    +++ b/mod/network.php
    @@ -39,12 +39,17 @@ function network_init(App $a) {
     	}
     
     	$is_a_date_query = false;
    +
    +	$group_id = (($a->argc > 1 && is_numeric($a->argv[1])) ? intval($a->argv[1]) : 0);
    +
     	if (x($_GET, 'cid') && intval($_GET['cid']) != 0) {
     		$cid = $_GET['cid'];
     		$_GET['nets'] = 'all';
    -
    +		$group_id = 0;
     	}
     
    +	PConfig::set(local_user(), 'network.view', 'group.selected', $group_id);
    +
     	if ($a->argc > 1) {
     		for ($x = 1; $x < $a->argc; $x ++) {
     			if (is_a_date_arg($a->argv[$x])) {
    @@ -145,9 +150,6 @@ function network_init(App $a) {
     		unset($_GET['nets']);
     	}
     
    -	$group_id = (($a->argc > 1 && is_numeric($a->argv[1])) ? intval($a->argv[1]) : 0);
    -
    -	PConfig::set(local_user(), 'network.view', 'group.selected', $group_id);
     
     	if (!x($a->page, 'aside')) {
     		$a->page['aside'] = '';
    
    From 90a8ae2cb8335f7260e9301e4fe057f64e55f3b4 Mon Sep 17 00:00:00 2001
    From: Hypolite Petovan 
    Date: Sun, 26 Nov 2017 14:18:45 -0500
    Subject: [PATCH 149/175] Fix formatting
    
    - include/auth.php
    - include/oauth.php
    - include/user.php
    - mod/removeme.php
    - src/Worker/Queue.php
    ---
     include/auth.php     | 88 +++++++++++++++++++------------------------
     include/oauth.php    | 90 --------------------------------------------
     include/user.php     | 15 ++++----
     mod/removeme.php     | 20 +++++-----
     src/Worker/Queue.php | 34 +++++++++--------
     5 files changed, 73 insertions(+), 174 deletions(-)
    
    diff --git a/include/auth.php b/include/auth.php
    index f852ea28a..90509468c 100644
    --- a/include/auth.php
    +++ b/include/auth.php
    @@ -5,8 +5,8 @@ use Friendica\Core\System;
     use Friendica\Core\Config;
     use Friendica\Database\DBM;
     
    -require_once('include/security.php');
    -require_once('include/datetime.php');
    +require_once 'include/security.php';
    +require_once 'include/datetime.php';
     
     // When the "Friendica" cookie is set, take the value to authenticate and renew the cookie.
     if (isset($_COOKIE["Friendica"])) {
    @@ -19,7 +19,7 @@ if (isset($_COOKIE["Friendica"])) {
     
     		if ($r) {
     			if ($data->hash != cookie_hash($r[0])) {
    -				logger("Hash for user ".$data->uid." doesn't fit.");
    +				logger("Hash for user " . $data->uid . " doesn't fit.");
     				nuke_session();
     				goaway(System::baseUrl());
     			}
    @@ -28,14 +28,15 @@ if (isset($_COOKIE["Friendica"])) {
     			// Expires after 7 days by default,
     			// can be set via system.auth_cookie_lifetime
     			$authcookiedays = Config::get('system', 'auth_cookie_lifetime', 7);
    -			new_cookie($authcookiedays*24*60*60, $r[0]);
    +			new_cookie($authcookiedays * 24 * 60 * 60, $r[0]);
     
     			// Do the authentification if not done by now
     			if (!isset($_SESSION) || !isset($_SESSION['authenticated'])) {
     				authenticate_success($r[0]);
     
    -				if (Config::get('system','paranoia'))
    +				if (Config::get('system', 'paranoia')) {
     					$_SESSION['addr'] = $data->ip;
    +				}
     			}
     		}
     	}
    @@ -44,18 +45,16 @@ if (isset($_COOKIE["Friendica"])) {
     
     // login/logout
     
    -if (isset($_SESSION) && x($_SESSION,'authenticated') && (!x($_POST,'auth-params') || ($_POST['auth-params'] !== 'login'))) {
    -
    -	if ((x($_POST,'auth-params') && ($_POST['auth-params'] === 'logout')) || ($a->module === 'logout')) {
    -
    +if (isset($_SESSION) && x($_SESSION, 'authenticated') && (!x($_POST, 'auth-params') || ($_POST['auth-params'] !== 'login'))) {
    +	if ((x($_POST, 'auth-params') && ($_POST['auth-params'] === 'logout')) || ($a->module === 'logout')) {
     		// process logout request
     		call_hooks("logging_out");
     		nuke_session();
    -		info(t('Logged out.').EOL);
    +		info(t('Logged out.') . EOL);
     		goaway(System::baseUrl());
     	}
     
    -	if (x($_SESSION,'visitor_id') && !x($_SESSION,'uid')) {
    +	if (x($_SESSION, 'visitor_id') && !x($_SESSION, 'uid')) {
     		$r = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1",
     			intval($_SESSION['visitor_id'])
     		);
    @@ -64,15 +63,13 @@ if (isset($_SESSION) && x($_SESSION,'authenticated') && (!x($_POST,'auth-params'
     		}
     	}
     
    -	if (x($_SESSION,'uid')) {
    -
    +	if (x($_SESSION, 'uid')) {
     		// already logged in user returning
    -
    -		$check = Config::get('system','paranoia');
    +		$check = Config::get('system', 'paranoia');
     		// extra paranoia - if the IP changed, log them out
     		if ($check && ($_SESSION['addr'] != $_SERVER['REMOTE_ADDR'])) {
    -			logger('Session address changed. Paranoid setting in effect, blocking session. '.
    -				$_SESSION['addr'].' != '.$_SERVER['REMOTE_ADDR']);
    +			logger('Session address changed. Paranoid setting in effect, blocking session. ' .
    +				$_SESSION['addr'] . ' != ' . $_SERVER['REMOTE_ADDR']);
     			nuke_session();
     			goaway(System::baseUrl());
     		}
    @@ -91,61 +88,54 @@ if (isset($_SESSION) && x($_SESSION,'authenticated') && (!x($_POST,'auth-params'
     		// stays logged in for a long time, e.g. with "Remember Me"
     		$login_refresh = false;
     		if (!x($_SESSION['last_login_date'])) {
    -			$_SESSION['last_login_date'] = datetime_convert('UTC','UTC');
    +			$_SESSION['last_login_date'] = datetime_convert('UTC', 'UTC');
     		}
    -		if (strcmp(datetime_convert('UTC','UTC','now - 12 hours'), $_SESSION['last_login_date']) > 0) {
    -
    -			$_SESSION['last_login_date'] = datetime_convert('UTC','UTC');
    +		if (strcmp(datetime_convert('UTC', 'UTC', 'now - 12 hours'), $_SESSION['last_login_date']) > 0) {
    +			$_SESSION['last_login_date'] = datetime_convert('UTC', 'UTC');
     			$login_refresh = true;
     		}
     		authenticate_success($r[0], false, false, $login_refresh);
     	}
     } else {
    -
     	session_unset();
    +	if (x($_POST, 'password') && strlen($_POST['password'])) {
    +		$encrypted = hash('whirlpool', trim($_POST['password']));
    +	} else {
    +		if ((x($_POST, 'openid_url')) && strlen($_POST['openid_url']) ||
    +			(x($_POST, 'username')) && strlen($_POST['username'])) {
     
    -	if (x($_POST,'password') && strlen($_POST['password']))
    -		$encrypted = hash('whirlpool',trim($_POST['password']));
    -	else {
    -		if ((x($_POST,'openid_url')) && strlen($_POST['openid_url']) ||
    -		   (x($_POST,'username')) && strlen($_POST['username'])) {
    +			$noid = Config::get('system', 'no_openid');
     
    -			$noid = Config::get('system','no_openid');
    -
    -			$openid_url = trim((strlen($_POST['openid_url'])?$_POST['openid_url']:$_POST['username']));
    +			$openid_url = trim((strlen($_POST['openid_url']) ? $_POST['openid_url'] : $_POST['username']));
     
     			// validate_url alters the calling parameter
    -
     			$temp_string = $openid_url;
     
     			// if it's an email address or doesn't resolve to a URL, fail.
    -
    -			if ($noid || strpos($temp_string,'@') || !validate_url($temp_string)) {
    +			if ($noid || strpos($temp_string, '@') || !validate_url($temp_string)) {
     				$a = get_app();
    -				notice(t('Login failed.').EOL);
    +				notice(t('Login failed.') . EOL);
     				goaway(System::baseUrl());
     				// NOTREACHED
     			}
     
     			// Otherwise it's probably an openid.
    -
     			try {
     				require_once('library/openid.php');
     				$openid = new LightOpenID;
     				$openid->identity = $openid_url;
     				$_SESSION['openid'] = $openid_url;
     				$_SESSION['remember'] = $_POST['remember'];
    -				$openid->returnUrl = System::baseUrl(true).'/openid';
    +				$openid->returnUrl = System::baseUrl(true) . '/openid';
     				goaway($openid->authUrl());
     			} catch (Exception $e) {
    -				notice(t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.').'

    '.t('The error message was:').' '.$e->getMessage()); + notice(t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.') . '

    ' . t('The error message was:') . ' ' . $e->getMessage()); } // NOTREACHED } } - if (x($_POST,'auth-params') && $_POST['auth-params'] === 'login') { - + if (x($_POST, 'auth-params') && $_POST['auth-params'] === 'login') { $record = null; $addon_auth = array( @@ -162,12 +152,11 @@ if (isset($_SESSION) && x($_SESSION,'authenticated') && (!x($_POST,'auth-params' * and later plugins should not interfere with an earlier one that succeeded. * */ - call_hooks('authenticate', $addon_auth); - if ($addon_auth['authenticated'] && count($addon_auth['user_record'])) + if ($addon_auth['authenticated'] && count($addon_auth['user_record'])) { $record = $addon_auth['user_record']; - else { + } else { // process normal login request @@ -178,23 +167,24 @@ if (isset($_SESSION) && x($_SESSION,'authenticated') && (!x($_POST,'auth-params' dbesc(trim($_POST['username'])), dbesc($encrypted) ); - if (DBM::is_result($r)) + if (DBM::is_result($r)) { $record = $r[0]; + } } if (!$record || !count($record)) { - logger('authenticate: failed login attempt: '.notags(trim($_POST['username'])).' from IP '.$_SERVER['REMOTE_ADDR']); - notice(t('Login failed.').EOL); + logger('authenticate: failed login attempt: ' . notags(trim($_POST['username'])) . ' from IP ' . $_SERVER['REMOTE_ADDR']); + notice(t('Login failed.') . EOL); goaway(System::baseUrl()); } - if (! $_POST['remember']) { + if (!$_POST['remember']) { new_cookie(0); // 0 means delete on browser exit } // if we haven't failed up this point, log them in. $_SESSION['remember'] = $_POST['remember']; - $_SESSION['last_login_date'] = datetime_convert('UTC','UTC'); + $_SESSION['last_login_date'] = datetime_convert('UTC', 'UTC'); authenticate_success($record, true, true); } } @@ -202,8 +192,8 @@ if (isset($_SESSION) && x($_SESSION,'authenticated') && (!x($_POST,'auth-params' /** * @brief Kills the "Friendica" cookie and all session data */ -function nuke_session() { - +function nuke_session() +{ new_cookie(-3600); // make sure cookie is deleted on browser close, as a security measure session_unset(); session_destroy(); diff --git a/include/oauth.php b/include/oauth.php index c6993d05b..8834b9355 100644 --- a/include/oauth.php +++ b/include/oauth.php @@ -182,93 +182,3 @@ class FKOAuth1 extends OAuthServer { } } -/* -class FKOAuth2 extends OAuth2 { - - private function db_secret($client_secret){ - return hash('whirlpool',$client_secret); - } - - public function addClient($client_id, $client_secret, $redirect_uri) { - $client_secret = $this->db_secret($client_secret); - $r = q("INSERT INTO clients (client_id, pw, redirect_uri) VALUES ('%s', '%s', '%s')", - dbesc($client_id), - dbesc($client_secret), - dbesc($redirect_uri) - ); - - return $r; - } - - protected function checkClientCredentials($client_id, $client_secret = NULL) { - $client_secret = $this->db_secret($client_secret); - - $r = q("SELECT pw FROM clients WHERE client_id = '%s'", - dbesc($client_id)); - - if ($client_secret === NULL) - return $result !== FALSE; - - return $result["client_secret"] == $client_secret; - } - - protected function getRedirectUri($client_id) { - $r = q("SELECT redirect_uri FROM clients WHERE client_id = '%s'", - dbesc($client_id)); - if ($r === FALSE) - return FALSE; - - return isset($r[0]["redirect_uri"]) && $r[0]["redirect_uri"] ? $r[0]["redirect_uri"] : NULL; - } - - protected function getAccessToken($oauth_token) { - $r = q("SELECT client_id, expires, scope FROM tokens WHERE id = '%s'", - dbesc($oauth_token)); - - if (DBM::is_result($r)) - return $r[0]; - return null; - } - - - - protected function setAccessToken($oauth_token, $client_id, $expires, $scope = NULL) { - $r = q("INSERT INTO tokens (id, client_id, expires, scope) VALUES ('%s', '%s', %d, '%s')", - dbesc($oauth_token), - dbesc($client_id), - intval($expires), - dbesc($scope)); - - return $r; - } - - protected function getSupportedGrantTypes() { - return array( - OAUTH2_GRANT_TYPE_AUTH_CODE, - ); - } - - - protected function getAuthCode($code) { - $r = q("SELECT id, client_id, redirect_uri, expires, scope FROM auth_codes WHERE id = '%s'", - dbesc($code)); - - if (DBM::is_result($r)) - return $r[0]; - return null; - } - - protected function setAuthCode($code, $client_id, $redirect_uri, $expires, $scope = NULL) { - $r = q("INSERT INTO auth_codes - (id, client_id, redirect_uri, expires, scope) VALUES - ('%s', '%s', '%s', %d, '%s')", - dbesc($code), - dbesc($client_id), - dbesc($redirect_uri), - intval($expires), - dbesc($scope)); - return $r; - } - -} -*/ diff --git a/include/user.php b/include/user.php index be03637df..d82671b86 100644 --- a/include/user.php +++ b/include/user.php @@ -4,13 +4,12 @@ use Friendica\Core\Config; use Friendica\Core\System; use Friendica\Database\DBM; -require_once('include/network.php'); -require_once('include/plugin.php'); -require_once('include/text.php'); -require_once('include/pgettext.php'); -require_once('include/datetime.php'); -require_once('include/enotify.php'); - +require_once 'include/network.php'; +require_once 'include/plugin.php'; +require_once 'include/text.php'; +require_once 'include/pgettext.php'; +require_once 'include/datetime.php'; +require_once 'include/enotify.php'; function create_user($arr) { @@ -388,7 +387,7 @@ function user_create_self_contact($uid) { * @param string $email * @param string $sitename * @param string $username - * @return NULL|boolean from notification() and email() inherited + * @return NULL|boolean from notification() and email() inherited */ function send_register_pending_eml($email, $sitename, $username) { $body = deindent(t(' diff --git a/mod/removeme.php b/mod/removeme.php index b1ad2e5ca..2f4349a70 100644 --- a/mod/removeme.php +++ b/mod/removeme.php @@ -4,21 +4,21 @@ use Friendica\App; use Friendica\Core\System; use Friendica\Model\User; -function removeme_post(App $a) { - - if (! local_user()) { +function removeme_post(App $a) +{ + if (!local_user()) { return; } - if (x($_SESSION,'submanage') && intval($_SESSION['submanage'])) { + if (x($_SESSION, 'submanage') && intval($_SESSION['submanage'])) { return; } - if ((! x($_POST,'qxz_password')) || (! strlen(trim($_POST['qxz_password'])))) { + if ((!x($_POST, 'qxz_password')) || (!strlen(trim($_POST['qxz_password'])))) { return; } - if ((! x($_POST,'verify')) || (! strlen(trim($_POST['verify'])))) { + if ((!x($_POST, 'verify')) || (!strlen(trim($_POST['verify'])))) { return; } @@ -32,12 +32,11 @@ function removeme_post(App $a) { User::remove($a->user['uid']); // NOTREACHED } - } -function removeme_content(App $a) { - - if (! local_user()) { +function removeme_content(App $a) +{ + if (!local_user()) { goaway(System::baseUrl()); } @@ -59,5 +58,4 @@ function removeme_content(App $a) { )); return $o; - } diff --git a/src/Worker/Queue.php b/src/Worker/Queue.php index c15ccfb98..73726098e 100644 --- a/src/Worker/Queue.php +++ b/src/Worker/Queue.php @@ -1,4 +1,5 @@ PRIORITY_LOW, 'dont_fork' => true), "Queue", (int)$q_item['id']); + logger('Call queue for id ' . $q_item['id']); + Worker::add(array('priority' => PRIORITY_LOW, 'dont_fork' => true), "Queue", (int) $q_item['id']); } } return; @@ -88,10 +90,10 @@ class Queue { return; } - $dead = Cache::get($cachekey_deadguy.$c[0]['notify']); + $dead = Cache::get($cachekey_deadguy . $c[0]['notify']); if (!is_null($dead) && $dead) { - logger('queue: skipping known dead url: '.$c[0]['notify']); + logger('queue: skipping known dead url: ' . $c[0]['notify']); update_queue_time($q_item['id']); return; } @@ -99,17 +101,17 @@ class Queue { $server = PortableContact::detectServer($c[0]['url']); if ($server != "") { - $vital = Cache::get($cachekey_server.$server); + $vital = Cache::get($cachekey_server . $server); if (is_null($vital)) { - logger("Check server ".$server." (".$c[0]["network"].")"); + logger("Check server " . $server . " (" . $c[0]["network"] . ")"); $vital = PortableContact::checkServer($server, $c[0]["network"], true); - Cache::set($cachekey_server.$server, $vital, CACHE_QUARTER_HOUR); + Cache::set($cachekey_server . $server, $vital, CACHE_QUARTER_HOUR); } if (!is_null($vital) && !$vital) { - logger('queue: skipping dead server: '.$server); + logger('queue: skipping dead server: ' . $server); update_queue_time($q_item['id']); return; } @@ -134,24 +136,24 @@ class Queue { switch ($contact['network']) { case NETWORK_DFRN: - logger('queue: dfrndelivery: item '.$q_item['id'].' for '.$contact['name'].' <'.$contact['url'].'>'); + 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']); - Cache::set($cachekey_deadguy.$contact['notify'], true, CACHE_QUARTER_HOUR); + Cache::set($cachekey_deadguy . $contact['notify'], true, CACHE_QUARTER_HOUR); } else { remove_queue_item($q_item['id']); } break; case NETWORK_OSTATUS: if ($contact['notify']) { - logger('queue: slapdelivery: item '.$q_item['id'].' for '.$contact['name'].' <'.$contact['url'].'>'); + logger('queue: slapdelivery: item ' . $q_item['id'] . ' for ' . $contact['name'] . ' <' . $contact['url'] . '>'); $deliver_status = slapper($owner, $contact['notify'], $data); if ($deliver_status == (-1)) { update_queue_time($q_item['id']); - Cache::set($cachekey_deadguy.$contact['notify'], true, CACHE_QUARTER_HOUR); + Cache::set($cachekey_deadguy . $contact['notify'], true, CACHE_QUARTER_HOUR); } else { remove_queue_item($q_item['id']); } @@ -159,12 +161,12 @@ class Queue { break; case NETWORK_DIASPORA: if ($contact['notify']) { - logger('queue: diaspora_delivery: item '.$q_item['id'].' for '.$contact['name'].' <'.$contact['url'].'>'); + 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)) { update_queue_time($q_item['id']); - Cache::set($cachekey_deadguy.$contact['notify'], true, CACHE_QUARTER_HOUR); + Cache::set($cachekey_deadguy . $contact['notify'], true, CACHE_QUARTER_HOUR); } else { remove_queue_item($q_item['id']); } @@ -182,7 +184,7 @@ class Queue { } break; } - logger('Deliver status '.(int)$deliver_status.' for item '.$q_item['id'].' to '.$contact['name'].' <'.$contact['url'].'>'); + logger('Deliver status ' . (int) $deliver_status . ' for item ' . $q_item['id'] . ' to ' . $contact['name'] . ' <' . $contact['url'] . '>'); return; } From 483603e77cd5e6c216213b54f1ef0b241cfaf5aa Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 26 Nov 2017 14:25:25 -0500 Subject: [PATCH 150/175] Add User::authenticate() --- src/Model/User.php | 51 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/src/Model/User.php b/src/Model/User.php index 01bcce28d..a7f59b6a3 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -1,22 +1,71 @@ $user_info, + 'blocked' => 0, + 'account_expired' => 0, + 'account_removed' => 0, + 'verified' => 1 + ], + ['limit' => 1] + ); + } elseif (is_string($user_info)) { + $user = dba::fetch_first('SELECT `uid`, `password` + FROM `user` + WHERE (`email` = ? OR `username` = ? OR `nickname` = ?) + AND `blocked` = 0 + AND `account_expired` = 0 + AND `account_removed` = 0 + AND `verified` = 1 + LIMIT 1', + $user_info, + $user_info, + $user_info + ); + } else { + $user = $user_info; + } + + if (!DBM::isResult($user) || !isset($user['uid']) || !isset($user['password'])) { + return false; + } + + $password_hashed = hash('whirlpool', $password); + + if ($password_hashed !== $user['password']) { + return false; + } + + return $user['uid']; + } + /** * @param object $uid user to remove * @return void From 7a8fb79fc5f348c0e3c6949eb60c82157cf870a1 Mon Sep 17 00:00:00 2001 From: hoergen Date: Sun, 26 Nov 2017 20:45:17 +0100 Subject: [PATCH 151/175] Adding new stylesheet to theme vier. It aims a more clean visual --- view/theme/vier/plusminus.css | 363 ++++++++++++++++++++++++++++++++++ 1 file changed, 363 insertions(+) create mode 100644 view/theme/vier/plusminus.css diff --git a/view/theme/vier/plusminus.css b/view/theme/vier/plusminus.css new file mode 100644 index 000000000..6829487d6 --- /dev/null +++ b/view/theme/vier/plusminus.css @@ -0,0 +1,363 @@ + + +/* Modifications by https://horche.demkontinuum.de/profile/hoergen */ +h1 { + font-size: 18px; + color: blue; +} + +h2 { + font-size: 16px; + color: blue; + background-color: whitesmoke; +/* background-color: #ededed; */ +} + +h3 { + font-size: 14px; + color: blue; +} +h4 { font-size: 14px;} + +.settings-heading { + + font-size: 18px; + color: black; + font-weight: bold; + background-color: #cfcece; +} + +.setings-contend-block { + background-color: white; +} + +#settings-form { + background-color: whitesmoke; +} + +nav { + background: #fff; + box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.15); + padding-top: 6px; + padding-bottom: 6px; +} + +nav a:active, +nav a:link, +nav a:visited, +nav a { + color: #737373; +} + +nav a:hover, +#nav-messages-see-all a:hover { + color: #000; +} + +.manage-notify { + background-color: #CB4437; + border-radius: 10px; + font: bold 11px/16px Arial; +} + +nav .nav-notify { +/* background-color: #427FED; */ + background-color: #CB4437; + top: -3px; + right: -4px; + font: bold 11px/16px Arial; + padding: 1px; + border-radius: 10px; +} + +nav .nav-menu-icon .nav-notify { + top: 0px; +} + +nav .nav-menu.selected a { + color: #000; +/* font-weight: bold; */ +} + +nav .nav-menu:hover, +nav .nav-menu.selected { + border-bottom: 2px solid #427FED; +} + +nav .nav-menu { + height: 23px; + font-size: 14px; + font-weight: initial; +} + +#nav-apps-menu, +#nav-site-menu, +#nav-notifications-menu, +#nav-user-menu { + top: 32px; +} + +#nav-messages-menu { + top: 32px; +} + +#nav-messages-see-all a { + color: #737373; +} + +ul.tabs li .active, span.pager_current a { + border-bottom: 2px solid #427FED; +} + +span.pager_current, span.pager_n a:hover, +span.pager_first a:hover, span.pager_last a:hover, +span.pager_prev a:hover, span.pager_next a:hover, +ul.tabs a:hover { + border-bottom: 2px solid #427FED; +} + +nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-linkmenu.selected .icon.s22.notify { + color: #737373; +} + +nav #nav-messages-linkmenu.selected, +nav #nav-user-linklabel.selected, +nav #nav-apps-link.selected { + background-color: #fff; + border-bottom-style: none; +} + +div.jGrowl div.info { + background: #fff url("../../../images/icons/48/info.png") no-repeat 5px center; +} + +div.jGrowl div.notice { + color: #737373; +} +div.jGrowl div.info { + color: #737373; +} + +.birthday-notice, .event-notice { + font-weight: initial; +} + +div.pager, ul.tabs { + font-weight: initial; +} + +nav .nav-menu-icon.selected { + background-color: #fff; +} + +#jot #jot-tools li:hover { + background-color: #fff; +} + +nav .icon { + color: #737373; +} + +nav a:hover .icon { + color: #000; +} + +ul.menu-popup { + border: 0px solid #FFF; + margin-top: 0px; +} + +header #banner a, header #banner a:active, header #banner a:visited, header #banner a:link, header #banner a:hover { + color: #737373; +} + +header { + left: 10px; +} + +header #banner { + margin-top: 6px; +} + +#banner #logo-text { + margin-left: 5px; +} + +aside { + top: 44px; + height: calc(100% - 54px); +} + +right_aside { + top: 44px; +} + +section { + top: 44px; +} + +nav #nav-search-box #nav-search-text { + background-color: initial; + border-style: solid; + border-width: 1px; + border-color: rgba(0, 0, 0, 0.15); +} + +.widget h3 { + padding: 0px; + margin: 0px; + font-size: 14px; + font-weight: initial; + background-color: #EEEEEE; +} + +.wall-item-container .wall-item-name, +.wall-item-container .shared-author { + color: #AAA; + font-weight: normal; + font-size:13px; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} + +.toplevel_item:hover .wall-item-name, +.wall-item-container:hover .wall-item-name, +.toplevel_item:hover .shared-author, +.wall-item-container:hover .shared-author { + color: #36c; + font-weight: normal; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} + +.wall-item-like { + font-size:12px; +} + + +.wall-item-actions-autho{ + font-size:12px; + font-weight:normal; + margin-bottom: -0.7em; +} + +.wall-item-tags { + font-size:12px; +} + +.wall-item-container.comment .contact-photo { height:25px; width:25px;} + +#item-delete-selected { + font-size:12px; +} + +.item-select { + width: 1px; + height: 1px; + background: #000; + position: relative; + border-radius: 9px; +} + + +.contact-menu { + font-size:12px; + padding-top:0px; + padding-bottom:0px; +} + + +.wall-item-bottom { + font-size: 14px; +} + +.hide-comments-outer { + margin-left: 80px; + margin-bottom: 5px; + width: 660px; + border-bottom: 1px solid #BDCDD4; + border-top: 1px solid #BDCDD4; + font-size: 10px; + padding: 8px; +} + + +.fakelink { + color: #36c; + /* color: #3e3e8c; */ + /* color: #3465A4; */ + /* color: #3E3E8C; */ + text-decoration: none; + font-size: 10px; + cursor: pointer; +} + +/* Calendar */ +.fc-body { + background-color: white; +} + +.fc-content, .fc-widget { + background-color: #a7ecff; + color: black; + text-decoration: normal; +} + +.fc-toolbar { + text-align: center; + margin-bottom: 1em; + background: white; +}:wq + + +.fc-day-grid-event .fc-time { + font-weight: normal; + font-size: 10px; +} + +.fc-title, fc-time { + text-decoration: normal; +} + + +.fc-unthemed .fc-today { + background: #f9ff97; +} + + + +/* remove standard-styles */ +select { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border:1px; + border-radius: 5px; +} + +option { + background:white; + border-top:2px solid #000; + height:15px; + font-size:10px; + +} + + +/* styling */ +select { + border: 1px solid #bbb; + background-color: lightgrey; + box-shadow: 0 0px 0px 0 rgba(0,0,0,0.5); + height:20px; +} + + + + From ec6f5193e20ad0e37daf2b855d59fdf03ae4111d Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 26 Nov 2017 14:46:08 -0500 Subject: [PATCH 152/175] Switch to User::authenticate - Removed hash('whirlpool') to check password --- include/api.php | 15 +++------ include/auth.php | 75 +++++++++++++++++++++------------------------ mod/removeme.php | 4 +-- mod/settings.php | 9 ++---- src/Util/ExAuth.php | 5 +-- 5 files changed, 46 insertions(+), 62 deletions(-) diff --git a/include/api.php b/include/api.php index a5e806384..e0dc413c2 100644 --- a/include/api.php +++ b/include/api.php @@ -12,6 +12,7 @@ use Friendica\Core\Config; use Friendica\Core\NotificationsManager; use Friendica\Core\Worker; use Friendica\Database\DBM; +use Friendica\Model\User; use Friendica\Network\HTTPException; use Friendica\Network\HTTPException\BadRequestException; use Friendica\Network\HTTPException\ForbiddenException; @@ -190,7 +191,6 @@ function api_login(App $a) $user = $_SERVER['PHP_AUTH_USER']; $password = $_SERVER['PHP_AUTH_PW']; - $encrypted = hash('whirlpool', trim($password)); // allow "user@server" login (but ignore 'server' part) $at = strstr($user, "@", true); @@ -218,16 +218,9 @@ function api_login(App $a) if (($addon_auth['authenticated']) && (count($addon_auth['user_record']))) { $record = $addon_auth['user_record']; } else { - // process normal login request - $r = q( - "SELECT * FROM `user` WHERE (`email` = '%s' OR `nickname` = '%s') - AND `password` = '%s' AND NOT `blocked` AND NOT `account_expired` AND NOT `account_removed` AND `verified` LIMIT 1", - dbesc(trim($user)), - dbesc(trim($user)), - dbesc($encrypted) - ); - if (DBM::is_result($r)) { - $record = $r[0]; + $user_id = User::authenticate(trim($user), trim($password)); + if ($user_id) { + $record = dba::select('user', [], ['uid' => $user_id], ['limit' => 1]); } } diff --git a/include/auth.php b/include/auth.php index 90509468c..181ba71a6 100644 --- a/include/auth.php +++ b/include/auth.php @@ -4,6 +4,7 @@ use Friendica\App; use Friendica\Core\System; use Friendica\Core\Config; use Friendica\Database\DBM; +use Friendica\Model\User; require_once 'include/security.php'; require_once 'include/datetime.php'; @@ -98,41 +99,44 @@ if (isset($_SESSION) && x($_SESSION, 'authenticated') && (!x($_POST, 'auth-param } } else { session_unset(); - if (x($_POST, 'password') && strlen($_POST['password'])) { - $encrypted = hash('whirlpool', trim($_POST['password'])); - } else { - if ((x($_POST, 'openid_url')) && strlen($_POST['openid_url']) || - (x($_POST, 'username')) && strlen($_POST['username'])) { + if ( + !(x($_POST, 'password') && strlen($_POST['password'])) + && ( + x($_POST, 'openid_url') && strlen($_POST['openid_url']) + || x($_POST, 'username') && strlen($_POST['username']) + ) + ) { + $noid = Config::get('system', 'no_openid'); - $noid = Config::get('system', 'no_openid'); + $openid_url = trim(strlen($_POST['openid_url']) ? $_POST['openid_url'] : $_POST['username']); - $openid_url = trim((strlen($_POST['openid_url']) ? $_POST['openid_url'] : $_POST['username'])); + // validate_url alters the calling parameter - // validate_url alters the calling parameter - $temp_string = $openid_url; + $temp_string = $openid_url; - // if it's an email address or doesn't resolve to a URL, fail. - if ($noid || strpos($temp_string, '@') || !validate_url($temp_string)) { - $a = get_app(); - notice(t('Login failed.') . EOL); - goaway(System::baseUrl()); - // NOTREACHED - } + // if it's an email address or doesn't resolve to a URL, fail. - // Otherwise it's probably an openid. - try { - require_once('library/openid.php'); - $openid = new LightOpenID; - $openid->identity = $openid_url; - $_SESSION['openid'] = $openid_url; - $_SESSION['remember'] = $_POST['remember']; - $openid->returnUrl = System::baseUrl(true) . '/openid'; - goaway($openid->authUrl()); - } catch (Exception $e) { - notice(t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.') . '

    ' . t('The error message was:') . ' ' . $e->getMessage()); - } + if ($noid || strpos($temp_string, '@') || !validate_url($temp_string)) { + $a = get_app(); + notice(t('Login failed.') . EOL); + goaway(System::baseUrl()); // NOTREACHED } + + // Otherwise it's probably an openid. + + try { + require_once('library/openid.php'); + $openid = new LightOpenID; + $openid->identity = $openid_url; + $_SESSION['openid'] = $openid_url; + $_SESSION['remember'] = $_POST['remember']; + $openid->returnUrl = System::baseUrl(true) . '/openid'; + goaway($openid->authUrl()); + } catch (Exception $e) { + notice(t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.') . '

    ' . t('The error message was:') . ' ' . $e->getMessage()); + } + // NOTREACHED } if (x($_POST, 'auth-params') && $_POST['auth-params'] === 'login') { @@ -157,18 +161,9 @@ if (isset($_SESSION) && x($_SESSION, 'authenticated') && (!x($_POST, 'auth-param if ($addon_auth['authenticated'] && count($addon_auth['user_record'])) { $record = $addon_auth['user_record']; } else { - - // process normal login request - - $r = q("SELECT `user`.*, `user`.`pubkey` as `upubkey`, `user`.`prvkey` as `uprvkey` - FROM `user` WHERE (`email` = '%s' OR `nickname` = '%s') - AND `password` = '%s' AND NOT `blocked` AND NOT `account_expired` AND NOT `account_removed` AND `verified` LIMIT 1", - dbesc(trim($_POST['username'])), - dbesc(trim($_POST['username'])), - dbesc($encrypted) - ); - if (DBM::is_result($r)) { - $record = $r[0]; + $user_id = User::authenticate(trim($_POST['username']), trim($_POST['password'])); + if ($user_id) { + $record = dba::select('user', [], ['uid' => $user_id], ['limit' => 1]); } } diff --git a/mod/removeme.php b/mod/removeme.php index 2f4349a70..bf5969982 100644 --- a/mod/removeme.php +++ b/mod/removeme.php @@ -26,9 +26,7 @@ function removeme_post(App $a) return; } - $encrypted = hash('whirlpool',trim($_POST['qxz_password'])); - - if ((strlen($a->user['password'])) && ($encrypted === $a->user['password'])) { + if (User::authenticate($a->user['uid'], trim($_POST['qxz_password']))) { User::remove($a->user['uid']); // NOTREACHED } diff --git a/mod/settings.php b/mod/settings.php index 6a32b7ed0..7628f7782 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -9,6 +9,7 @@ use Friendica\Core\Config; use Friendica\Core\PConfig; use Friendica\Database\DBM; use Friendica\Model\GlobalContact; +use Friendica\Model\User; require_once 'include/group.php'; @@ -371,7 +372,6 @@ function settings_post(App $a) { $newpass = $_POST['password']; $confirm = $_POST['confirm']; - $oldpass = hash('whirlpool', $_POST['opassword']); $err = false; if ($newpass != $confirm) { @@ -386,8 +386,7 @@ function settings_post(App $a) { // check if the old password was supplied correctly before // changing it to the new value - $r = q("SELECT `password` FROM `user`WHERE `uid` = %d LIMIT 1", intval(local_user())); - if ($oldpass != $r[0]['password']) { + if (User::authenticate(intval(local_user()), $_POST['opassword'])) { notice(t('Wrong password.') . EOL); $err = true; } @@ -501,9 +500,7 @@ function settings_post(App $a) { if ($email != $a->user['email']) { $email_changed = true; // check for the correct password - $r = q("SELECT `password` FROM `user`WHERE `uid` = %d LIMIT 1", intval(local_user())); - $password = hash('whirlpool', $_POST['mpassword']); - if ($password != $r[0]['password']) { + if (!User::authenticate(intval(local_user()), $_POST['mpassword'])) { $err .= t('Wrong Password') . EOL; $email = $a->user['email']; } diff --git a/src/Util/ExAuth.php b/src/Util/ExAuth.php index aa3300c4e..f4dc7c052 100644 --- a/src/Util/ExAuth.php +++ b/src/Util/ExAuth.php @@ -37,6 +37,7 @@ namespace Friendica\Util; use Friendica\Core\Config; use Friendica\Core\PConfig; use Friendica\Database\DBM; +use Friendica\Model\User; use dba; require_once 'include/dba.php'; @@ -217,8 +218,8 @@ class ExAuth $aUser = dba::select('user', ['uid', 'password'], ['nickname' => $sUser], ['limit' => 1]); if (DBM::is_result($aUser)) { - $uid = $aUser['uid']; - $Error = $aUser['password'] != hash('whirlpool', $aCommand[3]); + $uid = User::authenticate($aUser, $aCommand[3]); + $Error = $uid === false; } else { $this->writeLog(LOG_WARNING, 'user not found: ' . $sUser); $Error = true; From 887655c1bdfde06dc64f3a834651b8ce811319fc Mon Sep 17 00:00:00 2001 From: hoergen Date: Sun, 26 Nov 2017 20:46:20 +0100 Subject: [PATCH 153/175] added new style sheet plusminus --- view/theme/vier/config.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/view/theme/vier/config.php b/view/theme/vier/config.php index 22276a9d7..1f335e754 100644 --- a/view/theme/vier/config.php +++ b/view/theme/vier/config.php @@ -1,3 +1,5 @@ + + "Plus", "breathe"=>"Breathe", - "dark"=>"Dark", - "shadow"=>"Shadow", "netcolour"=>"Coloured Networks", - "flat"=>"Flat" + "dark"=>"Dark", + "flat"=>"Flat", + "plus"=>"Plus", + "plusminus"=>"Plus Minus", + "shadow"=>"Shadow" ); $show_or_not = array('0'=>t("don't show"), '1'=>t("show"),); @@ -126,3 +129,4 @@ function vier_form(App $a, $style, $show_pages, $show_profiles, $show_helpers, $ )); return $o; } + From b348692a47e4927306482fd341e79497778eb9ff Mon Sep 17 00:00:00 2001 From: hoergen Date: Sun, 26 Nov 2017 20:46:55 +0100 Subject: [PATCH 154/175] added plusminus style sheet and sort the style sheets alphabetically --- view/theme/vier/style.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/view/theme/vier/style.php b/view/theme/vier/style.php index 934e51ee2..160b1f94c 100644 --- a/view/theme/vier/style.php +++ b/view/theme/vier/style.php @@ -1,3 +1,5 @@ + + Date: Sun, 26 Nov 2017 14:55:47 -0500 Subject: [PATCH 155/175] Remove unused upubkey and uprvkey from queries - Switched queries to new dba::* functions --- include/auth.php | 40 +++++++++++++++++++++++++++------------- include/security.php | 2 +- mod/openid.php | 3 ++- mod/settings.php | 4 ++-- src/Model/User.php | 11 +++++------ src/Worker/Delivery.php | 2 +- src/Worker/Notifier.php | 4 ++-- src/Worker/Queue.php | 26 +++++++++----------------- 8 files changed, 49 insertions(+), 43 deletions(-) diff --git a/include/auth.php b/include/auth.php index 181ba71a6..5da71ef6e 100644 --- a/include/auth.php +++ b/include/auth.php @@ -13,13 +13,21 @@ require_once 'include/datetime.php'; if (isset($_COOKIE["Friendica"])) { $data = json_decode($_COOKIE["Friendica"]); if (isset($data->uid)) { - $r = q("SELECT `user`.*, `user`.`pubkey` as `upubkey`, `user`.`prvkey` as `uprvkey` - FROM `user` WHERE `uid` = %d AND NOT `blocked` AND NOT `account_expired` AND NOT `account_removed` AND `verified` LIMIT 1", - intval($data->uid) + + $user = dba::select('user', + [], + [ + 'uid' => intval($data->uid), + 'blocked' => 0, + 'account_expired' => 0, + 'account_removed' => 0, + 'verified' => 1, + ], + ['limit' => 1] ); - if ($r) { - if ($data->hash != cookie_hash($r[0])) { + if (DBM::is_result($user)) { + if ($data->hash != cookie_hash($user)) { logger("Hash for user " . $data->uid . " doesn't fit."); nuke_session(); goaway(System::baseUrl()); @@ -29,11 +37,11 @@ if (isset($_COOKIE["Friendica"])) { // Expires after 7 days by default, // can be set via system.auth_cookie_lifetime $authcookiedays = Config::get('system', 'auth_cookie_lifetime', 7); - new_cookie($authcookiedays * 24 * 60 * 60, $r[0]); + new_cookie($authcookiedays * 24 * 60 * 60, $user); // Do the authentification if not done by now if (!isset($_SESSION) || !isset($_SESSION['authenticated'])) { - authenticate_success($r[0]); + authenticate_success($user); if (Config::get('system', 'paranoia')) { $_SESSION['addr'] = $data->ip; @@ -75,12 +83,18 @@ if (isset($_SESSION) && x($_SESSION, 'authenticated') && (!x($_POST, 'auth-param goaway(System::baseUrl()); } - $r = q("SELECT `user`.*, `user`.`pubkey` as `upubkey`, `user`.`prvkey` as `uprvkey` - FROM `user` WHERE `uid` = %d AND NOT `blocked` AND NOT `account_expired` AND NOT `account_removed` AND `verified` LIMIT 1", - intval($_SESSION['uid']) + $user = dba::select('user', + [], + [ + 'uid' => intval($_SESSION['uid']), + 'blocked' => 0, + 'account_expired' => 0, + 'account_removed' => 0, + 'verified' => 1, + ], + ['limit' => 1] ); - - if (!DBM::is_result($r)) { + if (!DBM::is_result($user)) { nuke_session(); goaway(System::baseUrl()); } @@ -95,7 +109,7 @@ if (isset($_SESSION) && x($_SESSION, 'authenticated') && (!x($_POST, 'auth-param $_SESSION['last_login_date'] = datetime_convert('UTC', 'UTC'); $login_refresh = true; } - authenticate_success($r[0], false, false, $login_refresh); + authenticate_success($user, false, false, $login_refresh); } } else { session_unset(); diff --git a/include/security.php b/include/security.php index 18793ce06..6f6ef94b6 100644 --- a/include/security.php +++ b/include/security.php @@ -15,7 +15,7 @@ use Friendica\Database\DBM; */ function cookie_hash($user) { return(hash("sha256", Config::get("system", "site_prvkey"). - $user["uprvkey"]. + $user["prvkey"]. $user["password"])); } diff --git a/mod/openid.php b/mod/openid.php index 45b80638d..613cd222f 100644 --- a/mod/openid.php +++ b/mod/openid.php @@ -33,7 +33,8 @@ function openid_content(App $a) { // mod/settings.php in 8367cad so it might have left mixed // records in the user table // - $r = q("SELECT *, `user`.`pubkey` as `upubkey`, `user`.`prvkey` as `uprvkey` FROM `user` + $r = q("SELECT * + FROM `user` WHERE ( `openid` = '%s' OR `openid` = '%s' ) AND `blocked` = 0 AND `account_expired` = 0 AND `account_removed` = 0 AND `verified` = 1 diff --git a/mod/settings.php b/mod/settings.php index 7628f7782..8ad82b023 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -506,14 +506,14 @@ function settings_post(App $a) { } // check the email is valid if (!valid_email($email)) { - $err .= t(' Not valid email.'); + $err .= t('Invalid email.'); } // ensure new email is not the admin mail //if ((x($a->config, 'admin_email')) && (strcasecmp($email, $a->config['admin_email']) == 0)) { if (x($a->config, 'admin_email')) { $adminlist = explode(",", str_replace(" ", "", strtolower($a->config['admin_email']))); if (in_array(strtolower($email), $adminlist)) { - $err .= t(' Cannot change to that email.'); + $err .= t('Cannot change to that email.'); $email = $a->user['email']; } } diff --git a/src/Model/User.php b/src/Model/User.php index a7f59b6a3..87663dbe5 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -78,21 +78,20 @@ class User logger('Removing user: ' . $uid); - $r = dba::select('user', array(), array('uid' => $uid), array("limit" => 1)); + $user = dba::select('user', [], ['uid' => $uid], ['limit' => 1]); - call_hooks('remove_user', $r); + call_hooks('remove_user', $user); // save username (actually the nickname as it is guaranteed // unique), so it cannot be re-registered in the future. - - dba::insert('userd', array('username' => $r['nickname'])); + dba::insert('userd', ['username' => $user['nickname']]); // The user and related data will be deleted in "cron_expire_and_remove_users" (cronjobs.php) - q("UPDATE `user` SET `account_removed` = 1, `account_expires_on` = UTC_TIMESTAMP() WHERE `uid` = %d", intval($uid)); + dba::update('user', ['account_removed' => 1, 'account_expires_on' => datetime_convert()], ['uid' => intval($uid)]); Worker::add(PRIORITY_HIGH, "Notifier", "removeme", $uid); // Send an update to the directory - Worker::add(PRIORITY_LOW, "Directory", $r['url']); + Worker::add(PRIORITY_LOW, "Directory", $user['url']); if ($uid == local_user()) { unset($_SESSION['authenticated']); diff --git a/src/Worker/Delivery.php b/src/Worker/Delivery.php index 216d2520d..c47e98287 100644 --- a/src/Worker/Delivery.php +++ b/src/Worker/Delivery.php @@ -140,7 +140,7 @@ class Delivery { } } - $r = q("SELECT `contact`.*, `user`.`pubkey` AS `upubkey`, `user`.`prvkey` AS `uprvkey`, + $r = q("SELECT `contact`.*, `user`.`prvkey` AS `uprvkey`, `user`.`timezone`, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`, `user`.`page-flags`, `user`.`account-type`, `user`.`prvnets` FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid` diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php index ac8cf123c..b261b32fc 100644 --- a/src/Worker/Notifier.php +++ b/src/Worker/Notifier.php @@ -108,7 +108,7 @@ class Notifier { $recipients[] = $suggest[0]['cid']; $item = $suggest[0]; } elseif ($cmd === 'removeme') { - $r = q("SELECT `contact`.*, `user`.`pubkey` AS `upubkey`, `user`.`prvkey` AS `uprvkey`, + $r = q("SELECT `contact`.*, `user`.`prvkey` AS `uprvkey`, `user`.`timezone`, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`, `user`.`page-flags`, `user`.`prvnets`, `user`.`account-type`, `user`.`guid` FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid` @@ -173,7 +173,7 @@ class Notifier { } - $r = q("SELECT `contact`.*, `user`.`pubkey` AS `upubkey`, `user`.`prvkey` AS `uprvkey`, + $r = q("SELECT `contact`.*, `user`.`prvkey` AS `uprvkey`, `user`.`timezone`, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`, `user`.`page-flags`, `user`.`prvnets`, `user`.`account-type` FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid` diff --git a/src/Worker/Queue.php b/src/Worker/Queue.php index 73726098e..f09def003 100644 --- a/src/Worker/Queue.php +++ b/src/Worker/Queue.php @@ -80,33 +80,29 @@ class Queue $q_item = $r[0]; - $c = q( - "SELECT * FROM `contact` WHERE `id` = %d LIMIT 1", - intval($q_item['cid']) - ); - - if (!DBM::is_result($c)) { + $contact = dba::select('contact', [], ['id' => intval($q_item['cid'])], ['limit' => 1]); + if (!DBM::is_result($contact)) { remove_queue_item($q_item['id']); return; } - $dead = Cache::get($cachekey_deadguy . $c[0]['notify']); + $dead = Cache::get($cachekey_deadguy . $contact['notify']); if (!is_null($dead) && $dead) { - logger('queue: skipping known dead url: ' . $c[0]['notify']); + logger('queue: skipping known dead url: ' . $contact['notify']); update_queue_time($q_item['id']); return; } - $server = PortableContact::detectServer($c[0]['url']); + $server = PortableContact::detectServer($contact['url']); if ($server != "") { $vital = Cache::get($cachekey_server . $server); if (is_null($vital)) { - logger("Check server " . $server . " (" . $c[0]["network"] . ")"); + logger("Check server " . $server . " (" . $contact["network"] . ")"); - $vital = PortableContact::checkServer($server, $c[0]["network"], true); + $vital = PortableContact::checkServer($server, $contact["network"], true); Cache::set($cachekey_server . $server, $vital, CACHE_QUARTER_HOUR); } @@ -117,12 +113,8 @@ class Queue } } - $u = q( - "SELECT `user`.*, `user`.`pubkey` AS `upubkey`, `user`.`prvkey` AS `uprvkey` - FROM `user` WHERE `uid` = %d LIMIT 1", - intval($c[0]['uid']) - ); - if (!DBM::is_result($u)) { + $user = dba::select('user', [], ['uid' => intval($contact['uid'])], ['limit' => 1]); + if (!DBM::is_result($user)) { remove_queue_item($q_item['id']); return; } From 456dfbe48602592b4412291ea9164c0da489ee82 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 26 Nov 2017 14:56:50 -0500 Subject: [PATCH 156/175] Forgotten change in src/Worker/Queue.php --- src/Worker/Queue.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Worker/Queue.php b/src/Worker/Queue.php index f09def003..f2da80007 100644 --- a/src/Worker/Queue.php +++ b/src/Worker/Queue.php @@ -119,10 +119,9 @@ class Queue return; } - $data = $q_item['content']; - $public = $q_item['batch']; - $contact = $c[0]; - $owner = $u[0]; + $data = $q_item['content']; + $public = $q_item['batch']; + $owner = $user; $deliver_status = 0; From 2a60146a434c56e6e739afd6788e98b202a91ba2 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 26 Nov 2017 15:45:59 -0500 Subject: [PATCH 157/175] Revert "Add new legacy password field" This reverts commit 2236f60cfa5814f74719ecb2641130cb32e6aa36. --- boot.php | 2 +- include/dbstructure.php | 1 - update.php | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/boot.php b/boot.php index 5ee4d5f4a..9cdaefb21 100644 --- a/boot.php +++ b/boot.php @@ -45,7 +45,7 @@ define('FRIENDICA_PLATFORM', 'Friendica'); define('FRIENDICA_CODENAME', 'Asparagus'); define('FRIENDICA_VERSION', '3.6-dev'); define('DFRN_PROTOCOL_VERSION', '2.23'); -define('DB_UPDATE_VERSION', 1236); +define('DB_UPDATE_VERSION', 1235); /** * @brief Constant with a HTML line break. diff --git a/include/dbstructure.php b/include/dbstructure.php index 65dda55c3..dde3dc6f1 100644 --- a/include/dbstructure.php +++ b/include/dbstructure.php @@ -1682,7 +1682,6 @@ function db_definition() { "guid" => array("type" => "varchar(64)", "not null" => "1", "default" => ""), "username" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "password" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), - "legacy_password" => array("type" => "tinyint(1)", "not null" => "1", "default" => "1"), "nickname" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "email" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), "openid" => array("type" => "varchar(255)", "not null" => "1", "default" => ""), diff --git a/update.php b/update.php index 7530d1a38..5cf9bbc2d 100644 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@ Date: Sun, 26 Nov 2017 15:51:07 -0500 Subject: [PATCH 158/175] Fix function name typo --- src/Model/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/User.php b/src/Model/User.php index 87663dbe5..3fa394862 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -53,7 +53,7 @@ class User $user = $user_info; } - if (!DBM::isResult($user) || !isset($user['uid']) || !isset($user['password'])) { + if (!DBM::is_result($user) || !isset($user['uid']) || !isset($user['password'])) { return false; } From c32b6000cb6def045f2491bbefa04ba86bf7dbd3 Mon Sep 17 00:00:00 2001 From: hoergen Date: Sun, 26 Nov 2017 21:56:39 +0100 Subject: [PATCH 159/175] removed blank lines --- view/theme/vier/config.php | 3 --- view/theme/vier/style.php | 3 --- 2 files changed, 6 deletions(-) diff --git a/view/theme/vier/config.php b/view/theme/vier/config.php index 1f335e754..97aaa1e5a 100644 --- a/view/theme/vier/config.php +++ b/view/theme/vier/config.php @@ -1,5 +1,3 @@ - - Date: Sun, 26 Nov 2017 22:28:46 +0000 Subject: [PATCH 160/175] Posting images to public forums now really does work. --- mod/item.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mod/item.php b/mod/item.php index 8ae99948a..fbedcd86b 100644 --- a/mod/item.php +++ b/mod/item.php @@ -512,6 +512,8 @@ function item_post(App $a) { } } + $original_contact_id = $contact_id; + if (!$parent && count($forum_contact) && ($private_forum || $only_to_forum)) { // we tagged a forum in a top level post. Now we change the post $private = $private_forum; @@ -548,15 +550,15 @@ function item_post(App $a) { $objecttype = ACTIVITY_OBJ_IMAGE; foreach ($images as $image) { - if (! stristr($image,System::baseUrl() . '/photo/')) { + if (!stristr($image, System::baseUrl() . '/photo/')) { continue; } $image_uri = substr($image,strrpos($image,'/') + 1); $image_uri = substr($image_uri,0, strpos($image_uri,'-')); - if (! strlen($image_uri)) { + if (!strlen($image_uri)) { continue; } - $srch = '<' . intval($contact_id) . '>'; + $srch = '<' . intval($original_contact_id) . '>'; $r = q("SELECT `id` FROM `photo` WHERE `allow_cid` = '%s' AND `allow_gid` = '' AND `deny_cid` = '' AND `deny_gid` = '' AND `resource-id` = '%s' AND `uid` = %d LIMIT 1", @@ -577,7 +579,7 @@ function item_post(App $a) { dbesc($str_group_deny), dbesc($image_uri), intval($profile_uid), - dbesc( t('Wall Photos')) + dbesc(t('Wall Photos')) ); } } From 9612496e9e4732122bac39a16c8f191f165fd219 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 27 Nov 2017 06:44:49 +0000 Subject: [PATCH 161/175] The function "template_escape" doesn't exist anymore. --- include/conversation.php | 27 +++++---------- include/identity.php | 4 --- mod/directory.php | 7 +--- mod/fbrowser.php | 17 ++-------- mod/message.php | 33 +++++------------- mod/photos.php | 72 ++++++++++------------------------------ mod/videos.php | 10 ++---- src/Object/Item.php | 21 ++++-------- 8 files changed, 45 insertions(+), 146 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index c95710722..7e6fefc64 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -780,25 +780,14 @@ function conversation(App $a, $items, $mode, $update, $preview = false) { list($categories, $folders) = get_cats_and_terms($item); - if ($a->theme['template_engine'] === 'internal') { - $profile_name_e = template_escape($profile_name); - $item['title_e'] = template_escape($item['title']); - $body_e = template_escape($body); - $tags_e = template_escape($tags); - $hashtags_e = template_escape($hashtags); - $mentions_e = template_escape($mentions); - $location_e = template_escape($location); - $owner_name_e = template_escape($owner_name); - } else { - $profile_name_e = $profile_name; - $item['title_e'] = $item['title']; - $body_e = $body; - $tags_e = $tags; - $hashtags_e = $hashtags; - $mentions_e = $mentions; - $location_e = $location; - $owner_name_e = $owner_name; - } + $profile_name_e = $profile_name; + $item['title_e'] = $item['title']; + $body_e = $body; + $tags_e = $tags; + $hashtags_e = $hashtags; + $mentions_e = $mentions; + $location_e = $location; + $owner_name_e = $owner_name; if ($item['item_network'] == "") { $item['item_network'] = $item['network']; diff --git a/include/identity.php b/include/identity.php index 2e6327d98..3066b7113 100644 --- a/include/identity.php +++ b/include/identity.php @@ -443,10 +443,6 @@ function profile_sidebar($profile, $block = 0) $p["photo"] = proxy_url($p["photo"], false, PROXY_SIZE_SMALL); } - if ($a->theme['template_engine'] === 'internal') { - $location = template_escape($location); - } - $tpl = get_markup_template('profile_vcard.tpl'); $o .= replace_macros( $tpl, diff --git a/mod/directory.php b/mod/directory.php index 4ce919b08..d8ad6aeab 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -143,12 +143,7 @@ function directory_content(App $a) { $about = ((x($profile,'about') == 1) ? t('About:') : False); - if($a->theme['template_engine'] === 'internal') { - $location_e = template_escape($location); - } - else { - $location_e = $location; - } + $location_e = $location; $photo_menu = array( 'profile' => array(t("View Profile"), zrl($profile_link)) diff --git a/mod/fbrowser.php b/mod/fbrowser.php index ce90eaee9..9c0b7bb5a 100644 --- a/mod/fbrowser.php +++ b/mod/fbrowser.php @@ -69,13 +69,7 @@ function fbrowser_content(App $a) { $a = get_app(); $types = Photo::supportedTypes(); $ext = $types[$rr['type']]; - - if($a->theme['template_engine'] === 'internal') { - $filename_e = template_escape($rr['filename']); - } - else { - $filename_e = $rr['filename']; - } + $filename_e = $rr['filename']; // Take the largest picture that is smaller or equal 640 pixels $p = q("SELECT `scale` FROM `photo` WHERE `resource-id` = '%s' AND `height` <= 640 AND `width` <= 640 ORDER BY `resource-id`, `scale` LIMIT 1", @@ -117,14 +111,9 @@ function fbrowser_content(App $a) { $a = get_app(); list($m1,$m2) = explode("/",$rr['filetype']); $filetype = ( (file_exists("images/icons/$m1.png"))?$m1:"zip"); + $filename_e = $rr['filename']; - if ($a->theme['template_engine'] === 'internal') { - $filename_e = template_escape($rr['filename']); - } else { - $filename_e = $rr['filename']; - } - - return array( System::baseUrl() . '/attach/' . $rr['id'], $filename_e, System::baseUrl() . '/images/icons/16/' . $filetype . '.png'); + return array(System::baseUrl() . '/attach/' . $rr['id'], $filename_e, System::baseUrl() . '/images/icons/16/' . $filetype . '.png'); } $files = array_map("_map_files2", $files); diff --git a/mod/message.php b/mod/message.php index 80940c816..cefc44356 100644 --- a/mod/message.php +++ b/mod/message.php @@ -450,17 +450,10 @@ function message_content(App $a) { if ($extracted['images']) $message['body'] = item_redir_and_replace_images($extracted['body'], $extracted['images'], $message['contact-id']); - if ($a->theme['template_engine'] === 'internal') { - $from_name_e = template_escape($message['from-name']); - $subject_e = template_escape($message['title']); - $body_e = template_escape(Smilies::replace(bbcode($message['body']))); - $to_name_e = template_escape($message['name']); - } else { - $from_name_e = $message['from-name']; - $subject_e = $message['title']; - $body_e = Smilies::replace(bbcode($message['body'])); - $to_name_e = $message['name']; - } + $from_name_e = $message['from-name']; + $subject_e = $message['title']; + $body_e = Smilies::replace(bbcode($message['body'])); + $to_name_e = $message['name']; $contact = Contact::getDetailsByURL($message['from-url']); if (isset($contact["thumb"])) @@ -492,11 +485,7 @@ function message_content(App $a) { $tpl = get_markup_template('mail_display.tpl'); - if ($a->theme['template_engine'] === 'internal') { - $subjtxt_e = template_escape($message['title']); - } else { - $subjtxt_e = $message['title']; - } + $subjtxt_e = $message['title']; $o = replace_macros($tpl, array( '$thread_id' => $a->argv[1], @@ -566,15 +555,9 @@ function render_messages(array $msg, $t) { else $participants = sprintf(t("%s and You"), $rr['from-name']); - if ($a->theme['template_engine'] === 'internal') { - $subject_e = template_escape((($rr['mailseen']) ? $rr['title'] : '' . $rr['title'] . '')); - $body_e = template_escape($rr['body']); - $to_name_e = template_escape($rr['name']); - } else { - $subject_e = (($rr['mailseen']) ? $rr['title'] : '' . $rr['title'] . ''); - $body_e = $rr['body']; - $to_name_e = $rr['name']; - } + $subject_e = (($rr['mailseen']) ? $rr['title'] : '' . $rr['title'] . ''); + $body_e = $rr['body']; + $to_name_e = $rr['name']; $contact = Contact::getDetailsByURL($rr['url']); if (isset($contact["thumb"])) diff --git a/mod/photos.php b/mod/photos.php index 6ef256f27..7b58bb645 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1155,13 +1155,8 @@ function photos_content(App $a) { $tpl = get_markup_template('photos_upload.tpl'); - if ($a->theme['template_engine'] === 'internal') { - $albumselect_e = template_escape($albumselect); - $aclselect_e = (($visitor) ? '' : template_escape(populate_acl($a->user))); - } else { - $albumselect_e = $albumselect; - $aclselect_e = (($visitor) ? '' : populate_acl($a->user)); - } + $albumselect_e = $albumselect; + $aclselect_e = (($visitor) ? '' : populate_acl($a->user)); $o .= replace_macros($tpl,array( '$pagename' => t('Upload Photos'), @@ -1236,11 +1231,7 @@ function photos_content(App $a) { if ($can_post) { $edit_tpl = get_markup_template('album_edit.tpl'); - if ($a->theme['template_engine'] === 'internal') { - $album_e = template_escape($album); - } else { - $album_e = $album; - } + $album_e = $album; $o .= replace_macros($edit_tpl,array( '$nametext' => t('New album name: '), @@ -1277,13 +1268,8 @@ function photos_content(App $a) { $ext = $phototypes[$rr['type']]; - if ($a->theme['template_engine'] === 'internal') { - $imgalt_e = template_escape($rr['filename']); - $desc_e = template_escape($rr['desc']); - } else { - $imgalt_e = $rr['filename']; - $desc_e = $rr['desc']; - } + $imgalt_e = $rr['filename']; + $desc_e = $rr['desc']; $photos[] = array( 'id' => $rr['id'], @@ -1548,15 +1534,9 @@ function photos_content(App $a) { $public_post_link = '&public=1'; } - if ($a->theme['template_engine'] === 'internal') { - $album_e = template_escape($ph[0]['album']); - $caption_e = template_escape($ph[0]['desc']); - $aclselect_e = template_escape(populate_acl($ph[0])); - } else { - $album_e = $ph[0]['album']; - $caption_e = $ph[0]['desc']; - $aclselect_e = populate_acl($ph[0]); - } + $album_e = $ph[0]['album']; + $caption_e = $ph[0]['desc']; + $aclselect_e = populate_acl($ph[0]); $edit = replace_macros($edit_tpl, array( '$id' => $ph[0]['id'], @@ -1708,15 +1688,9 @@ function photos_content(App $a) { 'delete' => t('Delete'), ); - if ($a->theme['template_engine'] === 'internal') { - $name_e = template_escape($profile_name); - $title_e = template_escape($item['title']); - $body_e = template_escape(bbcode($item['body'])); - } else { - $name_e = $profile_name; - $title_e = $item['title']; - $body_e = bbcode($item['body']); - } + $name_e = $profile_name; + $title_e = $item['title']; + $body_e = bbcode($item['body']); $comments .= replace_macros($template,array( '$id' => $item['item_id'], @@ -1766,17 +1740,10 @@ function photos_content(App $a) { $photo_tpl = get_markup_template('photo_view.tpl'); - if ($a->theme['template_engine'] === 'internal') { - $album_e = array($album_link,template_escape($ph[0]['album'])); - $tags_e = template_escape($tags); - $like_e = template_escape($like); - $dislike_e = template_escape($dislike); - } else { - $album_e = array($album_link, $ph[0]['album']); - $tags_e = $tags; - $like_e = $like; - $dislike_e = $dislike; - } + $album_e = array($album_link, $ph[0]['album']); + $tags_e = $tags; + $like_e = $like; + $dislike_e = $dislike; $o .= replace_macros($photo_tpl, array( '$id' => $ph[0]['id'], @@ -1849,13 +1816,8 @@ function photos_content(App $a) { $ext = $phototypes[$rr['type']]; - if ($a->theme['template_engine'] === 'internal') { - $alt_e = template_escape($rr['filename']); - $name_e = template_escape($rr['album']); - } else { - $alt_e = $rr['filename']; - $name_e = $rr['album']; - } + $alt_e = $rr['filename']; + $name_e = $rr['album']; $photos[] = array( 'id' => $rr['id'], diff --git a/mod/videos.php b/mod/videos.php index 9f0244102..412966f86 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -378,14 +378,8 @@ function videos_content(App $a) { $videos = array(); if (DBM::is_result($r)) { foreach ($r as $rr) { - if ($a->theme['template_engine'] === 'internal') { - $alt_e = template_escape($rr['filename']); - $name_e = template_escape($rr['album']); - } - else { - $alt_e = $rr['filename']; - $name_e = $rr['album']; - } + $alt_e = $rr['filename']; + $name_e = $rr['album']; $videos[] = array( 'id' => $rr['id'], diff --git a/src/Object/Item.php b/src/Object/Item.php index 082ecae03..2bfdc6895 100644 --- a/src/Object/Item.php +++ b/src/Object/Item.php @@ -311,21 +311,12 @@ class Item extends BaseObject list($categories, $folders) = get_cats_and_terms($item); - if ($a->theme['template_engine'] === 'internal') { - $body_e = template_escape($body); - $text_e = strip_tags(template_escape($body)); - $name_e = template_escape($profile_name); - $title_e = template_escape($item['title']); - $location_e = template_escape($location); - $owner_name_e = template_escape($this->getOwnerName()); - } else { - $body_e = $body; - $text_e = strip_tags($body); - $name_e = $profile_name; - $title_e = $item['title']; - $location_e = $location; - $owner_name_e = $this->getOwnerName(); - } + $body_e = $body; + $text_e = strip_tags($body); + $name_e = $profile_name; + $title_e = $item['title']; + $location_e = $location; + $owner_name_e = $this->getOwnerName(); // Disable features that aren't available in several networks From 67f75a3261cd429e5b50ef3a6338564630609b3a Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 27 Nov 2017 09:26:44 +0100 Subject: [PATCH 162/175] regenerated master messages.po file --- util/messages.po | 9085 +++++++++++++++++++++++----------------------- 1 file changed, 4564 insertions(+), 4521 deletions(-) diff --git a/util/messages.po b/util/messages.po index 6fd1422b7..fe6bc1ecf 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: 2017-11-07 07:03+0100\n" +"POT-Creation-Date: 2017-11-27 09:19+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,303 +18,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" -#: include/features.php:65 -msgid "General Features" -msgstr "" - -#: include/features.php:67 -msgid "Multiple Profiles" -msgstr "" - -#: include/features.php:67 -msgid "Ability to create multiple profiles" -msgstr "" - -#: include/features.php:68 -msgid "Photo Location" -msgstr "" - -#: include/features.php:68 -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:69 -msgid "Export Public Calendar" -msgstr "" - -#: include/features.php:69 -msgid "Ability for visitors to download the public calendar" -msgstr "" - -#: include/features.php:74 -msgid "Post Composition Features" -msgstr "" - -#: include/features.php:75 -msgid "Post Preview" -msgstr "" - -#: include/features.php:75 -msgid "Allow previewing posts and comments before publishing them" -msgstr "" - -#: include/features.php:76 -msgid "Auto-mention Forums" -msgstr "" - -#: include/features.php:76 -msgid "" -"Add/remove mention when a forum page is selected/deselected in ACL window." -msgstr "" - -#: include/features.php:81 -msgid "Network Sidebar Widgets" -msgstr "" - -#: include/features.php:82 -msgid "Search by Date" -msgstr "" - -#: include/features.php:82 -msgid "Ability to select posts by date ranges" -msgstr "" - -#: include/features.php:83 include/features.php:113 -msgid "List Forums" -msgstr "" - -#: include/features.php:83 -msgid "Enable widget to display the forums your are connected with" -msgstr "" - -#: include/features.php:84 -msgid "Group Filter" -msgstr "" - -#: include/features.php:84 -msgid "Enable widget to display Network posts only from selected group" -msgstr "" - -#: include/features.php:85 -msgid "Network Filter" -msgstr "" - -#: include/features.php:85 -msgid "Enable widget to display Network posts only from selected network" -msgstr "" - -#: include/features.php:86 mod/search.php:37 mod/network.php:196 -msgid "Saved Searches" -msgstr "" - -#: include/features.php:86 -msgid "Save search terms for re-use" -msgstr "" - -#: include/features.php:91 -msgid "Network Tabs" -msgstr "" - -#: include/features.php:92 -msgid "Network Personal Tab" -msgstr "" - -#: include/features.php:92 -msgid "Enable tab to display only Network posts that you've interacted on" -msgstr "" - -#: include/features.php:93 -msgid "Network New Tab" -msgstr "" - -#: include/features.php:93 -msgid "Enable tab to display only new Network posts (from the last 12 hours)" -msgstr "" - -#: include/features.php:94 -msgid "Network Shared Links Tab" -msgstr "" - -#: include/features.php:94 -msgid "Enable tab to display only Network posts with links in them" -msgstr "" - -#: include/features.php:99 -msgid "Post/Comment Tools" -msgstr "" - -#: include/features.php:100 -msgid "Multiple Deletion" -msgstr "" - -#: include/features.php:100 -msgid "Select and delete multiple posts/comments at once" -msgstr "" - -#: include/features.php:101 -msgid "Edit Sent Posts" -msgstr "" - -#: include/features.php:101 -msgid "Edit and correct posts and comments after sending" -msgstr "" - -#: include/features.php:102 -msgid "Tagging" -msgstr "" - -#: include/features.php:102 -msgid "Ability to tag existing posts" -msgstr "" - -#: include/features.php:103 -msgid "Post Categories" -msgstr "" - -#: include/features.php:103 -msgid "Add categories to your posts" -msgstr "" - -#: include/features.php:104 include/contact_widgets.php:167 -msgid "Saved Folders" -msgstr "" - -#: include/features.php:104 -msgid "Ability to file posts under folders" -msgstr "" - -#: include/features.php:105 -msgid "Dislike Posts" -msgstr "" - -#: include/features.php:105 -msgid "Ability to dislike posts/comments" -msgstr "" - -#: include/features.php:106 -msgid "Star Posts" -msgstr "" - -#: include/features.php:106 -msgid "Ability to mark special posts with a star indicator" -msgstr "" - -#: include/features.php:107 -msgid "Mute Post Notifications" -msgstr "" - -#: include/features.php:107 -msgid "Ability to mute notifications for a thread" -msgstr "" - -#: include/features.php:112 -msgid "Advanced Profile Settings" -msgstr "" - -#: include/features.php:113 -msgid "Show visitors public community forums at the Advanced Profile Page" -msgstr "" - -#: include/datetime.php:66 include/datetime.php:68 mod/profiles.php:697 -msgid "Miscellaneous" -msgstr "" - -#: include/datetime.php:196 include/identity.php:655 -msgid "Birthday:" -msgstr "" - -#: include/datetime.php:198 mod/profiles.php:720 -msgid "Age: " -msgstr "" - -#: include/datetime.php:200 -msgid "YYYY-MM-DD or MM-DD" -msgstr "" - -#: include/datetime.php:370 -msgid "never" -msgstr "" - -#: include/datetime.php:376 -msgid "less than a second ago" -msgstr "" - -#: include/datetime.php:379 -msgid "year" -msgstr "" - -#: include/datetime.php:379 -msgid "years" -msgstr "" - -#: include/datetime.php:380 include/event.php:490 mod/cal.php:282 -#: mod/events.php:393 -msgid "month" -msgstr "" - -#: include/datetime.php:380 -msgid "months" -msgstr "" - -#: include/datetime.php:381 include/event.php:491 mod/cal.php:283 -#: mod/events.php:394 -msgid "week" -msgstr "" - -#: include/datetime.php:381 -msgid "weeks" -msgstr "" - -#: include/datetime.php:382 include/event.php:492 mod/cal.php:284 -#: mod/events.php:395 -msgid "day" -msgstr "" - -#: include/datetime.php:382 -msgid "days" -msgstr "" - -#: include/datetime.php:383 -msgid "hour" -msgstr "" - -#: include/datetime.php:383 -msgid "hours" -msgstr "" - -#: include/datetime.php:384 -msgid "minute" -msgstr "" - -#: include/datetime.php:384 -msgid "minutes" -msgstr "" - -#: include/datetime.php:385 -msgid "second" -msgstr "" - -#: include/datetime.php:385 -msgid "seconds" -msgstr "" - -#: include/datetime.php:394 -#, php-format -msgid "%1$d %2$s ago" -msgstr "" - -#: include/datetime.php:620 -#, php-format -msgid "%s's birthday" -msgstr "" - -#: include/datetime.php:621 include/dfrn.php:1361 -#, php-format -msgid "Happy Birthday %s" -msgstr "" - #: include/profile_selectors.php:6 msgid "Male" msgstr "" @@ -367,7 +70,7 @@ msgstr "" msgid "Other" msgstr "" -#: include/profile_selectors.php:6 include/conversation.php:1565 +#: include/profile_selectors.php:6 include/conversation.php:1645 msgid "Undecided" msgid_plural "Undecided" msgstr[0] "" @@ -461,7 +164,7 @@ msgstr "" msgid "Sex Addict" msgstr "" -#: include/profile_selectors.php:42 include/user.php:256 include/user.php:260 +#: include/profile_selectors.php:42 include/user.php:257 include/user.php:261 msgid "Friends" msgstr "" @@ -549,197 +252,276 @@ msgstr "" msgid "Ask me" msgstr "" -#: include/group.php:25 -msgid "" -"A deleted group with this name was revived. Existing item permissions " -"may apply to this group and any future members. If this is " -"not what you intended, please create another group with a different name." +#: include/Photo.php:998 include/Photo.php:1014 include/Photo.php:1022 +#: include/Photo.php:1047 include/message.php:140 mod/item.php:582 +#: mod/wall_upload.php:228 +msgid "Wall Photos" msgstr "" -#: include/group.php:201 -msgid "Default privacy group for new contacts" +#: include/acl_selectors.php:357 +msgid "Post to Email" msgstr "" -#: include/group.php:234 -msgid "Everybody" -msgstr "" - -#: include/group.php:257 -msgid "edit" -msgstr "" - -#: include/group.php:278 mod/newmember.php:39 -msgid "Groups" -msgstr "" - -#: include/group.php:280 -msgid "Edit groups" -msgstr "" - -#: include/group.php:282 -msgid "Edit group" -msgstr "" - -#: include/group.php:283 -msgid "Create a new group" -msgstr "" - -#: include/group.php:284 mod/group.php:101 mod/group.php:198 -msgid "Group Name: " -msgstr "" - -#: include/group.php:286 -msgid "Contacts not in any group" -msgstr "" - -#: include/group.php:288 mod/network.php:197 -msgid "add" -msgstr "" - -#: include/ForumManager.php:119 include/nav.php:134 include/text.php:1100 -#: view/theme/vier/theme.php:249 -msgid "Forums" -msgstr "" - -#: include/ForumManager.php:121 view/theme/vier/theme.php:251 -msgid "External link to forum" -msgstr "" - -#: include/ForumManager.php:124 include/contact_widgets.php:272 -#: include/items.php:2413 object/Item.php:417 view/theme/vier/theme.php:254 -#: src/App.php:523 -msgid "show more" -msgstr "" - -#: include/NotificationsManager.php:157 -msgid "System" -msgstr "" - -#: include/NotificationsManager.php:164 include/nav.php:161 mod/admin.php:590 -#: view/theme/frio/theme.php:260 -msgid "Network" -msgstr "" - -#: include/NotificationsManager.php:171 mod/network.php:914 -#: mod/profiles.php:695 -msgid "Personal" -msgstr "" - -#: include/NotificationsManager.php:178 include/nav.php:108 include/nav.php:164 -msgid "Home" -msgstr "" - -#: include/NotificationsManager.php:185 include/nav.php:169 -msgid "Introductions" -msgstr "" - -#: include/NotificationsManager.php:243 include/NotificationsManager.php:255 +#: include/acl_selectors.php:362 #, php-format -msgid "%s commented on %s's post" +msgid "Connectors disabled, since \"%s\" is enabled." msgstr "" -#: include/NotificationsManager.php:254 +#: include/acl_selectors.php:363 mod/settings.php:1172 +msgid "Hide your profile details from unknown viewers?" +msgstr "" + +#: include/acl_selectors.php:369 +msgid "Visible to everybody" +msgstr "" + +#: include/acl_selectors.php:370 view/theme/vier/config.php:113 +msgid "show" +msgstr "" + +#: include/acl_selectors.php:371 view/theme/vier/config.php:113 +msgid "don't show" +msgstr "" + +#: include/acl_selectors.php:377 mod/editpost.php:128 +msgid "CC: email addresses" +msgstr "" + +#: include/acl_selectors.php:378 mod/editpost.php:135 +msgid "Example: bob@example.com, mary@example.com" +msgstr "" + +#: include/acl_selectors.php:380 mod/events.php:534 mod/photos.php:1170 +#: mod/photos.php:1552 +msgid "Permissions" +msgstr "" + +#: include/acl_selectors.php:381 +msgid "Close" +msgstr "" + +#: include/api.php:1130 #, php-format -msgid "%s created a new post" +msgid "Daily posting limit of %d posts reached. The post was rejected." msgstr "" -#: include/NotificationsManager.php:269 +#: include/api.php:1154 #, php-format -msgid "%s liked %s's post" +msgid "Weekly posting limit of %d posts reached. The post was rejected." msgstr "" -#: include/NotificationsManager.php:282 +#: include/api.php:1178 #, php-format -msgid "%s disliked %s's post" +msgid "Monthly posting limit of %d posts reached. The post was rejected." msgstr "" -#: include/NotificationsManager.php:295 -#, php-format -msgid "%s is attending %s's event" +#: include/api.php:3823 include/user.php:303 include/user.php:311 +#: include/user.php:319 mod/photos.php:77 mod/photos.php:193 mod/photos.php:780 +#: mod/photos.php:1230 mod/photos.php:1247 mod/photos.php:1809 +#: mod/profile_photo.php:78 mod/profile_photo.php:86 mod/profile_photo.php:94 +#: mod/profile_photo.php:218 mod/profile_photo.php:313 +#: mod/profile_photo.php:323 +msgid "Profile Photos" msgstr "" -#: include/NotificationsManager.php:308 -#, php-format -msgid "%s is not attending %s's event" -msgstr "" - -#: include/NotificationsManager.php:321 -#, php-format -msgid "%s may attend %s's event" -msgstr "" - -#: include/NotificationsManager.php:338 -#, php-format -msgid "%s is now friends with %s" -msgstr "" - -#: include/NotificationsManager.php:776 -msgid "Friend Suggestion" -msgstr "" - -#: include/NotificationsManager.php:805 -msgid "Friend/Connect Request" -msgstr "" - -#: include/NotificationsManager.php:805 -msgid "New Follower" -msgstr "" - -#: include/auth.php:53 +#: include/auth.php:54 msgid "Logged out." msgstr "" -#: include/auth.php:124 include/auth.php:186 mod/openid.php:111 +#: include/auth.php:125 include/auth.php:187 mod/openid.php:113 msgid "Login failed." msgstr "" -#: include/auth.php:140 include/user.php:77 +#: include/auth.php:141 include/user.php:78 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:140 include/user.php:77 +#: include/auth.php:141 include/user.php:78 msgid "The error message was:" msgstr "" -#: include/bb2diaspora.php:234 include/event.php:19 include/event.php:933 +#: include/bb2diaspora.php:235 include/event.php:21 include/event.php:932 #: mod/localtime.php:14 msgid "l F d, Y \\@ g:i A" msgstr "" -#: include/bb2diaspora.php:240 include/event.php:36 include/event.php:53 -#: include/event.php:496 include/event.php:985 +#: include/bb2diaspora.php:241 include/event.php:38 include/event.php:55 +#: include/event.php:495 include/event.php:984 msgid "Starts:" msgstr "" -#: include/bb2diaspora.php:248 include/event.php:39 include/event.php:59 -#: include/event.php:497 include/event.php:989 +#: include/bb2diaspora.php:249 include/event.php:41 include/event.php:61 +#: include/event.php:496 include/event.php:988 msgid "Finishes:" msgstr "" -#: include/bb2diaspora.php:257 include/event.php:43 include/event.php:68 -#: include/event.php:498 include/event.php:1003 include/identity.php:340 -#: mod/notifications.php:247 mod/directory.php:133 mod/contacts.php:658 -#: mod/events.php:517 +#: include/bb2diaspora.php:258 include/event.php:45 include/event.php:70 +#: include/event.php:497 include/event.php:1002 include/identity.php:358 +#: mod/contacts.php:666 mod/directory.php:136 mod/events.php:519 +#: mod/notifications.php:248 msgid "Location:" msgstr "" -#: include/contact_widgets.php:12 -msgid "Add New Contact" +#: include/bbcode.php:433 include/bbcode.php:1196 include/bbcode.php:1197 +msgid "Image/photo" msgstr "" -#: include/contact_widgets.php:13 -msgid "Enter address or web location" +#: include/bbcode.php:549 +#, php-format +msgid "%2$s %3$s" +msgstr "" + +#: include/bbcode.php:1153 include/bbcode.php:1175 +msgid "$1 wrote:" +msgstr "" + +#: include/bbcode.php:1205 include/bbcode.php:1206 +msgid "Encrypted content" +msgstr "" + +#: include/bbcode.php:1325 +msgid "Invalid source protocol" +msgstr "" + +#: include/bbcode.php:1336 +msgid "Invalid link protocol" +msgstr "" + +#: include/contact_selectors.php:34 +msgid "Unknown | Not categorised" +msgstr "" + +#: include/contact_selectors.php:35 +msgid "Block immediately" +msgstr "" + +#: include/contact_selectors.php:36 +msgid "Shady, spammer, self-marketer" +msgstr "" + +#: include/contact_selectors.php:37 +msgid "Known to me, but no opinion" +msgstr "" + +#: include/contact_selectors.php:38 +msgid "OK, probably harmless" +msgstr "" + +#: include/contact_selectors.php:39 +msgid "Reputable, has my trust" +msgstr "" + +#: include/contact_selectors.php:58 mod/admin.php:1097 +msgid "Frequently" +msgstr "" + +#: include/contact_selectors.php:59 mod/admin.php:1098 +msgid "Hourly" +msgstr "" + +#: include/contact_selectors.php:60 mod/admin.php:1099 +msgid "Twice daily" +msgstr "" + +#: include/contact_selectors.php:61 mod/admin.php:1100 +msgid "Daily" +msgstr "" + +#: include/contact_selectors.php:62 +msgid "Weekly" +msgstr "" + +#: include/contact_selectors.php:63 +msgid "Monthly" +msgstr "" + +#: include/contact_selectors.php:78 mod/dfrn_request.php:889 +msgid "Friendica" +msgstr "" + +#: include/contact_selectors.php:79 +msgid "OStatus" +msgstr "" + +#: include/contact_selectors.php:80 +msgid "RSS/Atom" +msgstr "" + +#: include/contact_selectors.php:81 include/contact_selectors.php:88 +#: mod/admin.php:1612 mod/admin.php:1625 mod/admin.php:1638 mod/admin.php:1656 +msgid "Email" +msgstr "" + +#: include/contact_selectors.php:82 mod/dfrn_request.php:891 +#: mod/settings.php:863 +msgid "Diaspora" +msgstr "" + +#: include/contact_selectors.php:83 +msgid "Facebook" +msgstr "" + +#: include/contact_selectors.php:84 +msgid "Zot!" +msgstr "" + +#: include/contact_selectors.php:85 +msgid "LinkedIn" +msgstr "" + +#: include/contact_selectors.php:86 +msgid "XMPP/IM" +msgstr "" + +#: include/contact_selectors.php:87 +msgid "MySpace" +msgstr "" + +#: include/contact_selectors.php:89 +msgid "Google+" +msgstr "" + +#: include/contact_selectors.php:90 +msgid "pump.io" +msgstr "" + +#: include/contact_selectors.php:91 +msgid "Twitter" +msgstr "" + +#: include/contact_selectors.php:92 +msgid "Diaspora Connector" +msgstr "" + +#: include/contact_selectors.php:93 +msgid "GNU Social Connector" +msgstr "" + +#: include/contact_selectors.php:94 +msgid "pnut" +msgstr "" + +#: include/contact_selectors.php:95 +msgid "App.net" msgstr "" #: include/contact_widgets.php:14 +msgid "Add New Contact" +msgstr "" + +#: include/contact_widgets.php:15 +msgid "Enter address or web location" +msgstr "" + +#: include/contact_widgets.php:16 msgid "Example: bob@example.com, http://example.com/barbara" msgstr "" -#: include/contact_widgets.php:16 include/identity.php:230 -#: mod/allfriends.php:88 mod/match.php:93 mod/suggest.php:101 -#: mod/dirfind.php:211 +#: include/contact_widgets.php:18 include/identity.php:245 +#: mod/allfriends.php:91 mod/dirfind.php:215 mod/match.php:102 +#: mod/suggest.php:105 msgid "Connect" msgstr "" @@ -758,9 +540,10 @@ msgstr "" msgid "Enter name or interest" msgstr "" -#: include/contact_widgets.php:39 include/Contact.php:411 -#: include/conversation.php:1035 mod/allfriends.php:72 mod/follow.php:143 -#: mod/match.php:78 mod/suggest.php:83 mod/contacts.php:590 mod/dirfind.php:214 +#: include/contact_widgets.php:39 include/conversation.php:1028 +#: mod/allfriends.php:75 mod/contacts.php:597 mod/dirfind.php:218 +#: mod/follow.php:144 mod/match.php:87 mod/suggest.php:87 +#: src/Object/Contact.php:392 msgid "Connect/Follow" msgstr "" @@ -768,16 +551,16 @@ msgstr "" msgid "Examples: Robert Morgenstein, Fishing" msgstr "" -#: include/contact_widgets.php:41 mod/directory.php:200 mod/contacts.php:828 +#: include/contact_widgets.php:41 mod/contacts.php:836 mod/directory.php:198 msgid "Find" msgstr "" -#: include/contact_widgets.php:42 mod/suggest.php:114 -#: view/theme/vier/theme.php:196 +#: include/contact_widgets.php:42 mod/suggest.php:118 +#: view/theme/vier/theme.php:199 msgid "Friend Suggestions" msgstr "" -#: include/contact_widgets.php:43 view/theme/vier/theme.php:195 +#: include/contact_widgets.php:43 view/theme/vier/theme.php:198 msgid "Similar Interests" msgstr "" @@ -785,7 +568,7 @@ msgstr "" msgid "Random Profile" msgstr "" -#: include/contact_widgets.php:45 view/theme/vier/theme.php:197 +#: include/contact_widgets.php:45 view/theme/vier/theme.php:200 msgid "Invite Friends" msgstr "" @@ -801,6 +584,10 @@ msgstr "" msgid "All Networks" msgstr "" +#: include/contact_widgets.php:167 include/features.php:107 +msgid "Saved Folders" +msgstr "" + #: include/contact_widgets.php:170 include/contact_widgets.php:205 msgid "Everything" msgstr "" @@ -809,1287 +596,561 @@ msgstr "" msgid "Categories" msgstr "" -#: include/contact_widgets.php:267 +#: include/contact_widgets.php:265 #, php-format msgid "%d contact in common" msgid_plural "%d contacts in common" msgstr[0] "" msgstr[1] "" -#: include/enotify.php:28 -msgid "Friendica Notification" -msgstr "" - -#: include/enotify.php:31 -msgid "Thank You," -msgstr "" - -#: include/enotify.php:34 -#, php-format -msgid "%s Administrator" -msgstr "" - -#: include/enotify.php:36 -#, php-format -msgid "%1$s, %2$s Administrator" -msgstr "" - -#: include/enotify.php:47 include/delivery.php:441 -msgid "noreply" -msgstr "" - -#: include/enotify.php:81 -#, php-format -msgid "%s " -msgstr "" - -#: include/enotify.php:94 -#, php-format -msgid "[Friendica:Notify] New mail received at %s" -msgstr "" - -#: include/enotify.php:96 -#, php-format -msgid "%1$s sent you a new private message at %2$s." -msgstr "" - -#: include/enotify.php:97 -#, php-format -msgid "%1$s sent you %2$s." -msgstr "" - -#: include/enotify.php:97 -msgid "a private message" -msgstr "" - -#: include/enotify.php:99 -#, php-format -msgid "Please visit %s to view and/or reply to your private messages." -msgstr "" - -#: include/enotify.php:145 -#, php-format -msgid "%1$s commented on [url=%2$s]a %3$s[/url]" -msgstr "" - -#: include/enotify.php:152 -#, php-format -msgid "%1$s commented on [url=%2$s]%3$s's %4$s[/url]" -msgstr "" - -#: include/enotify.php:160 -#, php-format -msgid "%1$s commented on [url=%2$s]your %3$s[/url]" -msgstr "" - -#: include/enotify.php:170 -#, php-format -msgid "[Friendica:Notify] Comment to conversation #%1$d by %2$s" -msgstr "" - -#: include/enotify.php:172 -#, php-format -msgid "%s commented on an item/conversation you have been following." -msgstr "" - -#: include/enotify.php:175 include/enotify.php:189 include/enotify.php:203 -#: include/enotify.php:217 include/enotify.php:235 include/enotify.php:249 -#, php-format -msgid "Please visit %s to view and/or reply to the conversation." -msgstr "" - -#: include/enotify.php:182 -#, php-format -msgid "[Friendica:Notify] %s posted to your profile wall" -msgstr "" - -#: include/enotify.php:184 -#, php-format -msgid "%1$s posted to your profile wall at %2$s" -msgstr "" - -#: include/enotify.php:185 -#, php-format -msgid "%1$s posted to [url=%2$s]your wall[/url]" -msgstr "" - -#: include/enotify.php:196 -#, php-format -msgid "[Friendica:Notify] %s tagged you" -msgstr "" - -#: include/enotify.php:198 -#, php-format -msgid "%1$s tagged you at %2$s" -msgstr "" - -#: include/enotify.php:199 -#, php-format -msgid "%1$s [url=%2$s]tagged you[/url]." -msgstr "" - -#: include/enotify.php:210 -#, php-format -msgid "[Friendica:Notify] %s shared a new post" -msgstr "" - -#: include/enotify.php:212 -#, php-format -msgid "%1$s shared a new post at %2$s" -msgstr "" - -#: include/enotify.php:213 -#, php-format -msgid "%1$s [url=%2$s]shared a post[/url]." -msgstr "" - -#: include/enotify.php:224 -#, php-format -msgid "[Friendica:Notify] %1$s poked you" -msgstr "" - -#: include/enotify.php:226 -#, php-format -msgid "%1$s poked you at %2$s" -msgstr "" - -#: include/enotify.php:227 -#, php-format -msgid "%1$s [url=%2$s]poked you[/url]." -msgstr "" - -#: include/enotify.php:242 -#, php-format -msgid "[Friendica:Notify] %s tagged your post" -msgstr "" - -#: include/enotify.php:244 -#, php-format -msgid "%1$s tagged your post at %2$s" -msgstr "" - -#: include/enotify.php:245 -#, php-format -msgid "%1$s tagged [url=%2$s]your post[/url]" -msgstr "" - -#: include/enotify.php:256 -msgid "[Friendica:Notify] Introduction received" -msgstr "" - -#: include/enotify.php:258 -#, php-format -msgid "You've received an introduction from '%1$s' at %2$s" -msgstr "" - -#: include/enotify.php:259 -#, php-format -msgid "You've received [url=%1$s]an introduction[/url] from %2$s." -msgstr "" - -#: include/enotify.php:263 include/enotify.php:306 -#, php-format -msgid "You may visit their profile at %s" -msgstr "" - -#: include/enotify.php:265 -#, php-format -msgid "Please visit %s to approve or reject the introduction." -msgstr "" - -#: include/enotify.php:273 -msgid "[Friendica:Notify] A new person is sharing with you" -msgstr "" - -#: include/enotify.php:275 include/enotify.php:276 -#, php-format -msgid "%1$s is sharing with you at %2$s" -msgstr "" - -#: include/enotify.php:282 -msgid "[Friendica:Notify] You have a new follower" -msgstr "" - -#: include/enotify.php:284 include/enotify.php:285 -#, php-format -msgid "You have a new follower at %2$s : %1$s" -msgstr "" - -#: include/enotify.php:296 -msgid "[Friendica:Notify] Friend suggestion received" -msgstr "" - -#: include/enotify.php:298 -#, php-format -msgid "You've received a friend suggestion from '%1$s' at %2$s" -msgstr "" - -#: include/enotify.php:299 -#, php-format -msgid "You've received [url=%1$s]a friend suggestion[/url] for %2$s from %3$s." -msgstr "" - -#: include/enotify.php:304 -msgid "Name:" -msgstr "" - -#: include/enotify.php:305 -msgid "Photo:" -msgstr "" - -#: include/enotify.php:308 -#, php-format -msgid "Please visit %s to approve or reject the suggestion." -msgstr "" - -#: include/enotify.php:316 include/enotify.php:330 -msgid "[Friendica:Notify] Connection accepted" -msgstr "" - -#: include/enotify.php:318 include/enotify.php:332 -#, php-format -msgid "'%1$s' has accepted your connection request at %2$s" -msgstr "" - -#: include/enotify.php:319 include/enotify.php:333 -#, php-format -msgid "%2$s has accepted your [url=%1$s]connection request[/url]." -msgstr "" - -#: include/enotify.php:323 -msgid "" -"You are now mutual friends and may exchange status updates, photos, and " -"email without restriction." -msgstr "" - -#: include/enotify.php:325 -#, php-format -msgid "Please visit %s if you wish to make any changes to this relationship." -msgstr "" - -#: include/enotify.php:337 -#, php-format -msgid "" -"'%1$s' has chosen to accept you a \"fan\", which restricts some forms of " -"communication - such as private messaging and some profile interactions. If " -"this is a celebrity or community page, these settings were applied " -"automatically." -msgstr "" - -#: include/enotify.php:339 -#, php-format -msgid "" -"'%1$s' may choose to extend this into a two-way or more permissive " -"relationship in the future." -msgstr "" - -#: include/enotify.php:341 -#, php-format -msgid "Please visit %s if you wish to make any changes to this relationship." -msgstr "" - -#: include/enotify.php:351 -msgid "[Friendica System:Notify] registration request" -msgstr "" - -#: include/enotify.php:353 -#, php-format -msgid "You've received a registration request from '%1$s' at %2$s" -msgstr "" - -#: include/enotify.php:354 -#, php-format -msgid "You've received a [url=%1$s]registration request[/url] from %2$s." -msgstr "" - -#: include/enotify.php:358 -#, php-format -msgid "Full Name:\t%1$s\\nSite Location:\t%2$s\\nLogin Name:\t%3$s (%4$s)" -msgstr "" - -#: include/enotify.php:361 -#, php-format -msgid "Please visit %s to approve or reject the request." -msgstr "" - -#: include/oembed.php:254 -msgid "Embedded content" -msgstr "" - -#: include/oembed.php:262 -msgid "Embedding disabled" -msgstr "" - -#: include/security.php:64 -msgid "Welcome " -msgstr "" - -#: include/security.php:65 -msgid "Please upload a profile photo." -msgstr "" - -#: include/security.php:67 -msgid "Welcome back " -msgstr "" - -#: include/security.php:424 -msgid "" -"The form security token was not correct. This probably happened because the " -"form has been opened for too long (>3 hours) before submitting it." -msgstr "" - -#: include/photos.php:57 include/photos.php:66 mod/fbrowser.php:43 -#: mod/fbrowser.php:65 mod/photos.php:191 mod/photos.php:1109 -#: mod/photos.php:1233 mod/photos.php:1254 mod/photos.php:1816 -#: mod/photos.php:1830 -msgid "Contact Photos" -msgstr "" - -#: include/nav.php:38 mod/navigation.php:22 -msgid "Nothing new here" -msgstr "" - -#: include/nav.php:42 mod/navigation.php:26 -msgid "Clear notifications" -msgstr "" - -#: include/nav.php:43 include/text.php:1090 -msgid "@name, !forum, #tags, content" -msgstr "" - -#: include/nav.php:81 view/theme/frio/theme.php:250 boot.php:874 -msgid "Logout" -msgstr "" - -#: include/nav.php:81 view/theme/frio/theme.php:250 -msgid "End this session" -msgstr "" - -#: include/nav.php:84 include/identity.php:785 mod/contacts.php:667 -#: mod/contacts.php:863 view/theme/frio/theme.php:253 -msgid "Status" -msgstr "" - -#: include/nav.php:84 include/nav.php:164 view/theme/frio/theme.php:253 -msgid "Your posts and conversations" -msgstr "" - -#: include/nav.php:85 include/identity.php:631 include/identity.php:760 -#: include/identity.php:793 mod/newmember.php:20 mod/profperm.php:107 -#: mod/contacts.php:669 mod/contacts.php:871 view/theme/frio/theme.php:254 -msgid "Profile" -msgstr "" - -#: include/nav.php:85 view/theme/frio/theme.php:254 -msgid "Your profile page" -msgstr "" - -#: include/nav.php:86 include/identity.php:801 mod/fbrowser.php:34 -#: view/theme/frio/theme.php:255 -msgid "Photos" -msgstr "" - -#: include/nav.php:86 view/theme/frio/theme.php:255 -msgid "Your photos" -msgstr "" - -#: include/nav.php:87 include/identity.php:809 include/identity.php:812 -#: view/theme/frio/theme.php:256 -msgid "Videos" -msgstr "" - -#: include/nav.php:87 view/theme/frio/theme.php:256 -msgid "Your videos" -msgstr "" - -#: include/nav.php:88 include/nav.php:152 include/identity.php:821 -#: include/identity.php:832 mod/cal.php:273 mod/events.php:383 -#: view/theme/frio/theme.php:257 view/theme/frio/theme.php:261 -msgid "Events" -msgstr "" - -#: include/nav.php:88 view/theme/frio/theme.php:257 -msgid "Your events" -msgstr "" - -#: include/nav.php:89 -msgid "Personal notes" -msgstr "" - -#: include/nav.php:89 -msgid "Your personal notes" -msgstr "" - -#: include/nav.php:98 mod/bookmarklet.php:15 boot.php:875 -msgid "Login" -msgstr "" - -#: include/nav.php:98 -msgid "Sign in" -msgstr "" - -#: include/nav.php:108 -msgid "Home Page" -msgstr "" - -#: include/nav.php:112 mod/register.php:294 boot.php:851 -msgid "Register" -msgstr "" - -#: include/nav.php:112 -msgid "Create an account" -msgstr "" - -#: include/nav.php:118 mod/help.php:51 view/theme/vier/theme.php:292 -msgid "Help" -msgstr "" - -#: include/nav.php:118 -msgid "Help and documentation" -msgstr "" - -#: include/nav.php:122 -msgid "Apps" -msgstr "" - -#: include/nav.php:122 -msgid "Addon applications, utilities, games" -msgstr "" - -#: include/nav.php:126 include/text.php:1087 mod/search.php:145 -msgid "Search" -msgstr "" - -#: include/nav.php:126 -msgid "Search site content" -msgstr "" - -#: include/nav.php:129 include/text.php:1095 -msgid "Full Text" -msgstr "" - -#: include/nav.php:130 include/text.php:1096 -msgid "Tags" -msgstr "" - -#: include/nav.php:131 include/nav.php:195 include/identity.php:854 -#: include/identity.php:857 include/text.php:1097 mod/viewcontacts.php:124 -#: mod/contacts.php:822 mod/contacts.php:883 view/theme/frio/theme.php:264 -msgid "Contacts" -msgstr "" - -#: include/nav.php:146 include/nav.php:148 mod/community.php:31 -msgid "Community" -msgstr "" - -#: include/nav.php:146 -msgid "Conversations on this site" -msgstr "" - -#: include/nav.php:148 -msgid "Conversations on the network" -msgstr "" - -#: include/nav.php:152 include/identity.php:824 include/identity.php:835 -#: view/theme/frio/theme.php:261 -msgid "Events and Calendar" -msgstr "" - -#: include/nav.php:155 -msgid "Directory" -msgstr "" - -#: include/nav.php:155 -msgid "People directory" -msgstr "" - -#: include/nav.php:157 -msgid "Information" -msgstr "" - -#: include/nav.php:157 -msgid "Information about this friendica instance" -msgstr "" - -#: include/nav.php:161 view/theme/frio/theme.php:260 -msgid "Conversations from your friends" -msgstr "" - -#: include/nav.php:162 -msgid "Network Reset" -msgstr "" - -#: include/nav.php:162 -msgid "Load Network page with no filters" -msgstr "" - -#: include/nav.php:169 -msgid "Friend Requests" -msgstr "" - -#: include/nav.php:172 mod/notifications.php:99 -msgid "Notifications" -msgstr "" - -#: include/nav.php:173 -msgid "See all notifications" -msgstr "" - -#: include/nav.php:174 mod/settings.php:911 -msgid "Mark as seen" -msgstr "" - -#: include/nav.php:174 -msgid "Mark all system notifications seen" -msgstr "" - -#: include/nav.php:178 mod/message.php:180 view/theme/frio/theme.php:262 -msgid "Messages" -msgstr "" - -#: include/nav.php:178 view/theme/frio/theme.php:262 -msgid "Private mail" -msgstr "" - -#: include/nav.php:179 -msgid "Inbox" -msgstr "" - -#: include/nav.php:180 -msgid "Outbox" -msgstr "" - -#: include/nav.php:181 mod/message.php:19 -msgid "New Message" -msgstr "" - -#: include/nav.php:184 -msgid "Manage" -msgstr "" - -#: include/nav.php:184 -msgid "Manage other pages" -msgstr "" - -#: include/nav.php:187 mod/settings.php:81 -msgid "Delegations" -msgstr "" - -#: include/nav.php:187 mod/delegate.php:130 -msgid "Delegate Page Management" -msgstr "" - -#: include/nav.php:189 mod/newmember.php:15 mod/admin.php:1740 -#: mod/admin.php:2016 mod/settings.php:111 view/theme/frio/theme.php:263 -msgid "Settings" -msgstr "" - -#: include/nav.php:189 view/theme/frio/theme.php:263 -msgid "Account settings" -msgstr "" - -#: include/nav.php:192 include/identity.php:294 -msgid "Profiles" -msgstr "" - -#: include/nav.php:192 -msgid "Manage/Edit Profiles" -msgstr "" - -#: include/nav.php:195 view/theme/frio/theme.php:264 -msgid "Manage/edit friends and contacts" -msgstr "" - -#: include/nav.php:200 mod/admin.php:204 -msgid "Admin" -msgstr "" - -#: include/nav.php:200 -msgid "Site setup and configuration" -msgstr "" - -#: include/nav.php:203 -msgid "Navigation" -msgstr "" - -#: include/nav.php:203 -msgid "Site map" -msgstr "" - -#: include/Contact.php:397 include/Contact.php:410 include/Contact.php:455 -#: include/conversation.php:1022 include/conversation.php:1038 -#: mod/allfriends.php:71 mod/match.php:77 mod/suggest.php:82 -#: mod/directory.php:151 mod/dirfind.php:213 -msgid "View Profile" -msgstr "" - -#: include/Contact.php:454 include/conversation.php:1021 -msgid "View Status" -msgstr "" - -#: include/Contact.php:456 include/conversation.php:1023 -msgid "View Photos" -msgstr "" - -#: include/Contact.php:457 include/conversation.php:1024 -msgid "Network Posts" -msgstr "" - -#: include/Contact.php:458 include/conversation.php:1025 -msgid "View Contact" -msgstr "" - -#: include/Contact.php:459 -msgid "Drop Contact" -msgstr "" - -#: include/Contact.php:460 include/conversation.php:1026 -msgid "Send PM" -msgstr "" - -#: include/Contact.php:461 include/conversation.php:1030 -msgid "Poke" -msgstr "" - -#: include/Contact.php:884 -msgid "Organisation" -msgstr "" - -#: include/Contact.php:887 -msgid "News" -msgstr "" - -#: include/Contact.php:890 -msgid "Forum" -msgstr "" - -#: include/Photo.php:995 include/Photo.php:1011 include/Photo.php:1019 -#: include/Photo.php:1044 include/message.php:139 mod/item.php:470 -#: mod/wall_upload.php:227 -msgid "Wall Photos" -msgstr "" - -#: include/acl_selectors.php:355 -msgid "Post to Email" -msgstr "" - -#: include/acl_selectors.php:360 -#, php-format -msgid "Connectors disabled, since \"%s\" is enabled." -msgstr "" - -#: include/acl_selectors.php:361 mod/settings.php:1175 -msgid "Hide your profile details from unknown viewers?" -msgstr "" - -#: include/acl_selectors.php:367 -msgid "Visible to everybody" -msgstr "" - -#: include/acl_selectors.php:368 view/theme/vier/config.php:110 -msgid "show" -msgstr "" - -#: include/acl_selectors.php:369 view/theme/vier/config.php:110 -msgid "don't show" -msgstr "" - -#: include/acl_selectors.php:375 mod/editpost.php:126 -msgid "CC: email addresses" -msgstr "" - -#: include/acl_selectors.php:376 mod/editpost.php:133 -msgid "Example: bob@example.com, mary@example.com" -msgstr "" - -#: include/acl_selectors.php:378 mod/events.php:532 mod/photos.php:1173 -#: mod/photos.php:1570 -msgid "Permissions" -msgstr "" - -#: include/acl_selectors.php:379 -msgid "Close" -msgstr "" - -#: include/api.php:1104 -#, php-format -msgid "Daily posting limit of %d posts reached. The post was rejected." -msgstr "" - -#: include/api.php:1125 -#, php-format -msgid "Weekly posting limit of %d posts reached. The post was rejected." -msgstr "" - -#: include/api.php:1146 -#, php-format -msgid "Monthly posting limit of %d posts reached. The post was rejected." -msgstr "" - -#: include/api.php:3718 include/user.php:302 include/user.php:310 -#: include/user.php:318 mod/photos.php:75 mod/photos.php:191 mod/photos.php:778 -#: mod/photos.php:1233 mod/photos.php:1254 mod/photos.php:1840 -#: mod/profile_photo.php:76 mod/profile_photo.php:84 mod/profile_photo.php:92 -#: mod/profile_photo.php:216 mod/profile_photo.php:311 -#: mod/profile_photo.php:321 -msgid "Profile Photos" -msgstr "" - -#: include/bbcode.php:429 include/bbcode.php:1192 include/bbcode.php:1193 -msgid "Image/photo" -msgstr "" - -#: include/bbcode.php:545 -#, php-format -msgid "%2$s %3$s" -msgstr "" - -#: include/bbcode.php:1149 include/bbcode.php:1171 -msgid "$1 wrote:" -msgstr "" - -#: include/bbcode.php:1201 include/bbcode.php:1202 -msgid "Encrypted content" -msgstr "" - -#: include/bbcode.php:1321 -msgid "Invalid source protocol" -msgstr "" - -#: include/bbcode.php:1332 -msgid "Invalid link protocol" -msgstr "" - -#: include/contact_selectors.php:32 -msgid "Unknown | Not categorised" -msgstr "" - -#: include/contact_selectors.php:33 -msgid "Block immediately" -msgstr "" - -#: include/contact_selectors.php:34 -msgid "Shady, spammer, self-marketer" -msgstr "" - -#: include/contact_selectors.php:35 -msgid "Known to me, but no opinion" -msgstr "" - -#: include/contact_selectors.php:36 -msgid "OK, probably harmless" -msgstr "" - -#: include/contact_selectors.php:37 -msgid "Reputable, has my trust" -msgstr "" - -#: include/contact_selectors.php:56 mod/admin.php:1095 -msgid "Frequently" -msgstr "" - -#: include/contact_selectors.php:57 mod/admin.php:1096 -msgid "Hourly" -msgstr "" - -#: include/contact_selectors.php:58 mod/admin.php:1097 -msgid "Twice daily" -msgstr "" - -#: include/contact_selectors.php:59 mod/admin.php:1098 -msgid "Daily" -msgstr "" - -#: include/contact_selectors.php:60 -msgid "Weekly" -msgstr "" - -#: include/contact_selectors.php:61 -msgid "Monthly" -msgstr "" - -#: include/contact_selectors.php:76 mod/dfrn_request.php:887 -msgid "Friendica" -msgstr "" - -#: include/contact_selectors.php:77 -msgid "OStatus" -msgstr "" - -#: include/contact_selectors.php:78 -msgid "RSS/Atom" -msgstr "" - -#: include/contact_selectors.php:79 include/contact_selectors.php:86 -#: mod/admin.php:1612 mod/admin.php:1625 mod/admin.php:1638 mod/admin.php:1656 -msgid "Email" -msgstr "" - -#: include/contact_selectors.php:80 mod/dfrn_request.php:889 -#: mod/settings.php:858 -msgid "Diaspora" -msgstr "" - -#: include/contact_selectors.php:81 -msgid "Facebook" -msgstr "" - -#: include/contact_selectors.php:82 -msgid "Zot!" -msgstr "" - -#: include/contact_selectors.php:83 -msgid "LinkedIn" -msgstr "" - -#: include/contact_selectors.php:84 -msgid "XMPP/IM" -msgstr "" - -#: include/contact_selectors.php:85 -msgid "MySpace" -msgstr "" - -#: include/contact_selectors.php:87 -msgid "Google+" -msgstr "" - -#: include/contact_selectors.php:88 -msgid "pump.io" -msgstr "" - -#: include/contact_selectors.php:89 -msgid "Twitter" -msgstr "" - -#: include/contact_selectors.php:90 -msgid "Diaspora Connector" -msgstr "" - -#: include/contact_selectors.php:91 -msgid "GNU Social Connector" -msgstr "" - -#: include/contact_selectors.php:92 -msgid "pnut" -msgstr "" - -#: include/contact_selectors.php:93 -msgid "App.net" -msgstr "" - -#: include/conversation.php:135 include/conversation.php:287 -#: include/like.php:185 include/text.php:1894 -msgid "event" -msgstr "" - -#: include/conversation.php:138 include/conversation.php:148 -#: include/conversation.php:290 include/conversation.php:299 -#: include/diaspora.php:1787 include/like.php:183 mod/subthread.php:90 -#: mod/tagger.php:65 -msgid "status" +#: include/contact_widgets.php:270 include/items.php:2395 +#: view/theme/vier/theme.php:254 src/App.php:523 +#: src/Content/ForumManager.php:126 src/Object/Item.php:422 +msgid "show more" msgstr "" #: include/conversation.php:143 include/conversation.php:295 -#: include/like.php:183 include/text.php:1896 mod/subthread.php:90 -#: mod/tagger.php:65 +#: include/like.php:184 include/text.php:1783 +msgid "event" +msgstr "" + +#: include/conversation.php:146 include/conversation.php:156 +#: include/conversation.php:298 include/conversation.php:307 +#: include/like.php:182 mod/subthread.php:91 mod/tagger.php:66 +#: src/Protocol/Diaspora.php:1893 +msgid "status" +msgstr "" + +#: include/conversation.php:151 include/conversation.php:303 +#: include/like.php:182 include/text.php:1785 mod/subthread.php:91 +#: mod/tagger.php:66 msgid "photo" msgstr "" -#: include/conversation.php:155 include/diaspora.php:1783 include/like.php:32 +#: include/conversation.php:163 include/like.php:33 +#: src/Protocol/Diaspora.php:1889 #, php-format msgid "%1$s likes %2$s's %3$s" msgstr "" -#: include/conversation.php:158 include/like.php:36 include/like.php:41 +#: include/conversation.php:166 include/like.php:37 include/like.php:42 #, php-format msgid "%1$s doesn't like %2$s's %3$s" msgstr "" -#: include/conversation.php:161 +#: include/conversation.php:169 #, php-format msgid "%1$s attends %2$s's %3$s" msgstr "" -#: include/conversation.php:164 +#: include/conversation.php:172 #, php-format msgid "%1$s doesn't attend %2$s's %3$s" msgstr "" -#: include/conversation.php:167 +#: include/conversation.php:175 #, php-format msgid "%1$s attends maybe %2$s's %3$s" msgstr "" -#: include/conversation.php:200 mod/dfrn_confirm.php:481 +#: include/conversation.php:208 mod/dfrn_confirm.php:484 #, php-format msgid "%1$s is now friends with %2$s" msgstr "" -#: include/conversation.php:241 +#: include/conversation.php:249 #, php-format msgid "%1$s poked %2$s" msgstr "" -#: include/conversation.php:262 mod/mood.php:66 +#: include/conversation.php:270 mod/mood.php:67 #, php-format msgid "%1$s is currently %2$s" msgstr "" -#: include/conversation.php:309 mod/tagger.php:98 +#: include/conversation.php:317 mod/tagger.php:99 #, php-format msgid "%1$s tagged %2$s's %3$s with %4$s" msgstr "" -#: include/conversation.php:336 +#: include/conversation.php:344 msgid "post/item" msgstr "" -#: include/conversation.php:337 +#: include/conversation.php:345 #, php-format msgid "%1$s marked %2$s's %3$s as favorite" msgstr "" -#: include/conversation.php:623 mod/photos.php:1639 mod/profiles.php:340 +#: include/conversation.php:630 mod/photos.php:1621 mod/profiles.php:344 msgid "Likes" msgstr "" -#: include/conversation.php:623 mod/photos.php:1639 mod/profiles.php:344 +#: include/conversation.php:630 mod/photos.php:1621 mod/profiles.php:348 msgid "Dislikes" msgstr "" -#: include/conversation.php:624 include/conversation.php:1559 -#: mod/photos.php:1640 +#: include/conversation.php:631 include/conversation.php:1639 +#: mod/photos.php:1622 msgid "Attending" msgid_plural "Attending" msgstr[0] "" msgstr[1] "" -#: include/conversation.php:624 mod/photos.php:1640 +#: include/conversation.php:631 mod/photos.php:1622 msgid "Not attending" msgstr "" -#: include/conversation.php:624 mod/photos.php:1640 +#: include/conversation.php:631 mod/photos.php:1622 msgid "Might attend" msgstr "" -#: include/conversation.php:761 mod/photos.php:1705 object/Item.php:147 +#: include/conversation.php:768 mod/photos.php:1687 src/Object/Item.php:164 msgid "Select" msgstr "" -#: include/conversation.php:762 mod/admin.php:1630 mod/contacts.php:838 -#: mod/contacts.php:1037 mod/photos.php:1706 mod/settings.php:754 -#: object/Item.php:148 +#: include/conversation.php:769 mod/admin.php:1630 mod/contacts.php:846 +#: mod/contacts.php:1045 mod/photos.php:1688 mod/settings.php:759 +#: src/Object/Item.php:165 msgid "Delete" msgstr "" -#: include/conversation.php:806 object/Item.php:350 object/Item.php:351 +#: include/conversation.php:802 src/Object/Item.php:355 src/Object/Item.php:356 #, php-format msgid "View %s's profile @ %s" msgstr "" -#: include/conversation.php:818 object/Item.php:338 +#: include/conversation.php:814 src/Object/Item.php:343 msgid "Categories:" msgstr "" -#: include/conversation.php:819 object/Item.php:339 +#: include/conversation.php:815 src/Object/Item.php:344 msgid "Filed under:" msgstr "" -#: include/conversation.php:826 object/Item.php:364 +#: include/conversation.php:822 src/Object/Item.php:369 #, php-format msgid "%s from %s" msgstr "" -#: include/conversation.php:842 +#: include/conversation.php:838 msgid "View in context" msgstr "" -#: include/conversation.php:844 include/conversation.php:1316 -#: mod/editpost.php:117 mod/message.php:337 mod/message.php:522 -#: mod/wallmessage.php:143 mod/photos.php:1604 object/Item.php:389 +#: include/conversation.php:840 include/conversation.php:1309 +#: mod/editpost.php:119 mod/message.php:339 mod/message.php:513 +#: mod/photos.php:1586 mod/wallmessage.php:144 src/Object/Item.php:394 msgid "Please wait" msgstr "" -#: include/conversation.php:921 +#: include/conversation.php:914 msgid "remove" msgstr "" -#: include/conversation.php:925 +#: include/conversation.php:918 msgid "Delete Selected Items" msgstr "" -#: include/conversation.php:1020 view/theme/frio/theme.php:347 +#: include/conversation.php:1013 view/theme/frio/theme.php:350 msgid "Follow Thread" msgstr "" -#: include/conversation.php:1157 +#: include/conversation.php:1014 src/Object/Contact.php:435 +msgid "View Status" +msgstr "" + +#: include/conversation.php:1015 include/conversation.php:1031 +#: mod/allfriends.php:74 mod/directory.php:149 mod/dirfind.php:217 +#: mod/match.php:86 mod/suggest.php:86 src/Object/Contact.php:379 +#: src/Object/Contact.php:391 src/Object/Contact.php:436 +msgid "View Profile" +msgstr "" + +#: include/conversation.php:1016 src/Object/Contact.php:437 +msgid "View Photos" +msgstr "" + +#: include/conversation.php:1017 src/Object/Contact.php:438 +msgid "Network Posts" +msgstr "" + +#: include/conversation.php:1018 src/Object/Contact.php:439 +msgid "View Contact" +msgstr "" + +#: include/conversation.php:1019 src/Object/Contact.php:441 +msgid "Send PM" +msgstr "" + +#: include/conversation.php:1023 src/Object/Contact.php:442 +msgid "Poke" +msgstr "" + +#: include/conversation.php:1150 #, php-format msgid "%s likes this." msgstr "" -#: include/conversation.php:1160 +#: include/conversation.php:1153 #, php-format msgid "%s doesn't like this." msgstr "" -#: include/conversation.php:1163 +#: include/conversation.php:1156 #, php-format msgid "%s attends." msgstr "" -#: include/conversation.php:1166 +#: include/conversation.php:1159 #, php-format msgid "%s doesn't attend." msgstr "" -#: include/conversation.php:1169 +#: include/conversation.php:1162 #, php-format msgid "%s attends maybe." msgstr "" -#: include/conversation.php:1180 +#: include/conversation.php:1173 msgid "and" msgstr "" -#: include/conversation.php:1186 +#: include/conversation.php:1179 #, php-format msgid ", and %d other people" msgstr "" -#: include/conversation.php:1195 +#: include/conversation.php:1188 #, php-format msgid "%2$d people like this" msgstr "" -#: include/conversation.php:1196 +#: include/conversation.php:1189 #, php-format msgid "%s like this." msgstr "" -#: include/conversation.php:1199 +#: include/conversation.php:1192 #, php-format msgid "%2$d people don't like this" msgstr "" -#: include/conversation.php:1200 +#: include/conversation.php:1193 #, php-format msgid "%s don't like this." msgstr "" -#: include/conversation.php:1203 +#: include/conversation.php:1196 #, php-format msgid "%2$d people attend" msgstr "" -#: include/conversation.php:1204 +#: include/conversation.php:1197 #, php-format msgid "%s attend." msgstr "" -#: include/conversation.php:1207 +#: include/conversation.php:1200 #, php-format msgid "%2$d people don't attend" msgstr "" -#: include/conversation.php:1208 +#: include/conversation.php:1201 #, php-format msgid "%s don't attend." msgstr "" -#: include/conversation.php:1211 +#: include/conversation.php:1204 #, php-format msgid "%2$d people attend maybe" msgstr "" -#: include/conversation.php:1212 +#: include/conversation.php:1205 #, php-format msgid "%s anttend maybe." msgstr "" -#: include/conversation.php:1241 include/conversation.php:1257 +#: include/conversation.php:1234 include/conversation.php:1250 msgid "Visible to everybody" msgstr "" -#: include/conversation.php:1242 include/conversation.php:1258 -#: mod/message.php:271 mod/message.php:278 mod/message.php:418 -#: mod/message.php:425 mod/wallmessage.php:117 mod/wallmessage.php:124 +#: include/conversation.php:1235 include/conversation.php:1251 +#: mod/message.php:273 mod/message.php:280 mod/message.php:420 +#: mod/message.php:427 mod/wallmessage.php:118 mod/wallmessage.php:125 msgid "Please enter a link URL:" msgstr "" -#: include/conversation.php:1243 include/conversation.php:1259 +#: include/conversation.php:1236 include/conversation.php:1252 msgid "Please enter a video link/URL:" msgstr "" -#: include/conversation.php:1244 include/conversation.php:1260 +#: include/conversation.php:1237 include/conversation.php:1253 msgid "Please enter an audio link/URL:" msgstr "" -#: include/conversation.php:1245 include/conversation.php:1261 +#: include/conversation.php:1238 include/conversation.php:1254 msgid "Tag term:" msgstr "" -#: include/conversation.php:1246 include/conversation.php:1262 mod/filer.php:31 +#: include/conversation.php:1239 include/conversation.php:1255 mod/filer.php:32 msgid "Save to Folder:" msgstr "" -#: include/conversation.php:1247 include/conversation.php:1263 +#: include/conversation.php:1240 include/conversation.php:1256 msgid "Where are you right now?" msgstr "" -#: include/conversation.php:1248 +#: include/conversation.php:1241 msgid "Delete item(s)?" msgstr "" -#: include/conversation.php:1297 +#: include/conversation.php:1290 msgid "Share" msgstr "" -#: include/conversation.php:1298 mod/editpost.php:103 mod/message.php:335 -#: mod/message.php:519 mod/wallmessage.php:141 +#: include/conversation.php:1291 mod/editpost.php:105 mod/message.php:337 +#: mod/message.php:510 mod/wallmessage.php:142 msgid "Upload photo" msgstr "" -#: include/conversation.php:1299 mod/editpost.php:104 +#: include/conversation.php:1292 mod/editpost.php:106 msgid "upload photo" msgstr "" -#: include/conversation.php:1300 mod/editpost.php:105 +#: include/conversation.php:1293 mod/editpost.php:107 msgid "Attach file" msgstr "" -#: include/conversation.php:1301 mod/editpost.php:106 +#: include/conversation.php:1294 mod/editpost.php:108 msgid "attach file" msgstr "" -#: include/conversation.php:1302 mod/editpost.php:107 mod/message.php:336 -#: mod/message.php:520 mod/wallmessage.php:142 +#: include/conversation.php:1295 mod/editpost.php:109 mod/message.php:338 +#: mod/message.php:511 mod/wallmessage.php:143 msgid "Insert web link" msgstr "" -#: include/conversation.php:1303 mod/editpost.php:108 +#: include/conversation.php:1296 mod/editpost.php:110 msgid "web link" msgstr "" -#: include/conversation.php:1304 mod/editpost.php:109 +#: include/conversation.php:1297 mod/editpost.php:111 msgid "Insert video link" msgstr "" -#: include/conversation.php:1305 mod/editpost.php:110 +#: include/conversation.php:1298 mod/editpost.php:112 msgid "video link" msgstr "" -#: include/conversation.php:1306 mod/editpost.php:111 +#: include/conversation.php:1299 mod/editpost.php:113 msgid "Insert audio link" msgstr "" -#: include/conversation.php:1307 mod/editpost.php:112 +#: include/conversation.php:1300 mod/editpost.php:114 msgid "audio link" msgstr "" -#: include/conversation.php:1308 mod/editpost.php:113 +#: include/conversation.php:1301 mod/editpost.php:115 msgid "Set your location" msgstr "" -#: include/conversation.php:1309 mod/editpost.php:114 +#: include/conversation.php:1302 mod/editpost.php:116 msgid "set location" msgstr "" -#: include/conversation.php:1310 mod/editpost.php:115 +#: include/conversation.php:1303 mod/editpost.php:117 msgid "Clear browser location" msgstr "" -#: include/conversation.php:1311 mod/editpost.php:116 +#: include/conversation.php:1304 mod/editpost.php:118 msgid "clear location" msgstr "" -#: include/conversation.php:1313 mod/editpost.php:130 +#: include/conversation.php:1306 mod/editpost.php:132 msgid "Set title" msgstr "" -#: include/conversation.php:1315 mod/editpost.php:132 +#: include/conversation.php:1308 mod/editpost.php:134 msgid "Categories (comma-separated list)" msgstr "" -#: include/conversation.php:1317 mod/editpost.php:118 +#: include/conversation.php:1310 mod/editpost.php:120 msgid "Permission settings" msgstr "" -#: include/conversation.php:1318 mod/editpost.php:147 +#: include/conversation.php:1311 mod/editpost.php:149 msgid "permissions" msgstr "" -#: include/conversation.php:1326 mod/editpost.php:127 +#: include/conversation.php:1319 mod/editpost.php:129 msgid "Public post" msgstr "" -#: include/conversation.php:1331 mod/editpost.php:138 mod/events.php:527 -#: mod/photos.php:1624 mod/photos.php:1666 mod/photos.php:1746 -#: object/Item.php:711 +#: include/conversation.php:1324 mod/editpost.php:140 mod/events.php:529 +#: mod/photos.php:1606 mod/photos.php:1648 mod/photos.php:1722 +#: src/Object/Item.php:796 msgid "Preview" msgstr "" -#: include/conversation.php:1335 include/items.php:2154 -#: mod/dfrn_request.php:895 mod/editpost.php:141 mod/follow.php:161 -#: mod/message.php:210 mod/tagrm.php:14 mod/tagrm.php:99 mod/suggest.php:35 -#: mod/fbrowser.php:104 mod/fbrowser.php:139 mod/unfollow.php:117 -#: mod/contacts.php:469 mod/photos.php:249 mod/photos.php:341 -#: mod/settings.php:692 mod/settings.php:718 mod/videos.php:136 +#: include/conversation.php:1328 include/items.php:2148 mod/contacts.php:470 +#: mod/dfrn_request.php:897 mod/editpost.php:143 mod/fbrowser.php:98 +#: mod/fbrowser.php:128 mod/follow.php:162 mod/message.php:212 +#: mod/photos.php:251 mod/photos.php:343 mod/settings.php:697 +#: mod/settings.php:723 mod/suggest.php:39 mod/tagrm.php:15 mod/tagrm.php:100 +#: mod/unfollow.php:116 mod/videos.php:139 msgid "Cancel" msgstr "" -#: include/conversation.php:1341 +#: include/conversation.php:1334 msgid "Post to Groups" msgstr "" -#: include/conversation.php:1342 +#: include/conversation.php:1335 msgid "Post to Contacts" msgstr "" -#: include/conversation.php:1343 +#: include/conversation.php:1336 msgid "Private post" msgstr "" -#: include/conversation.php:1348 include/identity.php:268 mod/editpost.php:145 +#: include/conversation.php:1341 include/identity.php:283 mod/editpost.php:147 msgid "Message" msgstr "" -#: include/conversation.php:1349 mod/editpost.php:146 +#: include/conversation.php:1342 mod/editpost.php:148 msgid "Browser" msgstr "" -#: include/conversation.php:1531 +#: include/conversation.php:1611 msgid "View all" msgstr "" -#: include/conversation.php:1553 +#: include/conversation.php:1633 msgid "Like" msgid_plural "Likes" msgstr[0] "" msgstr[1] "" -#: include/conversation.php:1556 +#: include/conversation.php:1636 msgid "Dislike" msgid_plural "Dislikes" msgstr[0] "" msgstr[1] "" -#: include/conversation.php:1562 +#: include/conversation.php:1642 msgid "Not Attending" msgid_plural "Not Attending" msgstr[0] "" msgstr[1] "" +#: include/datetime.php:68 include/datetime.php:70 mod/profiles.php:701 +msgid "Miscellaneous" +msgstr "" + +#: include/datetime.php:198 include/identity.php:698 +msgid "Birthday:" +msgstr "" + +#: include/datetime.php:200 mod/profiles.php:724 +msgid "Age: " +msgstr "" + +#: include/datetime.php:202 +msgid "YYYY-MM-DD or MM-DD" +msgstr "" + +#: include/datetime.php:369 +msgid "never" +msgstr "" + +#: include/datetime.php:375 +msgid "less than a second ago" +msgstr "" + +#: include/datetime.php:378 +msgid "year" +msgstr "" + +#: include/datetime.php:378 +msgid "years" +msgstr "" + +#: include/datetime.php:379 include/event.php:489 mod/cal.php:285 +#: mod/events.php:395 +msgid "month" +msgstr "" + +#: include/datetime.php:379 +msgid "months" +msgstr "" + +#: include/datetime.php:380 include/event.php:490 mod/cal.php:286 +#: mod/events.php:396 +msgid "week" +msgstr "" + +#: include/datetime.php:380 +msgid "weeks" +msgstr "" + +#: include/datetime.php:381 include/event.php:491 mod/cal.php:287 +#: mod/events.php:397 +msgid "day" +msgstr "" + +#: include/datetime.php:381 +msgid "days" +msgstr "" + +#: include/datetime.php:382 +msgid "hour" +msgstr "" + +#: include/datetime.php:382 +msgid "hours" +msgstr "" + +#: include/datetime.php:383 +msgid "minute" +msgstr "" + +#: include/datetime.php:383 +msgid "minutes" +msgstr "" + +#: include/datetime.php:384 +msgid "second" +msgstr "" + +#: include/datetime.php:384 +msgid "seconds" +msgstr "" + +#: include/datetime.php:393 +#, php-format +msgid "%1$d %2$s ago" +msgstr "" + +#: include/datetime.php:619 +#, php-format +msgid "%s's birthday" +msgstr "" + +#: include/datetime.php:620 src/Protocol/DFRN.php:1417 +#, php-format +msgid "Happy Birthday %s" +msgstr "" + #: include/dba.php:57 #, php-format msgid "Cannot locate DNS info for database server '%s'" msgstr "" -#: include/dbstructure.php:24 +#: include/dbstructure.php:25 msgid "There are no tables on MyISAM." msgstr "" -#: include/dbstructure.php:65 +#: include/dbstructure.php:66 #, php-format msgid "" "\n" @@ -2100,14 +1161,14 @@ msgid "" "might be invalid." msgstr "" -#: include/dbstructure.php:70 +#: include/dbstructure.php:71 #, php-format msgid "" "The error message is\n" "[pre]%s[/pre]" msgstr "" -#: include/dbstructure.php:192 +#: include/dbstructure.php:193 #, php-format msgid "" "\n" @@ -2115,854 +1176,1687 @@ msgid "" "%s\n" msgstr "" -#: include/dbstructure.php:195 +#: include/dbstructure.php:196 msgid "Errors encountered performing database changes: " msgstr "" -#: include/dbstructure.php:203 +#: include/dbstructure.php:204 msgid ": Database update" msgstr "" -#: include/dbstructure.php:436 +#: include/dbstructure.php:437 #, php-format msgid "%s: updating %s table." msgstr "" -#: include/delivery.php:429 -msgid "(no subject)" +#: include/enotify.php:32 +msgid "Friendica Notification" msgstr "" -#: include/dfrn.php:1360 +#: include/enotify.php:35 +msgid "Thank You," +msgstr "" + +#: include/enotify.php:38 #, php-format -msgid "%s\\'s birthday" +msgid "%s Administrator" msgstr "" -#: include/diaspora.php:2351 -msgid "Sharing notification from Diaspora network" +#: include/enotify.php:40 +#, php-format +msgid "%1$s, %2$s Administrator" msgstr "" -#: include/diaspora.php:3344 -msgid "Attachments:" +#: include/enotify.php:51 src/Worker/Delivery.php:433 +msgid "noreply" msgstr "" -#: include/event.php:445 +#: include/enotify.php:85 +#, php-format +msgid "%s " +msgstr "" + +#: include/enotify.php:98 +#, php-format +msgid "[Friendica:Notify] New mail received at %s" +msgstr "" + +#: include/enotify.php:100 +#, php-format +msgid "%1$s sent you a new private message at %2$s." +msgstr "" + +#: include/enotify.php:101 +#, php-format +msgid "%1$s sent you %2$s." +msgstr "" + +#: include/enotify.php:101 +msgid "a private message" +msgstr "" + +#: include/enotify.php:103 +#, php-format +msgid "Please visit %s to view and/or reply to your private messages." +msgstr "" + +#: include/enotify.php:149 +#, php-format +msgid "%1$s commented on [url=%2$s]a %3$s[/url]" +msgstr "" + +#: include/enotify.php:156 +#, php-format +msgid "%1$s commented on [url=%2$s]%3$s's %4$s[/url]" +msgstr "" + +#: include/enotify.php:164 +#, php-format +msgid "%1$s commented on [url=%2$s]your %3$s[/url]" +msgstr "" + +#: include/enotify.php:174 +#, php-format +msgid "[Friendica:Notify] Comment to conversation #%1$d by %2$s" +msgstr "" + +#: include/enotify.php:176 +#, php-format +msgid "%s commented on an item/conversation you have been following." +msgstr "" + +#: include/enotify.php:179 include/enotify.php:193 include/enotify.php:207 +#: include/enotify.php:221 include/enotify.php:239 include/enotify.php:253 +#, php-format +msgid "Please visit %s to view and/or reply to the conversation." +msgstr "" + +#: include/enotify.php:186 +#, php-format +msgid "[Friendica:Notify] %s posted to your profile wall" +msgstr "" + +#: include/enotify.php:188 +#, php-format +msgid "%1$s posted to your profile wall at %2$s" +msgstr "" + +#: include/enotify.php:189 +#, php-format +msgid "%1$s posted to [url=%2$s]your wall[/url]" +msgstr "" + +#: include/enotify.php:200 +#, php-format +msgid "[Friendica:Notify] %s tagged you" +msgstr "" + +#: include/enotify.php:202 +#, php-format +msgid "%1$s tagged you at %2$s" +msgstr "" + +#: include/enotify.php:203 +#, php-format +msgid "%1$s [url=%2$s]tagged you[/url]." +msgstr "" + +#: include/enotify.php:214 +#, php-format +msgid "[Friendica:Notify] %s shared a new post" +msgstr "" + +#: include/enotify.php:216 +#, php-format +msgid "%1$s shared a new post at %2$s" +msgstr "" + +#: include/enotify.php:217 +#, php-format +msgid "%1$s [url=%2$s]shared a post[/url]." +msgstr "" + +#: include/enotify.php:228 +#, php-format +msgid "[Friendica:Notify] %1$s poked you" +msgstr "" + +#: include/enotify.php:230 +#, php-format +msgid "%1$s poked you at %2$s" +msgstr "" + +#: include/enotify.php:231 +#, php-format +msgid "%1$s [url=%2$s]poked you[/url]." +msgstr "" + +#: include/enotify.php:246 +#, php-format +msgid "[Friendica:Notify] %s tagged your post" +msgstr "" + +#: include/enotify.php:248 +#, php-format +msgid "%1$s tagged your post at %2$s" +msgstr "" + +#: include/enotify.php:249 +#, php-format +msgid "%1$s tagged [url=%2$s]your post[/url]" +msgstr "" + +#: include/enotify.php:260 +msgid "[Friendica:Notify] Introduction received" +msgstr "" + +#: include/enotify.php:262 +#, php-format +msgid "You've received an introduction from '%1$s' at %2$s" +msgstr "" + +#: include/enotify.php:263 +#, php-format +msgid "You've received [url=%1$s]an introduction[/url] from %2$s." +msgstr "" + +#: include/enotify.php:267 include/enotify.php:310 +#, php-format +msgid "You may visit their profile at %s" +msgstr "" + +#: include/enotify.php:269 +#, php-format +msgid "Please visit %s to approve or reject the introduction." +msgstr "" + +#: include/enotify.php:277 +msgid "[Friendica:Notify] A new person is sharing with you" +msgstr "" + +#: include/enotify.php:279 include/enotify.php:280 +#, php-format +msgid "%1$s is sharing with you at %2$s" +msgstr "" + +#: include/enotify.php:286 +msgid "[Friendica:Notify] You have a new follower" +msgstr "" + +#: include/enotify.php:288 include/enotify.php:289 +#, php-format +msgid "You have a new follower at %2$s : %1$s" +msgstr "" + +#: include/enotify.php:300 +msgid "[Friendica:Notify] Friend suggestion received" +msgstr "" + +#: include/enotify.php:302 +#, php-format +msgid "You've received a friend suggestion from '%1$s' at %2$s" +msgstr "" + +#: include/enotify.php:303 +#, php-format +msgid "You've received [url=%1$s]a friend suggestion[/url] for %2$s from %3$s." +msgstr "" + +#: include/enotify.php:308 +msgid "Name:" +msgstr "" + +#: include/enotify.php:309 +msgid "Photo:" +msgstr "" + +#: include/enotify.php:312 +#, php-format +msgid "Please visit %s to approve or reject the suggestion." +msgstr "" + +#: include/enotify.php:320 include/enotify.php:334 +msgid "[Friendica:Notify] Connection accepted" +msgstr "" + +#: include/enotify.php:322 include/enotify.php:336 +#, php-format +msgid "'%1$s' has accepted your connection request at %2$s" +msgstr "" + +#: include/enotify.php:323 include/enotify.php:337 +#, php-format +msgid "%2$s has accepted your [url=%1$s]connection request[/url]." +msgstr "" + +#: include/enotify.php:327 +msgid "" +"You are now mutual friends and may exchange status updates, photos, and " +"email without restriction." +msgstr "" + +#: include/enotify.php:329 +#, php-format +msgid "Please visit %s if you wish to make any changes to this relationship." +msgstr "" + +#: include/enotify.php:341 +#, php-format +msgid "" +"'%1$s' has chosen to accept you a \"fan\", which restricts some forms of " +"communication - such as private messaging and some profile interactions. If " +"this is a celebrity or community page, these settings were applied " +"automatically." +msgstr "" + +#: include/enotify.php:343 +#, php-format +msgid "" +"'%1$s' may choose to extend this into a two-way or more permissive " +"relationship in the future." +msgstr "" + +#: include/enotify.php:345 +#, php-format +msgid "Please visit %s if you wish to make any changes to this relationship." +msgstr "" + +#: include/enotify.php:355 +msgid "[Friendica System:Notify] registration request" +msgstr "" + +#: include/enotify.php:357 +#, php-format +msgid "You've received a registration request from '%1$s' at %2$s" +msgstr "" + +#: include/enotify.php:358 +#, php-format +msgid "You've received a [url=%1$s]registration request[/url] from %2$s." +msgstr "" + +#: include/enotify.php:362 +#, php-format +msgid "Full Name:\t%1$s\\nSite Location:\t%2$s\\nLogin Name:\t%3$s (%4$s)" +msgstr "" + +#: include/enotify.php:365 +#, php-format +msgid "Please visit %s to approve or reject the request." +msgstr "" + +#: include/event.php:444 msgid "all-day" msgstr "" -#: include/event.php:447 +#: include/event.php:446 msgid "Sun" msgstr "" -#: include/event.php:448 include/text.php:1220 +#: include/event.php:447 include/text.php:1177 msgid "Mon" msgstr "" -#: include/event.php:449 include/text.php:1220 +#: include/event.php:448 include/text.php:1177 msgid "Tue" msgstr "" -#: include/event.php:450 include/text.php:1220 +#: include/event.php:449 include/text.php:1177 msgid "Wed" msgstr "" -#: include/event.php:451 include/text.php:1220 +#: include/event.php:450 include/text.php:1177 msgid "Thu" msgstr "" -#: include/event.php:452 include/text.php:1220 +#: include/event.php:451 include/text.php:1177 msgid "Fri" msgstr "" -#: include/event.php:453 include/text.php:1220 +#: include/event.php:452 include/text.php:1177 msgid "Sat" msgstr "" -#: include/event.php:455 include/text.php:1202 mod/settings.php:986 +#: include/event.php:454 include/text.php:1159 mod/settings.php:988 msgid "Sunday" msgstr "" -#: include/event.php:456 include/text.php:1202 mod/settings.php:986 +#: include/event.php:455 include/text.php:1159 mod/settings.php:988 msgid "Monday" msgstr "" -#: include/event.php:457 include/text.php:1202 +#: include/event.php:456 include/text.php:1159 msgid "Tuesday" msgstr "" -#: include/event.php:458 include/text.php:1202 +#: include/event.php:457 include/text.php:1159 msgid "Wednesday" msgstr "" -#: include/event.php:459 include/text.php:1202 +#: include/event.php:458 include/text.php:1159 msgid "Thursday" msgstr "" -#: include/event.php:460 include/text.php:1202 +#: include/event.php:459 include/text.php:1159 msgid "Friday" msgstr "" -#: include/event.php:461 include/text.php:1202 +#: include/event.php:460 include/text.php:1159 msgid "Saturday" msgstr "" -#: include/event.php:463 include/text.php:1223 +#: include/event.php:462 include/text.php:1180 msgid "Jan" msgstr "" -#: include/event.php:464 include/text.php:1223 +#: include/event.php:463 include/text.php:1180 msgid "Feb" msgstr "" -#: include/event.php:465 include/text.php:1223 +#: include/event.php:464 include/text.php:1180 msgid "Mar" msgstr "" -#: include/event.php:466 include/text.php:1223 +#: include/event.php:465 include/text.php:1180 msgid "Apr" msgstr "" -#: include/event.php:467 include/event.php:480 include/text.php:1206 -#: include/text.php:1223 +#: include/event.php:466 include/event.php:479 include/text.php:1163 +#: include/text.php:1180 msgid "May" msgstr "" -#: include/event.php:468 +#: include/event.php:467 msgid "Jun" msgstr "" -#: include/event.php:469 include/text.php:1223 +#: include/event.php:468 include/text.php:1180 msgid "Jul" msgstr "" -#: include/event.php:470 include/text.php:1223 +#: include/event.php:469 include/text.php:1180 msgid "Aug" msgstr "" -#: include/event.php:471 +#: include/event.php:470 msgid "Sept" msgstr "" -#: include/event.php:472 include/text.php:1223 +#: include/event.php:471 include/text.php:1180 msgid "Oct" msgstr "" -#: include/event.php:473 include/text.php:1223 +#: include/event.php:472 include/text.php:1180 msgid "Nov" msgstr "" -#: include/event.php:474 include/text.php:1223 +#: include/event.php:473 include/text.php:1180 msgid "Dec" msgstr "" -#: include/event.php:476 include/text.php:1206 +#: include/event.php:475 include/text.php:1163 msgid "January" msgstr "" -#: include/event.php:477 include/text.php:1206 +#: include/event.php:476 include/text.php:1163 msgid "February" msgstr "" -#: include/event.php:478 include/text.php:1206 +#: include/event.php:477 include/text.php:1163 msgid "March" msgstr "" -#: include/event.php:479 include/text.php:1206 +#: include/event.php:478 include/text.php:1163 msgid "April" msgstr "" -#: include/event.php:481 include/text.php:1206 +#: include/event.php:480 include/text.php:1163 msgid "June" msgstr "" -#: include/event.php:482 include/text.php:1206 +#: include/event.php:481 include/text.php:1163 msgid "July" msgstr "" -#: include/event.php:483 include/text.php:1206 +#: include/event.php:482 include/text.php:1163 msgid "August" msgstr "" -#: include/event.php:484 include/text.php:1206 +#: include/event.php:483 include/text.php:1163 msgid "September" msgstr "" -#: include/event.php:485 include/text.php:1206 +#: include/event.php:484 include/text.php:1163 msgid "October" msgstr "" -#: include/event.php:486 include/text.php:1206 +#: include/event.php:485 include/text.php:1163 msgid "November" msgstr "" -#: include/event.php:487 include/text.php:1206 +#: include/event.php:486 include/text.php:1163 msgid "December" msgstr "" -#: include/event.php:489 mod/cal.php:281 mod/events.php:392 +#: include/event.php:488 mod/cal.php:284 mod/events.php:394 msgid "today" msgstr "" -#: include/event.php:494 +#: include/event.php:493 msgid "No events to display" msgstr "" -#: include/event.php:608 +#: include/event.php:607 msgid "l, F j" msgstr "" -#: include/event.php:629 +#: include/event.php:628 msgid "Edit event" msgstr "" -#: include/event.php:630 +#: include/event.php:629 msgid "Duplicate event" msgstr "" -#: include/event.php:631 +#: include/event.php:630 msgid "Delete event" msgstr "" -#: include/event.php:658 include/text.php:1618 include/text.php:1625 +#: include/event.php:657 include/text.php:1574 include/text.php:1581 msgid "link to source" msgstr "" -#: include/event.php:915 +#: include/event.php:914 msgid "Export" msgstr "" -#: include/event.php:916 +#: include/event.php:915 msgid "Export calendar as ical" msgstr "" -#: include/event.php:917 +#: include/event.php:916 msgid "Export calendar as csv" msgstr "" -#: include/event.php:934 +#: include/event.php:933 msgid "D g:i A" msgstr "" -#: include/event.php:935 +#: include/event.php:934 msgid "g:i A" msgstr "" -#: include/event.php:1004 include/event.php:1006 +#: include/event.php:1003 include/event.php:1005 msgid "Show map" msgstr "" -#: include/event.php:1005 +#: include/event.php:1004 msgid "Hide map" msgstr "" -#: include/follow.php:87 mod/dfrn_request.php:515 +#: include/features.php:68 +msgid "General Features" +msgstr "" + +#: include/features.php:70 +msgid "Multiple Profiles" +msgstr "" + +#: include/features.php:70 +msgid "Ability to create multiple profiles" +msgstr "" + +#: include/features.php:71 +msgid "Photo Location" +msgstr "" + +#: include/features.php:71 +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:72 +msgid "Export Public Calendar" +msgstr "" + +#: include/features.php:72 +msgid "Ability for visitors to download the public calendar" +msgstr "" + +#: include/features.php:77 +msgid "Post Composition Features" +msgstr "" + +#: include/features.php:78 +msgid "Post Preview" +msgstr "" + +#: include/features.php:78 +msgid "Allow previewing posts and comments before publishing them" +msgstr "" + +#: include/features.php:79 +msgid "Auto-mention Forums" +msgstr "" + +#: include/features.php:79 +msgid "" +"Add/remove mention when a forum page is selected/deselected in ACL window." +msgstr "" + +#: include/features.php:84 +msgid "Network Sidebar Widgets" +msgstr "" + +#: include/features.php:85 +msgid "Search by Date" +msgstr "" + +#: include/features.php:85 +msgid "Ability to select posts by date ranges" +msgstr "" + +#: include/features.php:86 include/features.php:116 +msgid "List Forums" +msgstr "" + +#: include/features.php:86 +msgid "Enable widget to display the forums your are connected with" +msgstr "" + +#: include/features.php:87 +msgid "Group Filter" +msgstr "" + +#: include/features.php:87 +msgid "Enable widget to display Network posts only from selected group" +msgstr "" + +#: include/features.php:88 +msgid "Network Filter" +msgstr "" + +#: include/features.php:88 +msgid "Enable widget to display Network posts only from selected network" +msgstr "" + +#: include/features.php:89 mod/network.php:202 mod/search.php:40 +msgid "Saved Searches" +msgstr "" + +#: include/features.php:89 +msgid "Save search terms for re-use" +msgstr "" + +#: include/features.php:94 +msgid "Network Tabs" +msgstr "" + +#: include/features.php:95 +msgid "Network Personal Tab" +msgstr "" + +#: include/features.php:95 +msgid "Enable tab to display only Network posts that you've interacted on" +msgstr "" + +#: include/features.php:96 +msgid "Network New Tab" +msgstr "" + +#: include/features.php:96 +msgid "Enable tab to display only new Network posts (from the last 12 hours)" +msgstr "" + +#: include/features.php:97 +msgid "Network Shared Links Tab" +msgstr "" + +#: include/features.php:97 +msgid "Enable tab to display only Network posts with links in them" +msgstr "" + +#: include/features.php:102 +msgid "Post/Comment Tools" +msgstr "" + +#: include/features.php:103 +msgid "Multiple Deletion" +msgstr "" + +#: include/features.php:103 +msgid "Select and delete multiple posts/comments at once" +msgstr "" + +#: include/features.php:104 +msgid "Edit Sent Posts" +msgstr "" + +#: include/features.php:104 +msgid "Edit and correct posts and comments after sending" +msgstr "" + +#: include/features.php:105 +msgid "Tagging" +msgstr "" + +#: include/features.php:105 +msgid "Ability to tag existing posts" +msgstr "" + +#: include/features.php:106 +msgid "Post Categories" +msgstr "" + +#: include/features.php:106 +msgid "Add categories to your posts" +msgstr "" + +#: include/features.php:107 +msgid "Ability to file posts under folders" +msgstr "" + +#: include/features.php:108 +msgid "Dislike Posts" +msgstr "" + +#: include/features.php:108 +msgid "Ability to dislike posts/comments" +msgstr "" + +#: include/features.php:109 +msgid "Star Posts" +msgstr "" + +#: include/features.php:109 +msgid "Ability to mark special posts with a star indicator" +msgstr "" + +#: include/features.php:110 +msgid "Mute Post Notifications" +msgstr "" + +#: include/features.php:110 +msgid "Ability to mute notifications for a thread" +msgstr "" + +#: include/features.php:115 +msgid "Advanced Profile Settings" +msgstr "" + +#: include/features.php:116 +msgid "Show visitors public community forums at the Advanced Profile Page" +msgstr "" + +#: include/features.php:117 +msgid "Tag Cloud" +msgstr "" + +#: include/features.php:117 +msgid "Provide a personal tag cloud on your profile page" +msgstr "" + +#: include/follow.php:90 mod/dfrn_request.php:517 msgid "Disallowed profile URL." msgstr "" -#: include/follow.php:92 mod/dfrn_request.php:521 mod/friendica.php:116 -#: mod/admin.php:290 mod/admin.php:308 +#: include/follow.php:95 mod/admin.php:292 mod/admin.php:310 +#: mod/dfrn_request.php:523 mod/friendica.php:117 msgid "Blocked domain" msgstr "" -#: include/follow.php:97 +#: include/follow.php:100 msgid "Connect URL missing." msgstr "" -#: include/follow.php:129 +#: include/follow.php:132 msgid "" "This site is not configured to allow communications with other networks." msgstr "" -#: include/follow.php:130 include/follow.php:144 +#: include/follow.php:133 include/follow.php:147 msgid "No compatible communication protocols or feeds were discovered." msgstr "" -#: include/follow.php:142 +#: include/follow.php:145 msgid "The profile address specified does not provide adequate information." msgstr "" -#: include/follow.php:147 +#: include/follow.php:150 msgid "An author or name was not found." msgstr "" -#: include/follow.php:150 +#: include/follow.php:153 msgid "No browser URL could be matched to this address." msgstr "" -#: include/follow.php:153 +#: include/follow.php:156 msgid "" "Unable to match @-style Identity Address with a known protocol or email " "contact." msgstr "" -#: include/follow.php:154 +#: include/follow.php:157 msgid "Use mailto: in front of address to force email check." msgstr "" -#: include/follow.php:160 +#: include/follow.php:163 msgid "" "The profile address specified belongs to a network which has been disabled " "on this site." msgstr "" -#: include/follow.php:165 +#: include/follow.php:168 msgid "" "Limited profile. This person will be unable to receive direct/personal " "notifications from you." msgstr "" -#: include/follow.php:236 +#: include/follow.php:239 msgid "Unable to retrieve contact information." msgstr "" -#: include/identity.php:47 +#: include/group.php:27 +msgid "" +"A deleted group with this name was revived. Existing item permissions " +"may apply to this group and any future members. If this is " +"not what you intended, please create another group with a different name." +msgstr "" + +#: include/group.php:199 +msgid "Default privacy group for new contacts" +msgstr "" + +#: include/group.php:232 +msgid "Everybody" +msgstr "" + +#: include/group.php:255 +msgid "edit" +msgstr "" + +#: include/group.php:276 mod/newmember.php:40 +msgid "Groups" +msgstr "" + +#: include/group.php:278 +msgid "Edit groups" +msgstr "" + +#: include/group.php:280 +msgid "Edit group" +msgstr "" + +#: include/group.php:281 +msgid "Create a new group" +msgstr "" + +#: include/group.php:282 mod/group.php:101 mod/group.php:198 +msgid "Group Name: " +msgstr "" + +#: include/group.php:284 +msgid "Contacts not in any group" +msgstr "" + +#: include/group.php:286 mod/network.php:203 +msgid "add" +msgstr "" + +#: include/identity.php:52 msgid "Requested account is not available." msgstr "" -#: include/identity.php:56 mod/profile.php:23 +#: include/identity.php:61 mod/profile.php:26 msgid "Requested profile is not available." msgstr "" -#: include/identity.php:100 include/identity.php:323 include/identity.php:756 +#: include/identity.php:110 include/identity.php:340 include/identity.php:798 msgid "Edit profile" msgstr "" -#: include/identity.php:263 +#: include/identity.php:278 msgid "Atom feed" msgstr "" -#: include/identity.php:294 +#: include/identity.php:313 include/nav.php:194 +msgid "Profiles" +msgstr "" + +#: include/identity.php:313 msgid "Manage/edit profiles" msgstr "" -#: include/identity.php:299 include/identity.php:325 mod/profiles.php:786 +#: include/identity.php:320 include/identity.php:342 mod/profiles.php:789 msgid "Change profile photo" msgstr "" -#: include/identity.php:300 mod/profiles.php:787 +#: include/identity.php:321 mod/profiles.php:790 msgid "Create New Profile" msgstr "" -#: include/identity.php:310 mod/profiles.php:776 +#: include/identity.php:330 mod/profiles.php:779 msgid "Profile Image" msgstr "" -#: include/identity.php:313 mod/profiles.php:778 +#: include/identity.php:333 mod/profiles.php:781 msgid "visible to everybody" msgstr "" -#: include/identity.php:314 mod/profiles.php:683 mod/profiles.php:779 +#: include/identity.php:334 mod/profiles.php:687 mod/profiles.php:782 msgid "Edit visibility" msgstr "" -#: include/identity.php:342 include/identity.php:643 mod/notifications.php:253 -#: mod/directory.php:135 +#: include/identity.php:361 include/identity.php:686 mod/directory.php:138 +#: mod/notifications.php:254 msgid "Gender:" msgstr "" -#: include/identity.php:345 include/identity.php:666 mod/directory.php:137 +#: include/identity.php:364 include/identity.php:708 mod/directory.php:140 msgid "Status:" msgstr "" -#: include/identity.php:347 include/identity.php:683 mod/directory.php:139 +#: include/identity.php:366 include/identity.php:725 mod/directory.php:142 msgid "Homepage:" msgstr "" -#: include/identity.php:349 include/identity.php:703 mod/notifications.php:249 -#: mod/directory.php:141 mod/contacts.php:662 +#: include/identity.php:368 include/identity.php:745 mod/contacts.php:670 +#: mod/directory.php:144 mod/notifications.php:250 msgid "About:" msgstr "" -#: include/identity.php:351 mod/contacts.php:660 +#: include/identity.php:370 mod/contacts.php:668 msgid "XMPP:" msgstr "" -#: include/identity.php:437 mod/notifications.php:261 mod/contacts.php:60 +#: include/identity.php:464 mod/contacts.php:60 mod/notifications.php:262 msgid "Network:" msgstr "" -#: include/identity.php:466 include/identity.php:557 +#: include/identity.php:496 include/identity.php:594 msgid "g A l F d" msgstr "" -#: include/identity.php:467 include/identity.php:558 +#: include/identity.php:497 include/identity.php:595 msgid "F d" msgstr "" -#: include/identity.php:519 include/identity.php:605 +#: include/identity.php:554 include/identity.php:643 msgid "[today]" msgstr "" -#: include/identity.php:531 +#: include/identity.php:567 msgid "Birthday Reminders" msgstr "" -#: include/identity.php:532 +#: include/identity.php:568 msgid "Birthdays this week:" msgstr "" -#: include/identity.php:592 +#: include/identity.php:630 msgid "[No description]" msgstr "" -#: include/identity.php:619 +#: include/identity.php:659 msgid "Event Reminders" msgstr "" -#: include/identity.php:620 +#: include/identity.php:660 msgid "Events this week:" msgstr "" -#: include/identity.php:640 mod/settings.php:1273 +#: include/identity.php:674 include/identity.php:804 include/identity.php:839 +#: include/nav.php:87 mod/contacts.php:677 mod/contacts.php:879 +#: mod/newmember.php:21 mod/profperm.php:108 view/theme/frio/theme.php:257 +msgid "Profile" +msgstr "" + +#: include/identity.php:683 mod/settings.php:1270 msgid "Full Name:" msgstr "" -#: include/identity.php:647 +#: include/identity.php:690 msgid "j F, Y" msgstr "" -#: include/identity.php:648 +#: include/identity.php:691 msgid "j F" msgstr "" -#: include/identity.php:662 +#: include/identity.php:704 msgid "Age:" msgstr "" -#: include/identity.php:675 +#: include/identity.php:717 #, php-format msgid "for %1$d %2$s" msgstr "" -#: include/identity.php:679 mod/profiles.php:702 +#: include/identity.php:721 mod/profiles.php:706 msgid "Sexual Preference:" msgstr "" -#: include/identity.php:687 mod/profiles.php:729 +#: include/identity.php:729 mod/profiles.php:733 msgid "Hometown:" msgstr "" -#: include/identity.php:691 mod/follow.php:174 mod/notifications.php:251 -#: mod/contacts.php:664 +#: include/identity.php:733 mod/contacts.php:672 mod/follow.php:175 +#: mod/notifications.php:252 msgid "Tags:" msgstr "" -#: include/identity.php:695 mod/profiles.php:730 +#: include/identity.php:737 mod/profiles.php:734 msgid "Political Views:" msgstr "" -#: include/identity.php:699 +#: include/identity.php:741 msgid "Religion:" msgstr "" -#: include/identity.php:707 +#: include/identity.php:749 msgid "Hobbies/Interests:" msgstr "" -#: include/identity.php:711 mod/profiles.php:734 +#: include/identity.php:753 mod/profiles.php:738 msgid "Likes:" msgstr "" -#: include/identity.php:715 mod/profiles.php:735 +#: include/identity.php:757 mod/profiles.php:739 msgid "Dislikes:" msgstr "" -#: include/identity.php:719 +#: include/identity.php:761 msgid "Contact information and Social Networks:" msgstr "" -#: include/identity.php:723 +#: include/identity.php:765 msgid "Musical interests:" msgstr "" -#: include/identity.php:727 +#: include/identity.php:769 msgid "Books, literature:" msgstr "" -#: include/identity.php:731 +#: include/identity.php:773 msgid "Television:" msgstr "" -#: include/identity.php:735 +#: include/identity.php:777 msgid "Film/dance/culture/entertainment:" msgstr "" -#: include/identity.php:739 +#: include/identity.php:781 msgid "Love/Romance:" msgstr "" -#: include/identity.php:743 +#: include/identity.php:785 msgid "Work/employment:" msgstr "" -#: include/identity.php:747 +#: include/identity.php:789 msgid "School/education:" msgstr "" -#: include/identity.php:752 +#: include/identity.php:794 msgid "Forums:" msgstr "" -#: include/identity.php:761 mod/events.php:530 +#: include/identity.php:805 mod/events.php:532 msgid "Basic" msgstr "" -#: include/identity.php:762 mod/admin.php:1181 mod/contacts.php:900 -#: mod/events.php:531 +#: include/identity.php:806 mod/admin.php:1183 mod/contacts.php:908 +#: mod/events.php:533 msgid "Advanced" msgstr "" -#: include/identity.php:788 mod/follow.php:182 mod/unfollow.php:133 -#: mod/contacts.php:866 +#: include/identity.php:831 include/nav.php:86 mod/contacts.php:675 +#: mod/contacts.php:871 view/theme/frio/theme.php:256 +msgid "Status" +msgstr "" + +#: include/identity.php:834 mod/contacts.php:874 mod/follow.php:183 +#: mod/unfollow.php:132 msgid "Status Messages and Posts" msgstr "" -#: include/identity.php:796 mod/contacts.php:874 +#: include/identity.php:842 mod/contacts.php:882 msgid "Profile Details" msgstr "" -#: include/identity.php:804 mod/photos.php:97 +#: include/identity.php:847 include/nav.php:88 mod/fbrowser.php:34 +#: view/theme/frio/theme.php:258 +msgid "Photos" +msgstr "" + +#: include/identity.php:850 mod/photos.php:99 msgid "Photo Albums" msgstr "" -#: include/identity.php:843 mod/notes.php:49 +#: include/identity.php:855 include/identity.php:858 include/nav.php:89 +#: view/theme/frio/theme.php:259 +msgid "Videos" +msgstr "" + +#: include/identity.php:867 include/identity.php:878 include/nav.php:90 +#: include/nav.php:154 mod/cal.php:276 mod/events.php:385 +#: view/theme/frio/theme.php:260 view/theme/frio/theme.php:264 +msgid "Events" +msgstr "" + +#: include/identity.php:870 include/identity.php:881 include/nav.php:154 +#: view/theme/frio/theme.php:264 +msgid "Events and Calendar" +msgstr "" + +#: include/identity.php:889 mod/notes.php:50 msgid "Personal Notes" msgstr "" -#: include/identity.php:846 +#: include/identity.php:892 msgid "Only You Can See This" msgstr "" -#: include/items.php:1731 mod/dfrn_request.php:760 mod/dfrn_confirm.php:739 +#: include/identity.php:900 include/identity.php:903 include/nav.php:133 +#: include/nav.php:197 include/text.php:1056 mod/contacts.php:830 +#: mod/contacts.php:891 mod/viewcontacts.php:126 view/theme/frio/theme.php:267 +msgid "Contacts" +msgstr "" + +#: include/items.php:1731 mod/dfrn_confirm.php:742 mod/dfrn_request.php:762 msgid "[Name Withheld]" msgstr "" -#: include/items.php:2106 mod/viewsrc.php:16 mod/notice.php:18 -#: mod/admin.php:258 mod/admin.php:1687 mod/admin.php:1938 mod/display.php:106 -#: mod/display.php:279 mod/display.php:487 +#: include/items.php:2100 mod/admin.php:260 mod/admin.php:1687 +#: mod/admin.php:1938 mod/display.php:108 mod/display.php:279 +#: mod/display.php:487 mod/notice.php:19 mod/viewsrc.php:17 msgid "Item not found." msgstr "" -#: include/items.php:2149 +#: include/items.php:2143 msgid "Do you really want to delete this item?" msgstr "" -#: include/items.php:2151 mod/api.php:107 mod/dfrn_request.php:881 -#: mod/follow.php:150 mod/message.php:207 mod/suggest.php:32 -#: mod/contacts.php:466 mod/profiles.php:639 mod/profiles.php:642 -#: mod/profiles.php:669 mod/register.php:250 mod/settings.php:1158 -#: mod/settings.php:1164 mod/settings.php:1171 mod/settings.php:1175 -#: mod/settings.php:1180 mod/settings.php:1185 mod/settings.php:1190 -#: mod/settings.php:1195 mod/settings.php:1221 mod/settings.php:1222 -#: mod/settings.php:1223 mod/settings.php:1224 mod/settings.php:1225 +#: include/items.php:2145 mod/api.php:109 mod/contacts.php:467 +#: mod/dfrn_request.php:883 mod/follow.php:151 mod/message.php:209 +#: mod/profiles.php:643 mod/profiles.php:646 mod/profiles.php:673 +#: mod/register.php:252 mod/settings.php:1155 mod/settings.php:1161 +#: mod/settings.php:1168 mod/settings.php:1172 mod/settings.php:1177 +#: mod/settings.php:1182 mod/settings.php:1187 mod/settings.php:1192 +#: mod/settings.php:1218 mod/settings.php:1219 mod/settings.php:1220 +#: mod/settings.php:1221 mod/settings.php:1222 mod/suggest.php:36 msgid "Yes" msgstr "" -#: include/items.php:2290 mod/api.php:28 mod/api.php:33 mod/attach.php:35 -#: mod/common.php:20 mod/crepair.php:105 mod/nogroup.php:29 -#: mod/viewcontacts.php:49 mod/uimport.php:26 mod/allfriends.php:15 -#: mod/cal.php:302 mod/editpost.php:13 mod/follow.php:14 mod/follow.php:55 -#: mod/follow.php:118 mod/group.php:21 mod/invite.php:18 mod/invite.php:106 -#: mod/manage.php:104 mod/message.php:49 mod/message.php:172 -#: mod/notifications.php:74 mod/repair_ostatus.php:12 mod/wallmessage.php:12 -#: mod/wallmessage.php:36 mod/wallmessage.php:76 mod/wallmessage.php:100 -#: mod/delegate.php:15 mod/suggest.php:58 mod/unfollow.php:14 -#: mod/unfollow.php:57 mod/unfollow.php:90 mod/contacts.php:374 -#: mod/dfrn_confirm.php:65 mod/dirfind.php:17 mod/display.php:484 -#: mod/events.php:190 mod/fsuggest.php:81 mod/item.php:199 mod/item.php:211 -#: mod/mood.php:118 mod/network.php:17 mod/notes.php:25 -#: mod/ostatus_subscribe.php:12 mod/photos.php:170 mod/photos.php:1095 -#: mod/poke.php:157 mod/profile_photo.php:21 mod/profile_photo.php:181 -#: mod/profile_photo.php:192 mod/profile_photo.php:205 mod/profiles.php:168 -#: mod/profiles.php:606 mod/register.php:47 mod/regmod.php:108 -#: mod/settings.php:28 mod/settings.php:130 mod/settings.php:678 -#: mod/wall_attach.php:69 mod/wall_attach.php:72 mod/wall_upload.php:102 -#: mod/wall_upload.php:105 index.php:412 +#: include/items.php:2272 mod/allfriends.php:18 mod/api.php:30 mod/api.php:35 +#: mod/attach.php:36 mod/cal.php:305 mod/common.php:23 mod/contacts.php:375 +#: mod/crepair.php:108 mod/delegate.php:16 mod/dfrn_confirm.php:69 +#: mod/dirfind.php:21 mod/display.php:484 mod/editpost.php:15 +#: mod/events.php:192 mod/follow.php:15 mod/follow.php:56 mod/follow.php:119 +#: mod/fsuggest.php:82 mod/group.php:24 mod/invite.php:20 mod/invite.php:108 +#: mod/item.php:203 mod/item.php:215 mod/manage.php:105 mod/message.php:51 +#: mod/message.php:174 mod/mood.php:119 mod/network.php:21 mod/nogroup.php:30 +#: mod/notes.php:26 mod/notifications.php:75 mod/ostatus_subscribe.php:13 +#: mod/photos.php:172 mod/photos.php:1097 mod/poke.php:158 +#: mod/profile_photo.php:23 mod/profile_photo.php:183 mod/profile_photo.php:194 +#: mod/profile_photo.php:207 mod/profiles.php:172 mod/profiles.php:610 +#: mod/register.php:49 mod/regmod.php:110 mod/repair_ostatus.php:11 +#: mod/settings.php:31 mod/settings.php:133 mod/settings.php:683 +#: mod/suggest.php:62 mod/uimport.php:27 mod/unfollow.php:14 +#: mod/unfollow.php:56 mod/unfollow.php:89 mod/viewcontacts.php:51 +#: mod/wall_attach.php:71 mod/wall_attach.php:74 mod/wall_upload.php:103 +#: mod/wall_upload.php:106 mod/wallmessage.php:13 mod/wallmessage.php:37 +#: mod/wallmessage.php:77 mod/wallmessage.php:101 index.php:399 msgid "Permission denied." msgstr "" -#: include/items.php:2407 +#: include/items.php:2389 msgid "Archives" msgstr "" -#: include/like.php:46 +#: include/like.php:47 #, php-format msgid "%1$s is attending %2$s's %3$s" msgstr "" -#: include/like.php:51 +#: include/like.php:52 #, php-format msgid "%1$s is not attending %2$s's %3$s" msgstr "" -#: include/like.php:56 +#: include/like.php:57 #, php-format msgid "%1$s may attend %2$s's %3$s" msgstr "" -#: include/message.php:16 include/message.php:162 +#: include/message.php:17 include/message.php:163 msgid "[no subject]" msgstr "" -#: include/network.php:714 +#: include/nav.php:40 mod/navigation.php:22 +msgid "Nothing new here" +msgstr "" + +#: include/nav.php:44 mod/navigation.php:26 +msgid "Clear notifications" +msgstr "" + +#: include/nav.php:45 include/text.php:1049 +msgid "@name, !forum, #tags, content" +msgstr "" + +#: include/nav.php:83 view/theme/frio/theme.php:253 boot.php:901 +msgid "Logout" +msgstr "" + +#: include/nav.php:83 view/theme/frio/theme.php:253 +msgid "End this session" +msgstr "" + +#: include/nav.php:86 include/nav.php:166 view/theme/frio/theme.php:256 +msgid "Your posts and conversations" +msgstr "" + +#: include/nav.php:87 view/theme/frio/theme.php:257 +msgid "Your profile page" +msgstr "" + +#: include/nav.php:88 view/theme/frio/theme.php:258 +msgid "Your photos" +msgstr "" + +#: include/nav.php:89 view/theme/frio/theme.php:259 +msgid "Your videos" +msgstr "" + +#: include/nav.php:90 view/theme/frio/theme.php:260 +msgid "Your events" +msgstr "" + +#: include/nav.php:91 +msgid "Personal notes" +msgstr "" + +#: include/nav.php:91 +msgid "Your personal notes" +msgstr "" + +#: include/nav.php:100 mod/bookmarklet.php:15 boot.php:902 +msgid "Login" +msgstr "" + +#: include/nav.php:100 +msgid "Sign in" +msgstr "" + +#: include/nav.php:110 include/nav.php:166 +#: src/Core/NotificationsManager.php:197 +msgid "Home" +msgstr "" + +#: include/nav.php:110 +msgid "Home Page" +msgstr "" + +#: include/nav.php:114 mod/register.php:296 boot.php:874 +msgid "Register" +msgstr "" + +#: include/nav.php:114 +msgid "Create an account" +msgstr "" + +#: include/nav.php:120 mod/help.php:51 view/theme/vier/theme.php:292 +msgid "Help" +msgstr "" + +#: include/nav.php:120 +msgid "Help and documentation" +msgstr "" + +#: include/nav.php:124 +msgid "Apps" +msgstr "" + +#: include/nav.php:124 +msgid "Addon applications, utilities, games" +msgstr "" + +#: include/nav.php:128 include/text.php:1046 mod/search.php:148 +msgid "Search" +msgstr "" + +#: include/nav.php:128 +msgid "Search site content" +msgstr "" + +#: include/nav.php:131 include/text.php:1054 +msgid "Full Text" +msgstr "" + +#: include/nav.php:132 include/tags.php:234 include/text.php:1055 +msgid "Tags" +msgstr "" + +#: include/nav.php:136 include/text.php:1059 view/theme/vier/theme.php:249 +#: src/Content/ForumManager.php:121 +msgid "Forums" +msgstr "" + +#: include/nav.php:148 include/nav.php:150 mod/community.php:89 +msgid "Community" +msgstr "" + +#: include/nav.php:148 +msgid "Conversations on this site" +msgstr "" + +#: include/nav.php:150 +msgid "Conversations on the network" +msgstr "" + +#: include/nav.php:157 +msgid "Directory" +msgstr "" + +#: include/nav.php:157 +msgid "People directory" +msgstr "" + +#: include/nav.php:159 +msgid "Information" +msgstr "" + +#: include/nav.php:159 +msgid "Information about this friendica instance" +msgstr "" + +#: include/nav.php:163 mod/admin.php:592 view/theme/frio/theme.php:263 +#: src/Core/NotificationsManager.php:183 +msgid "Network" +msgstr "" + +#: include/nav.php:163 view/theme/frio/theme.php:263 +msgid "Conversations from your friends" +msgstr "" + +#: include/nav.php:164 +msgid "Network Reset" +msgstr "" + +#: include/nav.php:164 +msgid "Load Network page with no filters" +msgstr "" + +#: include/nav.php:171 src/Core/NotificationsManager.php:204 +msgid "Introductions" +msgstr "" + +#: include/nav.php:171 +msgid "Friend Requests" +msgstr "" + +#: include/nav.php:174 mod/notifications.php:100 +msgid "Notifications" +msgstr "" + +#: include/nav.php:175 +msgid "See all notifications" +msgstr "" + +#: include/nav.php:176 mod/settings.php:916 +msgid "Mark as seen" +msgstr "" + +#: include/nav.php:176 +msgid "Mark all system notifications seen" +msgstr "" + +#: include/nav.php:180 mod/message.php:182 view/theme/frio/theme.php:265 +msgid "Messages" +msgstr "" + +#: include/nav.php:180 view/theme/frio/theme.php:265 +msgid "Private mail" +msgstr "" + +#: include/nav.php:181 +msgid "Inbox" +msgstr "" + +#: include/nav.php:182 +msgid "Outbox" +msgstr "" + +#: include/nav.php:183 mod/message.php:21 +msgid "New Message" +msgstr "" + +#: include/nav.php:186 +msgid "Manage" +msgstr "" + +#: include/nav.php:186 +msgid "Manage other pages" +msgstr "" + +#: include/nav.php:189 mod/settings.php:84 +msgid "Delegations" +msgstr "" + +#: include/nav.php:189 mod/delegate.php:131 +msgid "Delegate Page Management" +msgstr "" + +#: include/nav.php:191 mod/admin.php:1740 mod/admin.php:2016 +#: mod/newmember.php:16 mod/settings.php:114 view/theme/frio/theme.php:266 +msgid "Settings" +msgstr "" + +#: include/nav.php:191 view/theme/frio/theme.php:266 +msgid "Account settings" +msgstr "" + +#: include/nav.php:194 +msgid "Manage/Edit Profiles" +msgstr "" + +#: include/nav.php:197 view/theme/frio/theme.php:267 +msgid "Manage/edit friends and contacts" +msgstr "" + +#: include/nav.php:202 mod/admin.php:206 +msgid "Admin" +msgstr "" + +#: include/nav.php:202 +msgid "Site setup and configuration" +msgstr "" + +#: include/nav.php:205 +msgid "Navigation" +msgstr "" + +#: include/nav.php:205 +msgid "Site map" +msgstr "" + +#: include/network.php:732 msgid "view full size" msgstr "" -#: include/ostatus.php:1713 -#, php-format -msgid "%s is now following %s." +#: include/oembed.php:256 +msgid "Embedded content" msgstr "" -#: include/ostatus.php:1714 -msgid "following" +#: include/oembed.php:264 +msgid "Embedding disabled" msgstr "" -#: include/ostatus.php:1717 -#, php-format -msgid "%s stopped following %s." +#: include/photos.php:57 include/photos.php:66 mod/fbrowser.php:43 +#: mod/fbrowser.php:65 mod/photos.php:193 mod/photos.php:1111 +#: mod/photos.php:1230 mod/photos.php:1247 mod/photos.php:1785 +#: mod/photos.php:1799 +msgid "Contact Photos" msgstr "" -#: include/ostatus.php:1718 -msgid "stopped following" +#: include/security.php:67 +msgid "Welcome " msgstr "" -#: include/text.php:315 +#: include/security.php:68 +msgid "Please upload a profile photo." +msgstr "" + +#: include/security.php:70 +msgid "Welcome back " +msgstr "" + +#: include/security.php:427 +msgid "" +"The form security token was not correct. This probably happened because the " +"form has been opened for too long (>3 hours) before submitting it." +msgstr "" + +#: include/text.php:289 msgid "newer" msgstr "" -#: include/text.php:316 +#: include/text.php:290 msgid "older" msgstr "" -#: include/text.php:321 +#: include/text.php:295 msgid "first" msgstr "" -#: include/text.php:322 +#: include/text.php:296 msgid "prev" msgstr "" -#: include/text.php:356 +#: include/text.php:330 msgid "next" msgstr "" -#: include/text.php:357 +#: include/text.php:331 msgid "last" msgstr "" -#: include/text.php:411 +#: include/text.php:385 msgid "Loading more entries..." msgstr "" -#: include/text.php:412 +#: include/text.php:386 msgid "The end" msgstr "" -#: include/text.php:961 +#: include/text.php:922 msgid "No contacts" msgstr "" -#: include/text.php:985 +#: include/text.php:946 #, php-format msgid "%d Contact" msgid_plural "%d Contacts" msgstr[0] "" msgstr[1] "" -#: include/text.php:998 +#: include/text.php:959 msgid "View Contacts" msgstr "" -#: include/text.php:1088 mod/filer.php:32 mod/editpost.php:102 mod/notes.php:64 +#: include/text.php:1047 mod/editpost.php:104 mod/filer.php:33 mod/notes.php:65 msgid "Save" msgstr "" -#: include/text.php:1149 +#: include/text.php:1106 msgid "poke" msgstr "" -#: include/text.php:1149 +#: include/text.php:1106 msgid "poked" msgstr "" -#: include/text.php:1150 +#: include/text.php:1107 msgid "ping" msgstr "" -#: include/text.php:1150 +#: include/text.php:1107 msgid "pinged" msgstr "" -#: include/text.php:1151 +#: include/text.php:1108 msgid "prod" msgstr "" -#: include/text.php:1151 +#: include/text.php:1108 msgid "prodded" msgstr "" -#: include/text.php:1152 +#: include/text.php:1109 msgid "slap" msgstr "" -#: include/text.php:1152 +#: include/text.php:1109 msgid "slapped" msgstr "" -#: include/text.php:1153 +#: include/text.php:1110 msgid "finger" msgstr "" -#: include/text.php:1153 +#: include/text.php:1110 msgid "fingered" msgstr "" -#: include/text.php:1154 +#: include/text.php:1111 msgid "rebuff" msgstr "" -#: include/text.php:1154 +#: include/text.php:1111 msgid "rebuffed" msgstr "" -#: include/text.php:1168 +#: include/text.php:1125 msgid "happy" msgstr "" -#: include/text.php:1169 +#: include/text.php:1126 msgid "sad" msgstr "" -#: include/text.php:1170 +#: include/text.php:1127 msgid "mellow" msgstr "" -#: include/text.php:1171 +#: include/text.php:1128 msgid "tired" msgstr "" -#: include/text.php:1172 +#: include/text.php:1129 msgid "perky" msgstr "" -#: include/text.php:1173 +#: include/text.php:1130 msgid "angry" msgstr "" -#: include/text.php:1174 +#: include/text.php:1131 msgid "stupified" msgstr "" -#: include/text.php:1175 +#: include/text.php:1132 msgid "puzzled" msgstr "" -#: include/text.php:1176 +#: include/text.php:1133 msgid "interested" msgstr "" -#: include/text.php:1177 +#: include/text.php:1134 msgid "bitter" msgstr "" -#: include/text.php:1178 +#: include/text.php:1135 msgid "cheerful" msgstr "" -#: include/text.php:1179 +#: include/text.php:1136 msgid "alive" msgstr "" -#: include/text.php:1180 +#: include/text.php:1137 msgid "annoyed" msgstr "" -#: include/text.php:1181 +#: include/text.php:1138 msgid "anxious" msgstr "" -#: include/text.php:1182 +#: include/text.php:1139 msgid "cranky" msgstr "" -#: include/text.php:1183 +#: include/text.php:1140 msgid "disturbed" msgstr "" -#: include/text.php:1184 +#: include/text.php:1141 msgid "frustrated" msgstr "" -#: include/text.php:1185 +#: include/text.php:1142 msgid "motivated" msgstr "" -#: include/text.php:1186 +#: include/text.php:1143 msgid "relaxed" msgstr "" -#: include/text.php:1187 +#: include/text.php:1144 msgid "surprised" msgstr "" -#: include/text.php:1220 +#: include/text.php:1177 msgid "Sund" msgstr "" -#: include/text.php:1223 +#: include/text.php:1180 msgid "Sep" msgstr "" -#: include/text.php:1421 mod/videos.php:390 +#: include/text.php:1377 mod/videos.php:387 msgid "View Video" msgstr "" -#: include/text.php:1438 +#: include/text.php:1394 msgid "bytes" msgstr "" -#: include/text.php:1473 include/text.php:1484 +#: include/text.php:1429 include/text.php:1440 msgid "Click to open/close" msgstr "" -#: include/text.php:1612 +#: include/text.php:1568 msgid "View on separate page" msgstr "" -#: include/text.php:1613 +#: include/text.php:1569 msgid "view on separate page" msgstr "" -#: include/text.php:1898 +#: include/text.php:1787 msgid "activity" msgstr "" -#: include/text.php:1900 object/Item.php:416 object/Item.php:428 +#: include/text.php:1789 src/Object/Item.php:421 src/Object/Item.php:433 msgid "comment" msgid_plural "comments" msgstr[0] "" msgstr[1] "" -#: include/text.php:1903 +#: include/text.php:1792 msgid "post" msgstr "" -#: include/text.php:2069 +#: include/text.php:1955 msgid "Item filed" msgstr "" -#: include/uimport.php:81 +#: include/uimport.php:82 msgid "Error decoding account file" msgstr "" -#: include/uimport.php:87 +#: include/uimport.php:88 msgid "Error! No version data in file! This is not a Friendica account file?" msgstr "" -#: include/uimport.php:104 include/uimport.php:115 +#: include/uimport.php:105 include/uimport.php:116 msgid "Error! Cannot check nickname" msgstr "" -#: include/uimport.php:108 include/uimport.php:119 +#: include/uimport.php:109 include/uimport.php:120 #, php-format msgid "User '%s' already exists on this server!" msgstr "" @@ -2986,81 +2880,81 @@ msgstr[1] "" msgid "Done. You can now login with your username and password" msgstr "" -#: include/user.php:41 mod/settings.php:373 +#: include/user.php:42 mod/settings.php:378 msgid "Passwords do not match. Password unchanged." msgstr "" -#: include/user.php:50 +#: include/user.php:51 msgid "An invitation is required." msgstr "" -#: include/user.php:55 +#: include/user.php:56 msgid "Invitation could not be verified." msgstr "" -#: include/user.php:63 +#: include/user.php:64 msgid "Invalid OpenID url" msgstr "" -#: include/user.php:84 +#: include/user.php:85 msgid "Please enter the required information." msgstr "" -#: include/user.php:98 +#: include/user.php:99 msgid "Please use a shorter name." msgstr "" -#: include/user.php:100 +#: include/user.php:101 msgid "Name too short." msgstr "" -#: include/user.php:108 +#: include/user.php:109 msgid "That doesn't appear to be your full (First Last) name." msgstr "" -#: include/user.php:113 +#: include/user.php:114 msgid "Your email domain is not among those allowed on this site." msgstr "" -#: include/user.php:116 +#: include/user.php:117 msgid "Not a valid email address." msgstr "" -#: include/user.php:129 +#: include/user.php:130 msgid "Cannot use that email." msgstr "" -#: include/user.php:135 +#: include/user.php:136 msgid "Your \"nickname\" can only contain \"a-z\", \"0-9\" and \"_\"." msgstr "" -#: include/user.php:142 include/user.php:224 +#: include/user.php:143 include/user.php:225 msgid "Nickname is already registered. Please choose another." msgstr "" -#: include/user.php:152 +#: include/user.php:153 msgid "" "Nickname was once registered here and may not be re-used. Please choose " "another." msgstr "" -#: include/user.php:168 +#: include/user.php:169 msgid "SERIOUS ERROR: Generation of security keys failed." msgstr "" -#: include/user.php:210 +#: include/user.php:211 msgid "An error occurred during registration. Please try again." msgstr "" -#: include/user.php:233 view/theme/duepuntozero/config.php:47 +#: include/user.php:234 view/theme/duepuntozero/config.php:49 msgid "default" msgstr "" -#: include/user.php:243 +#: include/user.php:244 msgid "An error occurred creating your default profile. Please try again." msgstr "" -#: include/user.php:393 +#: include/user.php:394 #, php-format msgid "" "\n" @@ -3070,12 +2964,12 @@ msgid "" "\t" msgstr "" -#: include/user.php:403 +#: include/user.php:404 #, php-format msgid "Registration at %s" msgstr "" -#: include/user.php:413 +#: include/user.php:414 #, php-format msgid "" "\n" @@ -3084,7 +2978,7 @@ msgid "" "\t" msgstr "" -#: include/user.php:417 +#: include/user.php:418 #, php-format msgid "" "\n" @@ -3119,59 +3013,11 @@ msgid "" "\t\tThank you and welcome to %2$s." msgstr "" -#: include/user.php:449 mod/admin.php:1430 +#: include/user.php:450 mod/admin.php:1432 #, php-format msgid "Registration details for %s" msgstr "" -#: mod/api.php:78 mod/api.php:104 -msgid "Authorize application connection" -msgstr "" - -#: mod/api.php:79 -msgid "Return to your app and insert this Securty Code:" -msgstr "" - -#: mod/api.php:91 -msgid "Please login to continue." -msgstr "" - -#: mod/api.php:106 -msgid "" -"Do you want to authorize this application to access your posts and contacts, " -"and/or create new posts for you?" -msgstr "" - -#: mod/api.php:108 mod/dfrn_request.php:881 mod/follow.php:150 -#: mod/profiles.php:639 mod/profiles.php:643 mod/profiles.php:669 -#: mod/register.php:251 mod/settings.php:1158 mod/settings.php:1164 -#: mod/settings.php:1171 mod/settings.php:1175 mod/settings.php:1180 -#: mod/settings.php:1185 mod/settings.php:1190 mod/settings.php:1195 -#: mod/settings.php:1221 mod/settings.php:1222 mod/settings.php:1223 -#: mod/settings.php:1224 mod/settings.php:1225 -msgid "No" -msgstr "" - -#: mod/apps.php:9 index.php:259 -msgid "You must be logged in to use addons. " -msgstr "" - -#: mod/apps.php:14 -msgid "Applications" -msgstr "" - -#: mod/apps.php:17 -msgid "No installed applications." -msgstr "" - -#: mod/attach.php:10 -msgid "Item not available." -msgstr "" - -#: mod/attach.php:22 -msgid "Item was not found." -msgstr "" - #: mod/babel.php:18 msgid "Source (bbcode) text:" msgstr "" @@ -3220,14 +3066,6 @@ msgstr "" msgid "diaspora2bb: " msgstr "" -#: mod/common.php:93 -msgid "No contacts in common." -msgstr "" - -#: mod/common.php:143 mod/contacts.php:893 -msgid "Common Friends" -msgstr "" - #: mod/credits.php:19 msgid "Credits" msgstr "" @@ -3239,857 +3077,38 @@ msgid "" "code or the translation of Friendica. Thank you all!" msgstr "" -#: mod/crepair.php:92 -msgid "Contact settings applied." -msgstr "" - -#: mod/crepair.php:94 -msgid "Contact update failed." -msgstr "" - -#: mod/crepair.php:119 mod/dfrn_confirm.php:130 mod/fsuggest.php:23 -#: mod/fsuggest.php:95 -msgid "Contact not found." -msgstr "" - -#: mod/crepair.php:125 -msgid "" -"WARNING: This is highly advanced and if you enter incorrect " -"information your communications with this contact may stop working." -msgstr "" - -#: mod/crepair.php:126 -msgid "" -"Please use your browser 'Back' button now if you are " -"uncertain what to do on this page." -msgstr "" - -#: mod/crepair.php:139 mod/crepair.php:141 -msgid "No mirroring" -msgstr "" - -#: mod/crepair.php:139 -msgid "Mirror as forwarded posting" -msgstr "" - -#: mod/crepair.php:139 mod/crepair.php:141 -msgid "Mirror as my own posting" -msgstr "" - -#: mod/crepair.php:155 -msgid "Return to contact editor" -msgstr "" - -#: mod/crepair.php:157 -msgid "Refetch contact data" -msgstr "" - -#: mod/crepair.php:159 mod/invite.php:150 mod/localtime.php:47 -#: mod/manage.php:157 mod/message.php:338 mod/message.php:521 -#: mod/install.php:243 mod/install.php:283 mod/contacts.php:605 -#: mod/events.php:529 mod/fsuggest.php:110 mod/mood.php:141 mod/photos.php:1127 -#: mod/photos.php:1248 mod/photos.php:1574 mod/photos.php:1623 -#: mod/photos.php:1665 mod/photos.php:1745 mod/poke.php:206 -#: mod/profiles.php:680 object/Item.php:702 -#: view/theme/duepuntozero/config.php:65 view/theme/frio/config.php:108 -#: view/theme/quattro/config.php:71 view/theme/vier/config.php:114 -msgid "Submit" -msgstr "" - -#: mod/crepair.php:161 -msgid "Remote Self" -msgstr "" - -#: mod/crepair.php:164 -msgid "Mirror postings from this contact" -msgstr "" - -#: mod/crepair.php:166 -msgid "" -"Mark this contact as remote_self, this will cause friendica to repost new " -"entries from this contact." -msgstr "" - -#: mod/crepair.php:170 mod/admin.php:1612 mod/admin.php:1625 mod/admin.php:1638 -#: mod/admin.php:1654 mod/settings.php:693 mod/settings.php:719 -msgid "Name" -msgstr "" - -#: mod/crepair.php:171 -msgid "Account Nickname" -msgstr "" - -#: mod/crepair.php:172 -msgid "@Tagname - overrides Name/Nickname" -msgstr "" - -#: mod/crepair.php:173 -msgid "Account URL" -msgstr "" - -#: mod/crepair.php:174 -msgid "Friend Request URL" -msgstr "" - -#: mod/crepair.php:175 -msgid "Friend Confirm URL" -msgstr "" - -#: mod/crepair.php:176 -msgid "Notification Endpoint URL" -msgstr "" - -#: mod/crepair.php:177 -msgid "Poll/Feed URL" -msgstr "" - -#: mod/crepair.php:178 -msgid "New photo from this URL" -msgstr "" - -#: mod/filer.php:31 -msgid "- select -" -msgstr "" - -#: mod/lockview.php:33 mod/lockview.php:41 -msgid "Remote privacy information not available." -msgstr "" - -#: mod/lockview.php:50 -msgid "Visible to:" -msgstr "" - #: mod/maintenance.php:21 msgid "System down for maintenance" msgstr "" -#: mod/newmember.php:7 -msgid "Welcome to Friendica" -msgstr "" - -#: mod/newmember.php:8 -msgid "New Member Checklist" -msgstr "" - -#: mod/newmember.php:10 -msgid "" -"We would like to offer some tips and links to help make your experience " -"enjoyable. Click any item to visit the relevant page. A link to this page " -"will be visible from your home page for two weeks after your initial " -"registration and then will quietly disappear." -msgstr "" - -#: mod/newmember.php:11 -msgid "Getting Started" -msgstr "" - -#: mod/newmember.php:13 -msgid "Friendica Walk-Through" -msgstr "" - -#: mod/newmember.php:13 -msgid "" -"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." -msgstr "" - -#: mod/newmember.php:17 -msgid "Go to Your Settings" -msgstr "" - -#: mod/newmember.php:17 -msgid "" -"On your Settings page - change your initial password. Also make a " -"note of your Identity Address. This looks just like an email address - and " -"will be useful in making friends on the free social web." -msgstr "" - -#: mod/newmember.php:18 -msgid "" -"Review the other settings, particularly the privacy settings. An unpublished " -"directory listing is like having an unlisted phone number. In general, you " -"should probably publish your listing - unless all of your friends and " -"potential friends know exactly how to find you." -msgstr "" - -#: mod/newmember.php:22 mod/profile_photo.php:257 mod/profiles.php:699 -msgid "Upload Profile Photo" -msgstr "" - -#: mod/newmember.php:22 -msgid "" -"Upload a profile photo if you have not done so already. Studies have shown " -"that people with real photos of themselves are ten times more likely to make " -"friends than people who do not." -msgstr "" - -#: mod/newmember.php:23 -msgid "Edit Your Profile" -msgstr "" - -#: mod/newmember.php:23 -msgid "" -"Edit your default profile to your liking. Review the " -"settings for hiding your list of friends and hiding the profile from unknown " -"visitors." -msgstr "" - -#: mod/newmember.php:24 -msgid "Profile Keywords" -msgstr "" - -#: mod/newmember.php:24 -msgid "" -"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." -msgstr "" - -#: mod/newmember.php:26 -msgid "Connecting" -msgstr "" - -#: mod/newmember.php:32 -msgid "Importing Emails" -msgstr "" - -#: mod/newmember.php:32 -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 "" - -#: mod/newmember.php:35 -msgid "Go to Your Contacts Page" -msgstr "" - -#: mod/newmember.php:35 -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 "" - -#: mod/newmember.php:36 -msgid "Go to Your Site's Directory" -msgstr "" - -#: mod/newmember.php:36 -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 "" - -#: mod/newmember.php:37 -msgid "Finding New People" -msgstr "" - -#: mod/newmember.php:37 -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 " -"interest, and provide suggestions based on network relationships. On a brand " -"new site, friend suggestions will usually begin to be populated within 24 " -"hours." -msgstr "" - -#: mod/newmember.php:41 -msgid "Group Your Contacts" -msgstr "" - -#: mod/newmember.php:41 -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 "" - -#: mod/newmember.php:44 -msgid "Why Aren't My Posts Public?" -msgstr "" - -#: mod/newmember.php:44 -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 "" - -#: mod/newmember.php:48 -msgid "Getting Help" -msgstr "" - -#: mod/newmember.php:50 -msgid "Go to the Help Section" -msgstr "" - -#: mod/newmember.php:50 -msgid "" -"Our help pages may be consulted for detail on other program " -"features and resources." -msgstr "" - -#: mod/nogroup.php:45 mod/viewcontacts.php:105 mod/contacts.php:616 -#: mod/contacts.php:960 -#, php-format -msgid "Visit %s's profile [%s]" -msgstr "" - -#: mod/nogroup.php:46 mod/contacts.php:961 -msgid "Edit contact" -msgstr "" - -#: mod/nogroup.php:67 -msgid "Contacts who are not members of a group" -msgstr "" - -#: mod/profperm.php:22 mod/group.php:78 index.php:411 -msgid "Permission denied" -msgstr "" - -#: mod/profperm.php:28 mod/profperm.php:59 -msgid "Invalid profile identifier." -msgstr "" - -#: mod/profperm.php:105 -msgid "Profile Visibility Editor" -msgstr "" - -#: mod/profperm.php:109 mod/group.php:264 -msgid "Click on a contact to add or remove." -msgstr "" - -#: mod/profperm.php:118 -msgid "Visible To" -msgstr "" - -#: mod/profperm.php:134 -msgid "All Contacts (with secure profile access)" -msgstr "" - -#: mod/update_community.php:21 mod/update_display.php:25 -#: mod/update_notes.php:38 mod/update_profile.php:37 mod/update_network.php:29 -msgid "[Embedded content - reload page to view]" -msgstr "" - -#: mod/viewcontacts.php:39 mod/webfinger.php:10 mod/probe.php:9 -#: mod/community.php:17 mod/dfrn_request.php:805 mod/directory.php:31 -#: mod/search.php:89 mod/search.php:95 mod/display.php:202 mod/photos.php:965 -#: mod/videos.php:202 +#: mod/webfinger.php:10 mod/probe.php:9 mod/community.php:18 +#: mod/dfrn_request.php:807 mod/directory.php:34 mod/display.php:202 +#: mod/photos.php:967 mod/search.php:92 mod/search.php:98 mod/videos.php:205 +#: mod/viewcontacts.php:41 msgid "Public access denied." msgstr "" -#: mod/viewcontacts.php:78 -msgid "No contacts." -msgstr "" - -#: mod/viewsrc.php:8 -msgid "Access denied." -msgstr "" - #: mod/webfinger.php:11 mod/probe.php:10 msgid "Only logged in users are permitted to perform a probing." msgstr "" -#: mod/uimport.php:53 mod/register.php:203 -msgid "" -"This site has exceeded the number of allowed daily account registrations. " -"Please try again tomorrow." -msgstr "" - -#: mod/uimport.php:68 mod/register.php:300 -msgid "Import" -msgstr "" - -#: mod/uimport.php:70 -msgid "Move account" -msgstr "" - -#: mod/uimport.php:71 -msgid "You can import an account from another Friendica server." -msgstr "" - -#: mod/uimport.php:72 -msgid "" -"You need to export your account from the old server and upload it here. We " -"will recreate your old account here with all your contacts. We will try also " -"to inform your friends that you moved here." -msgstr "" - -#: mod/uimport.php:73 -msgid "" -"This feature is experimental. We can't import contacts from the OStatus " -"network (GNU Social/Statusnet) or from Diaspora" -msgstr "" - -#: mod/uimport.php:74 -msgid "Account file" -msgstr "" - -#: mod/uimport.php:74 -msgid "" -"To export your account, go to \"Settings->Export your personal data\" and " -"select \"Export account\"" -msgstr "" - -#: mod/community.php:22 -msgid "Not available." -msgstr "" - -#: mod/community.php:49 mod/search.php:215 -msgid "No results." -msgstr "" - -#: mod/allfriends.php:49 -msgid "No friends to display." -msgstr "" - #: mod/bookmarklet.php:44 msgid "The post was created" msgstr "" -#: mod/cal.php:146 mod/profile.php:157 mod/display.php:339 -msgid "Access to this profile has been restricted." -msgstr "" - -#: mod/cal.php:274 mod/events.php:384 -msgid "View" -msgstr "" - -#: mod/cal.php:275 mod/events.php:386 -msgid "Previous" -msgstr "" - -#: mod/cal.php:276 mod/install.php:202 mod/events.php:387 -msgid "Next" -msgstr "" - -#: mod/cal.php:285 mod/events.php:396 -msgid "list" -msgstr "" - -#: mod/cal.php:295 -msgid "User not found" -msgstr "" - -#: mod/cal.php:311 -msgid "This calendar format is not supported" -msgstr "" - -#: mod/cal.php:313 -msgid "No exportable data found" -msgstr "" - -#: mod/cal.php:328 -msgid "calendar" -msgstr "" - -#: mod/dfrn_poll.php:114 mod/dfrn_poll.php:550 -#, php-format -msgid "%1$s welcomes %2$s" -msgstr "" - -#: mod/dfrn_request.php:104 -msgid "This introduction has already been accepted." -msgstr "" - -#: mod/dfrn_request.php:127 mod/dfrn_request.php:529 -msgid "Profile location is not valid or does not contain profile information." -msgstr "" - -#: mod/dfrn_request.php:132 mod/dfrn_request.php:534 -msgid "Warning: profile location has no identifiable owner name." -msgstr "" - -#: mod/dfrn_request.php:135 mod/dfrn_request.php:537 -msgid "Warning: profile location has no profile photo." -msgstr "" - -#: mod/dfrn_request.php:139 mod/dfrn_request.php:541 -#, 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] "" -msgstr[1] "" - -#: mod/dfrn_request.php:183 -msgid "Introduction complete." -msgstr "" - -#: mod/dfrn_request.php:228 -msgid "Unrecoverable protocol error." -msgstr "" - -#: mod/dfrn_request.php:256 -msgid "Profile unavailable." -msgstr "" - -#: mod/dfrn_request.php:283 -#, php-format -msgid "%s has received too many connection requests today." -msgstr "" - -#: mod/dfrn_request.php:284 -msgid "Spam protection measures have been invoked." -msgstr "" - -#: mod/dfrn_request.php:285 -msgid "Friends are advised to please try again in 24 hours." -msgstr "" - -#: mod/dfrn_request.php:347 -msgid "Invalid locator" -msgstr "" - -#: mod/dfrn_request.php:356 -msgid "Invalid email address." -msgstr "" - -#: mod/dfrn_request.php:381 -msgid "This account has not been configured for email. Request failed." -msgstr "" - -#: mod/dfrn_request.php:484 -msgid "You have already introduced yourself here." -msgstr "" - -#: mod/dfrn_request.php:488 -#, php-format -msgid "Apparently you are already friends with %s." -msgstr "" - -#: mod/dfrn_request.php:509 -msgid "Invalid profile URL." -msgstr "" - -#: mod/dfrn_request.php:594 mod/contacts.php:223 -msgid "Failed to update contact record." -msgstr "" - -#: mod/dfrn_request.php:615 -msgid "Your introduction has been sent." -msgstr "" - -#: mod/dfrn_request.php:657 -msgid "" -"Remote subscription can't be done for your network. Please subscribe " -"directly on your system." -msgstr "" - -#: mod/dfrn_request.php:678 -msgid "Please login to confirm introduction." -msgstr "" - -#: mod/dfrn_request.php:688 -msgid "" -"Incorrect identity currently logged in. Please login to this profile." -msgstr "" - -#: mod/dfrn_request.php:702 mod/dfrn_request.php:719 -msgid "Confirm" -msgstr "" - -#: mod/dfrn_request.php:714 -msgid "Hide this contact" -msgstr "" - -#: mod/dfrn_request.php:717 -#, php-format -msgid "Welcome home %s." -msgstr "" - -#: mod/dfrn_request.php:718 -#, php-format -msgid "Please confirm your introduction/connection request to %s." -msgstr "" - -#: mod/dfrn_request.php:849 -msgid "" -"Please enter your 'Identity Address' from one of the following supported " -"communications networks:" -msgstr "" - -#: mod/dfrn_request.php:873 -#, php-format -msgid "" -"If you are not yet a member of the free social web, follow this link to find a public Friendica site and join us today." -msgstr "" - -#: mod/dfrn_request.php:878 -msgid "Friend/Connection Request" -msgstr "" - -#: mod/dfrn_request.php:879 -msgid "" -"Examples: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, " -"testuser@identi.ca" -msgstr "" - -#: mod/dfrn_request.php:880 mod/follow.php:149 -msgid "Please answer the following:" -msgstr "" - -#: mod/dfrn_request.php:881 mod/follow.php:150 -#, php-format -msgid "Does %s know you?" -msgstr "" - -#: mod/dfrn_request.php:885 mod/follow.php:151 -msgid "Add a personal note:" -msgstr "" - -#: mod/dfrn_request.php:888 -msgid "StatusNet/Federated Social Web" -msgstr "" - -#: mod/dfrn_request.php:890 -#, php-format -msgid "" -" - please do not use this form. Instead, enter %s into your Diaspora search " -"bar." -msgstr "" - -#: mod/dfrn_request.php:891 mod/follow.php:157 mod/unfollow.php:113 -msgid "Your Identity Address:" -msgstr "" - -#: mod/dfrn_request.php:894 mod/follow.php:63 mod/unfollow.php:65 -msgid "Submit Request" -msgstr "" - -#: mod/editpost.php:20 mod/editpost.php:30 -msgid "Item not found" -msgstr "" - -#: mod/editpost.php:35 -msgid "Edit post" -msgstr "" - -#: mod/fetch.php:16 mod/fetch.php:43 mod/fetch.php:52 mod/help.php:57 -#: mod/p.php:20 mod/p.php:47 mod/p.php:56 index.php:303 -msgid "Not Found" -msgstr "" - -#: mod/follow.php:42 -msgid "Contact added" -msgstr "" - -#: mod/follow.php:74 -msgid "You already added this contact." -msgstr "" - -#: mod/follow.php:83 -msgid "Diaspora support isn't enabled. Contact can't be added." -msgstr "" - -#: mod/follow.php:90 -msgid "OStatus support is disabled. Contact can't be added." -msgstr "" - -#: mod/follow.php:97 -msgid "The network type couldn't be detected. Contact can't be added." -msgstr "" - -#: mod/follow.php:166 mod/notifications.php:258 mod/unfollow.php:122 -#: mod/contacts.php:654 -msgid "Profile URL" -msgstr "" - -#: mod/group.php:31 -msgid "Group created." -msgstr "" - -#: mod/group.php:37 -msgid "Could not create group." -msgstr "" - -#: mod/group.php:51 mod/group.php:156 -msgid "Group not found." -msgstr "" - -#: mod/group.php:65 -msgid "Group name changed." -msgstr "" - -#: mod/group.php:95 -msgid "Save Group" -msgstr "" - -#: mod/group.php:100 -msgid "Create a group of contacts/friends." -msgstr "" - -#: mod/group.php:125 -msgid "Group removed." -msgstr "" - -#: mod/group.php:127 -msgid "Unable to remove group." -msgstr "" - -#: mod/group.php:191 -msgid "Delete Group" -msgstr "" - -#: mod/group.php:197 -msgid "Group Editor" -msgstr "" - -#: mod/group.php:202 -msgid "Edit Group Name" -msgstr "" - -#: mod/group.php:212 -msgid "Members" -msgstr "" - -#: mod/group.php:214 mod/contacts.php:722 -msgid "All Contacts" -msgstr "" - -#: mod/group.php:215 mod/network.php:655 -msgid "Group is empty" -msgstr "" - -#: mod/group.php:228 -msgid "Remove Contact" -msgstr "" - -#: mod/group.php:252 -msgid "Add Contact" -msgstr "" - -#: mod/hcard.php:14 -msgid "No profile" -msgstr "" - #: mod/help.php:45 msgid "Help:" msgstr "" -#: mod/help.php:60 index.php:306 +#: mod/help.php:57 mod/fetch.php:17 mod/fetch.php:53 mod/fetch.php:66 +#: mod/p.php:20 mod/p.php:47 mod/p.php:56 index.php:287 +msgid "Not Found" +msgstr "" + +#: mod/help.php:60 index.php:292 msgid "Page not found." msgstr "" -#: mod/home.php:42 -#, php-format -msgid "Welcome to %s" -msgstr "" - -#: mod/invite.php:31 -msgid "Total invitation limit exceeded." -msgstr "" - -#: mod/invite.php:54 -#, php-format -msgid "%s : Not a valid email address." -msgstr "" - -#: mod/invite.php:79 -msgid "Please join us on Friendica" -msgstr "" - -#: mod/invite.php:90 -msgid "Invitation limit exceeded. Please contact your site administrator." -msgstr "" - -#: mod/invite.php:94 -#, php-format -msgid "%s : Message delivery failed." -msgstr "" - -#: mod/invite.php:98 -#, php-format -msgid "%d message sent." -msgid_plural "%d messages sent." -msgstr[0] "" -msgstr[1] "" - -#: mod/invite.php:117 -msgid "You have no more invitations available" -msgstr "" - -#: mod/invite.php:125 -#, php-format -msgid "" -"Visit %s for a list of public sites that you can join. Friendica members on " -"other sites can all connect with each other, as well as with members of many " -"other social networks." -msgstr "" - -#: mod/invite.php:127 -#, php-format -msgid "" -"To accept this invitation, please visit and register at %s or any other " -"public Friendica website." -msgstr "" - -#: mod/invite.php:128 -#, php-format -msgid "" -"Friendica sites all inter-connect to create a huge privacy-enhanced social " -"web that is owned and controlled by its members. They can also connect with " -"many traditional social networks. See %s for a list of alternate Friendica " -"sites you can join." -msgstr "" - -#: mod/invite.php:132 -msgid "" -"Our apologies. This system is not currently configured to connect with other " -"public sites or invite members." -msgstr "" - -#: mod/invite.php:135 -#, php-format -msgid "To accept this invitation, please visit and register at %s." -msgstr "" - -#: mod/invite.php:136 -msgid "" -"Friendica sites all inter-connect to create a huge privacy-enhanced social " -"web that is owned and controlled by its members. They can also connect with " -"many traditional social networks." -msgstr "" - -#: mod/invite.php:142 -msgid "Send invitations" -msgstr "" - -#: mod/invite.php:143 -msgid "Enter email addresses, one per line:" -msgstr "" - -#: mod/invite.php:144 mod/message.php:332 mod/message.php:515 -#: mod/wallmessage.php:138 -msgid "Your message:" -msgstr "" - -#: mod/invite.php:145 -msgid "" -"You are cordially invited to join me and other close friends on Friendica - " -"and help us to create a better social web." -msgstr "" - -#: mod/invite.php:147 -msgid "You will need to supply this invitation code: $invite_code" -msgstr "" - -#: mod/invite.php:147 -msgid "" -"Once you have registered, please connect with me via my profile page at:" -msgstr "" - -#: mod/invite.php:149 -msgid "" -"For more information about the Friendica project and why we feel it is " -"important, please visit http://friendi.ca" -msgstr "" - #: mod/localtime.php:26 msgid "Time Conversion" msgstr "" @@ -4119,1244 +3138,260 @@ msgstr "" msgid "Please select your timezone:" msgstr "" -#: mod/lostpass.php:22 -msgid "No valid account found." -msgstr "" - -#: mod/lostpass.php:38 -msgid "Password reset request issued. Check your email." -msgstr "" - -#: mod/lostpass.php:44 -#, php-format -msgid "" -"\n" -"\t\tDear %1$s,\n" -"\t\t\tA request was recently received at \"%2$s\" to reset your account\n" -"\t\tpassword. In order to confirm this request, please select the " -"verification link\n" -"\t\tbelow or paste it into your web browser address bar.\n" -"\n" -"\t\tIf you did NOT request this change, please DO NOT follow the link\n" -"\t\tprovided and ignore and/or delete this email.\n" -"\n" -"\t\tYour password will not be changed unless we can verify that you\n" -"\t\tissued this request." -msgstr "" - -#: mod/lostpass.php:55 -#, php-format -msgid "" -"\n" -"\t\tFollow this link to verify your identity:\n" -"\n" -"\t\t%1$s\n" -"\n" -"\t\tYou will then receive a follow-up message containing the new password.\n" -"\t\tYou may change that password from your account settings page after " -"logging in.\n" -"\n" -"\t\tThe login details are as follows:\n" -"\n" -"\t\tSite Location:\t%2$s\n" -"\t\tLogin Name:\t%3$s" -msgstr "" - -#: mod/lostpass.php:74 -#, php-format -msgid "Password reset requested at %s" -msgstr "" - -#: mod/lostpass.php:94 -msgid "" -"Request could not be verified. (You may have previously submitted it.) " -"Password reset failed." -msgstr "" - -#: mod/lostpass.php:113 boot.php:889 -msgid "Password Reset" -msgstr "" - -#: mod/lostpass.php:114 -msgid "Your password has been reset as requested." -msgstr "" - -#: mod/lostpass.php:115 -msgid "Your new password is" -msgstr "" - -#: mod/lostpass.php:116 -msgid "Save or copy your new password - and then" -msgstr "" - -#: mod/lostpass.php:117 -msgid "click here to login" -msgstr "" - -#: mod/lostpass.php:118 -msgid "" -"Your password may be changed from the Settings page after " -"successful login." -msgstr "" - -#: mod/lostpass.php:128 -#, php-format -msgid "" -"\n" -"\t\t\t\tDear %1$s,\n" -"\t\t\t\t\tYour password has been changed as requested. Please retain this\n" -"\t\t\t\tinformation for your records (or change your password immediately " -"to\n" -"\t\t\t\tsomething that you will remember).\n" -"\t\t\t" -msgstr "" - -#: mod/lostpass.php:134 -#, php-format -msgid "" -"\n" -"\t\t\t\tYour login details are as follows:\n" -"\n" -"\t\t\t\tSite Location:\t%1$s\n" -"\t\t\t\tLogin Name:\t%2$s\n" -"\t\t\t\tPassword:\t%3$s\n" -"\n" -"\t\t\t\tYou may change that password from your account settings page after " -"logging in.\n" -"\t\t\t" -msgstr "" - -#: mod/lostpass.php:150 -#, php-format -msgid "Your password has been changed at %s" -msgstr "" - -#: mod/lostpass.php:162 -msgid "Forgot your Password?" -msgstr "" - -#: mod/lostpass.php:163 -msgid "" -"Enter your email address and submit to have your password reset. Then check " -"your email for further instructions." -msgstr "" - -#: mod/lostpass.php:164 boot.php:877 -msgid "Nickname or Email: " -msgstr "" - -#: mod/lostpass.php:165 -msgid "Reset" -msgstr "" - -#: mod/manage.php:153 -msgid "Manage Identities and/or Pages" -msgstr "" - -#: mod/manage.php:154 -msgid "" -"Toggle between different identities or community/group pages which share " -"your account details or which you have been granted \"manage\" permissions" -msgstr "" - -#: mod/manage.php:155 -msgid "Select an identity to manage: " -msgstr "" - -#: mod/match.php:39 -msgid "No keywords to match. Please add keywords to your default profile." -msgstr "" - -#: mod/match.php:92 -msgid "is interested in:" -msgstr "" - -#: mod/match.php:106 -msgid "Profile Match" -msgstr "" - -#: mod/match.php:113 mod/dirfind.php:249 -msgid "No matches" -msgstr "" - -#: mod/message.php:63 mod/wallmessage.php:53 -msgid "No recipient selected." -msgstr "" - -#: mod/message.php:67 -msgid "Unable to locate contact information." -msgstr "" - -#: mod/message.php:70 mod/wallmessage.php:59 -msgid "Message could not be sent." -msgstr "" - -#: mod/message.php:73 mod/wallmessage.php:62 -msgid "Message collection failure." -msgstr "" - -#: mod/message.php:76 mod/wallmessage.php:65 -msgid "Message sent." -msgstr "" - -#: mod/message.php:205 -msgid "Do you really want to delete this message?" -msgstr "" - -#: mod/message.php:225 -msgid "Message deleted." -msgstr "" - -#: mod/message.php:255 -msgid "Conversation removed." -msgstr "" - -#: mod/message.php:322 mod/wallmessage.php:129 -msgid "Send Private Message" -msgstr "" - -#: mod/message.php:323 mod/message.php:510 mod/wallmessage.php:131 -msgid "To:" -msgstr "" - -#: mod/message.php:328 mod/message.php:512 mod/wallmessage.php:132 -msgid "Subject:" -msgstr "" - -#: mod/message.php:364 -msgid "No messages." -msgstr "" - -#: mod/message.php:403 -msgid "Message not available." -msgstr "" - -#: mod/message.php:478 -msgid "Delete message" -msgstr "" - -#: mod/message.php:503 mod/message.php:591 -msgid "Delete conversation" -msgstr "" - -#: mod/message.php:505 -msgid "" -"No secure communications available. You may be able to " -"respond from the sender's profile page." -msgstr "" - -#: mod/message.php:509 -msgid "Send Reply" -msgstr "" - -#: mod/message.php:561 -#, php-format -msgid "Unknown sender - %s" -msgstr "" - -#: mod/message.php:563 -#, php-format -msgid "You and %s" -msgstr "" - -#: mod/message.php:565 -#, php-format -msgid "%s and You" -msgstr "" - -#: mod/message.php:594 -msgid "D, d M Y - g:i A" -msgstr "" - -#: mod/message.php:597 -#, php-format -msgid "%d message" -msgid_plural "%d messages" -msgstr[0] "" -msgstr[1] "" - -#: mod/notifications.php:38 -msgid "Invalid request identifier." -msgstr "" - -#: mod/notifications.php:47 mod/notifications.php:183 mod/notifications.php:230 -msgid "Discard" -msgstr "" - -#: mod/notifications.php:63 mod/notifications.php:182 mod/notifications.php:266 -#: mod/contacts.php:636 mod/contacts.php:836 mod/contacts.php:1021 -msgid "Ignore" -msgstr "" - -#: mod/notifications.php:108 -msgid "Network Notifications" -msgstr "" - -#: mod/notifications.php:114 mod/notify.php:73 -msgid "System Notifications" -msgstr "" - -#: mod/notifications.php:120 -msgid "Personal Notifications" -msgstr "" - -#: mod/notifications.php:126 -msgid "Home Notifications" -msgstr "" - -#: mod/notifications.php:155 -msgid "Show Ignored Requests" -msgstr "" - -#: mod/notifications.php:155 -msgid "Hide Ignored Requests" -msgstr "" - -#: mod/notifications.php:167 mod/notifications.php:237 -msgid "Notification type: " -msgstr "" - -#: mod/notifications.php:170 -#, php-format -msgid "suggested by %s" -msgstr "" - -#: mod/notifications.php:175 mod/notifications.php:254 mod/contacts.php:643 -msgid "Hide this contact from others" -msgstr "" - -#: mod/notifications.php:176 mod/notifications.php:255 -msgid "Post a new friend activity" -msgstr "" - -#: mod/notifications.php:176 mod/notifications.php:255 -msgid "if applicable" -msgstr "" - -#: mod/notifications.php:179 mod/notifications.php:264 mod/admin.php:1628 -msgid "Approve" -msgstr "" - -#: mod/notifications.php:198 -msgid "Claims to be known to you: " -msgstr "" - -#: mod/notifications.php:199 -msgid "yes" -msgstr "" - -#: mod/notifications.php:199 -msgid "no" -msgstr "" - -#: mod/notifications.php:200 mod/notifications.php:205 -msgid "Shall your connection be bidirectional or not?" -msgstr "" - -#: mod/notifications.php:201 mod/notifications.php:206 -#, php-format -msgid "" -"Accepting %s as a friend allows %s to subscribe to your posts, and you will " -"also receive updates from them in your news feed." -msgstr "" - -#: mod/notifications.php:202 -#, php-format -msgid "" -"Accepting %s as a subscriber allows them to subscribe to your posts, but you " -"will not receive updates from them in your news feed." -msgstr "" - -#: mod/notifications.php:207 -#, php-format -msgid "" -"Accepting %s as a sharer allows them to subscribe to your posts, but you " -"will not receive updates from them in your news feed." -msgstr "" - -#: mod/notifications.php:218 -msgid "Friend" -msgstr "" - -#: mod/notifications.php:219 -msgid "Sharer" -msgstr "" - -#: mod/notifications.php:219 -msgid "Subscriber" -msgstr "" - -#: mod/notifications.php:275 -msgid "No introductions." -msgstr "" - -#: mod/notifications.php:316 -msgid "Show unread" -msgstr "" - -#: mod/notifications.php:316 -msgid "Show all" -msgstr "" - -#: mod/notifications.php:322 -#, php-format -msgid "No more %s notifications." -msgstr "" - -#: mod/notify.php:69 -msgid "No more system notifications." +#: mod/localtime.php:47 mod/contacts.php:612 mod/crepair.php:162 +#: mod/events.php:531 mod/fsuggest.php:117 mod/install.php:244 +#: mod/install.php:284 mod/invite.php:152 mod/manage.php:158 +#: mod/message.php:340 mod/message.php:512 mod/mood.php:142 mod/photos.php:1129 +#: mod/photos.php:1241 mod/photos.php:1556 mod/photos.php:1605 +#: mod/photos.php:1647 mod/photos.php:1721 mod/poke.php:207 +#: mod/profiles.php:684 view/theme/duepuntozero/config.php:67 +#: view/theme/frio/config.php:108 view/theme/quattro/config.php:73 +#: view/theme/vier/config.php:117 src/Object/Item.php:787 +msgid "Submit" msgstr "" #: mod/oexchange.php:25 msgid "Post successful." msgstr "" -#: mod/openid.php:25 -msgid "OpenID protocol error. No ID returned." -msgstr "" - -#: mod/openid.php:61 -msgid "" -"Account not found and OpenID registration is not permitted on this site." -msgstr "" - -#: mod/p.php:13 -msgid "Not Extended" -msgstr "" - -#: mod/profile.php:177 -msgid "Tips for New Members" -msgstr "" - -#: mod/removeme.php:55 mod/removeme.php:58 -msgid "Remove My Account" -msgstr "" - -#: mod/removeme.php:56 -msgid "" -"This will completely remove your account. Once this has been done it is not " -"recoverable." -msgstr "" - -#: mod/removeme.php:57 -msgid "Please enter your password for verification:" -msgstr "" - -#: mod/repair_ostatus.php:17 -msgid "Resubscribing to OStatus contacts" -msgstr "" - -#: mod/repair_ostatus.php:33 -msgid "Error" -msgstr "" - -#: mod/repair_ostatus.php:47 mod/ostatus_subscribe.php:57 -msgid "Done" -msgstr "" - -#: mod/repair_ostatus.php:53 mod/ostatus_subscribe.php:81 -msgid "Keep this window open until done." -msgstr "" - -#: mod/subthread.php:106 -#, php-format -msgid "%1$s is following %2$s's %3$s" -msgstr "" - -#: mod/tagrm.php:46 -msgid "Tag removed" -msgstr "" - -#: mod/tagrm.php:85 -msgid "Remove Item Tag" -msgstr "" - -#: mod/tagrm.php:87 -msgid "Select a tag to remove: " -msgstr "" - -#: mod/tagrm.php:98 mod/delegate.php:139 -msgid "Remove" -msgstr "" - -#: mod/uexport.php:39 -msgid "Export account" -msgstr "" - -#: mod/uexport.php:39 -msgid "" -"Export your account info and contacts. Use this to make a backup of your " -"account and/or to move it to another server." -msgstr "" - -#: mod/uexport.php:40 -msgid "Export all" -msgstr "" - -#: mod/uexport.php:40 -msgid "" -"Export your accout info, contacts and all your items as json. Could be a " -"very big file, and could take a lot of time. Use this to make a full backup " -"of your account (photos are not exported)" -msgstr "" - -#: mod/uexport.php:47 mod/settings.php:95 -msgid "Export personal data" -msgstr "" - -#: mod/wallmessage.php:45 mod/wallmessage.php:109 -#, php-format -msgid "Number of daily wall messages for %s exceeded. Message failed." -msgstr "" - -#: mod/wallmessage.php:56 -msgid "Unable to check your home location." -msgstr "" - -#: mod/wallmessage.php:83 mod/wallmessage.php:92 -msgid "No recipient." -msgstr "" - -#: mod/wallmessage.php:130 -#, php-format -msgid "" -"If you wish for %s to respond, please check that the privacy settings on " -"your site allow private mail from unknown senders." -msgstr "" - -#: mod/delegate.php:101 -msgid "No potential page delegates located." -msgstr "" - -#: mod/delegate.php:132 -msgid "" -"Delegates are able to manage all aspects of this account/page except for " -"basic account settings. Please do not delegate your personal account to " -"anybody that you do not trust completely." -msgstr "" - -#: mod/delegate.php:133 -msgid "Existing Page Managers" -msgstr "" - -#: mod/delegate.php:135 -msgid "Existing Page Delegates" -msgstr "" - -#: mod/delegate.php:137 -msgid "Potential Delegates" -msgstr "" - -#: mod/delegate.php:140 -msgid "Add" -msgstr "" - -#: mod/delegate.php:141 -msgid "No entries." -msgstr "" - -#: mod/suggest.php:30 -msgid "Do you really want to delete this suggestion?" -msgstr "" - -#: mod/suggest.php:71 -msgid "" -"No suggestions available. If this is a new site, please try again in 24 " -"hours." -msgstr "" - -#: mod/suggest.php:84 mod/suggest.php:104 -msgid "Ignore/Hide" -msgstr "" - -#: mod/directory.php:193 view/theme/vier/theme.php:194 -msgid "Global Directory" -msgstr "" - -#: mod/directory.php:195 -msgid "Find on this site" -msgstr "" - -#: mod/directory.php:197 -msgid "Results for:" -msgstr "" - -#: mod/directory.php:199 -msgid "Site Directory" -msgstr "" - -#: mod/directory.php:206 -msgid "No entries (some entries may be hidden)." -msgstr "" - -#: mod/fbrowser.php:136 -msgid "Files" -msgstr "" - -#: mod/friendica.php:70 -msgid "This is Friendica, version" -msgstr "" - -#: mod/friendica.php:71 -msgid "running at web location" -msgstr "" - -#: mod/friendica.php:75 -msgid "" -"Please visit Friendi.ca to learn more " -"about the Friendica project." -msgstr "" - -#: mod/friendica.php:79 -msgid "Bug reports and issues: please visit" -msgstr "" - -#: mod/friendica.php:79 -msgid "the bugtracker at github" -msgstr "" - -#: mod/friendica.php:82 -msgid "" -"Suggestions, praise, donations, etc. - please email \"Info\" at Friendica - " -"dot com" -msgstr "" - -#: mod/friendica.php:96 -msgid "Installed plugins/addons/apps:" -msgstr "" - -#: mod/friendica.php:110 -msgid "No installed plugins/addons/apps" -msgstr "" - -#: mod/friendica.php:115 -msgid "On this server the following remote servers are blocked." -msgstr "" - -#: mod/friendica.php:116 mod/admin.php:291 mod/admin.php:309 -msgid "Reason for the block" -msgstr "" - -#: mod/install.php:107 -msgid "Friendica Communications Server - Setup" -msgstr "" - -#: mod/install.php:113 -msgid "Could not connect to database." -msgstr "" - -#: mod/install.php:117 -msgid "Could not create table." -msgstr "" - -#: mod/install.php:123 -msgid "Your Friendica site database has been installed." -msgstr "" - -#: mod/install.php:128 -msgid "" -"You may need to import the file \"database.sql\" manually using phpmyadmin " -"or mysql." -msgstr "" - -#: mod/install.php:129 mod/install.php:201 mod/install.php:548 -msgid "Please see the file \"INSTALL.txt\"." -msgstr "" - -#: mod/install.php:141 -msgid "Database already in use." -msgstr "" - -#: mod/install.php:198 -msgid "System check" -msgstr "" - -#: mod/install.php:203 -msgid "Check again" -msgstr "" - -#: mod/install.php:222 -msgid "Database connection" -msgstr "" - -#: mod/install.php:223 -msgid "" -"In order to install Friendica we need to know how to connect to your " -"database." -msgstr "" - -#: mod/install.php:224 -msgid "" -"Please contact your hosting provider or site administrator if you have " -"questions about these settings." -msgstr "" - -#: mod/install.php:225 -msgid "" -"The database you specify below should already exist. If it does not, please " -"create it before continuing." -msgstr "" - -#: mod/install.php:229 -msgid "Database Server Name" -msgstr "" - -#: mod/install.php:230 -msgid "Database Login Name" -msgstr "" - -#: mod/install.php:231 -msgid "Database Login Password" -msgstr "" - -#: mod/install.php:231 -msgid "For security reasons the password must not be empty" -msgstr "" - -#: mod/install.php:232 -msgid "Database Name" -msgstr "" - -#: mod/install.php:233 mod/install.php:274 -msgid "Site administrator email address" -msgstr "" - -#: mod/install.php:233 mod/install.php:274 -msgid "" -"Your account email address must match this in order to use the web admin " -"panel." -msgstr "" - -#: mod/install.php:237 mod/install.php:277 -msgid "Please select a default timezone for your website" -msgstr "" - -#: mod/install.php:264 -msgid "Site settings" -msgstr "" - -#: mod/install.php:278 -msgid "System Language:" -msgstr "" - -#: mod/install.php:278 -msgid "" -"Set the default language for your Friendica installation interface and to " -"send emails." -msgstr "" - -#: mod/install.php:318 -msgid "Could not find a command line version of PHP in the web server PATH." -msgstr "" - -#: mod/install.php:319 -msgid "" -"If you don't have a command line version of PHP installed on server, you " -"will not be able to run the background processing. See 'Setup the poller'" -msgstr "" - -#: mod/install.php:323 -msgid "PHP executable path" -msgstr "" - -#: mod/install.php:323 -msgid "" -"Enter full path to php executable. You can leave this blank to continue the " -"installation." -msgstr "" - -#: mod/install.php:328 -msgid "Command line PHP" -msgstr "" - -#: mod/install.php:337 -msgid "PHP executable is not the php cli binary (could be cgi-fgci version)" -msgstr "" - -#: mod/install.php:338 -msgid "Found PHP version: " -msgstr "" - -#: mod/install.php:340 -msgid "PHP cli binary" -msgstr "" - -#: mod/install.php:351 -msgid "" -"The command line version of PHP on your system does not have " -"\"register_argc_argv\" enabled." -msgstr "" - -#: mod/install.php:352 -msgid "This is required for message delivery to work." -msgstr "" - -#: mod/install.php:354 -msgid "PHP register_argc_argv" -msgstr "" - -#: mod/install.php:377 -msgid "" -"Error: the \"openssl_pkey_new\" function on this system is not able to " -"generate encryption keys" -msgstr "" - -#: mod/install.php:378 -msgid "" -"If running under Windows, please see \"http://www.php.net/manual/en/openssl." -"installation.php\"." -msgstr "" - -#: mod/install.php:380 -msgid "Generate encryption keys" -msgstr "" - -#: mod/install.php:387 -msgid "libCurl PHP module" -msgstr "" - -#: mod/install.php:388 -msgid "GD graphics PHP module" -msgstr "" - -#: mod/install.php:389 -msgid "OpenSSL PHP module" -msgstr "" - -#: mod/install.php:390 -msgid "PDO or MySQLi PHP module" -msgstr "" - -#: mod/install.php:391 -msgid "mb_string PHP module" -msgstr "" - -#: mod/install.php:392 -msgid "XML PHP module" -msgstr "" - -#: mod/install.php:393 -msgid "iconv module" -msgstr "" - -#: mod/install.php:397 mod/install.php:399 -msgid "Apache mod_rewrite module" -msgstr "" - -#: mod/install.php:397 -msgid "" -"Error: Apache webserver mod-rewrite module is required but not installed." -msgstr "" - -#: mod/install.php:405 -msgid "Error: libCURL PHP module required but not installed." -msgstr "" - -#: mod/install.php:409 -msgid "" -"Error: GD graphics PHP module with JPEG support required but not installed." -msgstr "" - -#: mod/install.php:413 -msgid "Error: openssl PHP module required but not installed." -msgstr "" - -#: mod/install.php:417 -msgid "Error: PDO or MySQLi PHP module required but not installed." -msgstr "" - -#: mod/install.php:421 -msgid "Error: The MySQL driver for PDO is not installed." -msgstr "" - -#: mod/install.php:425 -msgid "Error: mb_string PHP module required but not installed." -msgstr "" - -#: mod/install.php:429 -msgid "Error: iconv PHP module required but not installed." -msgstr "" - -#: mod/install.php:439 -msgid "Error, XML PHP module required but not installed." -msgstr "" - -#: mod/install.php:451 -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 "" - -#: mod/install.php:452 -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 "" - -#: mod/install.php:453 -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 "" - -#: mod/install.php:454 -msgid "" -"You can alternatively skip this procedure and perform a manual installation. " -"Please see the file \"INSTALL.txt\" for instructions." -msgstr "" - -#: mod/install.php:457 -msgid ".htconfig.php is writable" -msgstr "" - -#: mod/install.php:467 -msgid "" -"Friendica uses the Smarty3 template engine to render its web views. Smarty3 " -"compiles templates to PHP to speed up rendering." -msgstr "" - -#: mod/install.php:468 -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 "" - -#: mod/install.php:469 -msgid "" -"Please ensure that the user that your web server runs as (e.g. www-data) has " -"write access to this folder." -msgstr "" - -#: mod/install.php:470 -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 "" - -#: mod/install.php:473 -msgid "view/smarty3 is writable" -msgstr "" - -#: mod/install.php:489 -msgid "" -"Url rewrite in .htaccess is not working. Check your server configuration." -msgstr "" - -#: mod/install.php:491 -msgid "Url rewrite is working" -msgstr "" - -#: mod/install.php:510 -msgid "ImageMagick PHP extension is not installed" -msgstr "" - -#: mod/install.php:512 -msgid "ImageMagick PHP extension is installed" -msgstr "" - -#: mod/install.php:514 -msgid "ImageMagick supports GIF" -msgstr "" - -#: mod/install.php:521 -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 "" - -#: mod/install.php:546 -msgid "

    What next

    " -msgstr "" - -#: mod/install.php:547 -msgid "" -"IMPORTANT: You will need to [manually] setup a scheduled task for the poller." -msgstr "" - -#: mod/search.php:28 mod/network.php:189 -msgid "Remove term" -msgstr "" - -#: mod/search.php:96 -msgid "Only logged in users are permitted to perform a search." -msgstr "" - -#: mod/search.php:120 -msgid "Too Many Requests" -msgstr "" - -#: mod/search.php:121 -msgid "Only one search per minute is permitted for not logged in users." -msgstr "" - -#: mod/search.php:221 -#, php-format -msgid "Items tagged with: %s" -msgstr "" - -#: mod/search.php:223 mod/contacts.php:827 -#, php-format -msgid "Results for: %s" -msgstr "" - -#: mod/unfollow.php:33 -msgid "Contact wasn't found or can't be unfollowed." -msgstr "" - -#: mod/unfollow.php:47 -msgid "Contact unfollowed" -msgstr "" - -#: mod/unfollow.php:73 -msgid "You aren't a friend of this contact." -msgstr "" - -#: mod/unfollow.php:79 -msgid "Unfollowing is currently not supported by your network." -msgstr "" - -#: mod/unfollow.php:100 mod/contacts.php:593 -msgid "Disconnect/Unfollow" -msgstr "" - -#: mod/admin.php:100 +#: mod/admin.php:102 msgid "Theme settings updated." msgstr "" -#: mod/admin.php:172 mod/admin.php:1175 +#: mod/admin.php:174 mod/admin.php:1177 msgid "Site" msgstr "" -#: mod/admin.php:173 mod/admin.php:1103 mod/admin.php:1620 mod/admin.php:1636 +#: mod/admin.php:175 mod/admin.php:1105 mod/admin.php:1620 mod/admin.php:1636 msgid "Users" msgstr "" -#: mod/admin.php:174 mod/admin.php:1738 mod/admin.php:1801 mod/settings.php:74 +#: mod/admin.php:176 mod/admin.php:1738 mod/admin.php:1801 mod/settings.php:77 msgid "Plugins" msgstr "" -#: mod/admin.php:175 mod/admin.php:2014 mod/admin.php:2064 +#: mod/admin.php:177 mod/admin.php:2014 mod/admin.php:2064 msgid "Themes" msgstr "" -#: mod/admin.php:176 mod/settings.php:52 +#: mod/admin.php:178 mod/settings.php:55 msgid "Additional features" msgstr "" -#: mod/admin.php:177 +#: mod/admin.php:179 msgid "DB updates" msgstr "" -#: mod/admin.php:178 mod/admin.php:585 +#: mod/admin.php:180 mod/admin.php:587 msgid "Inspect Queue" msgstr "" -#: mod/admin.php:179 mod/admin.php:299 +#: mod/admin.php:181 mod/admin.php:301 msgid "Server Blocklist" msgstr "" -#: mod/admin.php:180 mod/admin.php:551 +#: mod/admin.php:182 mod/admin.php:553 msgid "Federation Statistics" msgstr "" -#: mod/admin.php:181 mod/admin.php:376 +#: mod/admin.php:183 mod/admin.php:378 msgid "Delete Item" msgstr "" -#: mod/admin.php:195 mod/admin.php:206 mod/admin.php:2138 +#: mod/admin.php:197 mod/admin.php:208 mod/admin.php:2138 msgid "Logs" msgstr "" -#: mod/admin.php:196 mod/admin.php:2206 +#: mod/admin.php:198 mod/admin.php:2206 msgid "View Logs" msgstr "" -#: mod/admin.php:197 +#: mod/admin.php:199 msgid "probe address" msgstr "" -#: mod/admin.php:198 +#: mod/admin.php:200 msgid "check webfinger" msgstr "" -#: mod/admin.php:205 +#: mod/admin.php:207 msgid "Plugin Features" msgstr "" -#: mod/admin.php:207 +#: mod/admin.php:209 msgid "diagnostics" msgstr "" -#: mod/admin.php:208 +#: mod/admin.php:210 msgid "User registrations waiting for confirmation" msgstr "" -#: mod/admin.php:290 +#: mod/admin.php:292 msgid "The blocked domain" msgstr "" -#: mod/admin.php:291 mod/admin.php:304 +#: mod/admin.php:293 mod/admin.php:311 mod/friendica.php:117 +msgid "Reason for the block" +msgstr "" + +#: mod/admin.php:293 mod/admin.php:306 msgid "The reason why you blocked this domain." msgstr "" -#: mod/admin.php:292 +#: mod/admin.php:294 msgid "Delete domain" msgstr "" -#: mod/admin.php:292 +#: mod/admin.php:294 msgid "Check to delete this entry from the blocklist" msgstr "" -#: mod/admin.php:298 mod/admin.php:375 mod/admin.php:550 mod/admin.php:584 -#: mod/admin.php:681 mod/admin.php:1174 mod/admin.php:1619 mod/admin.php:1737 +#: mod/admin.php:300 mod/admin.php:377 mod/admin.php:552 mod/admin.php:586 +#: mod/admin.php:683 mod/admin.php:1176 mod/admin.php:1619 mod/admin.php:1737 #: mod/admin.php:1800 mod/admin.php:2013 mod/admin.php:2063 mod/admin.php:2137 #: mod/admin.php:2205 msgid "Administration" msgstr "" -#: mod/admin.php:300 +#: mod/admin.php:302 msgid "" "This page can be used to define a black list of servers from the federated " "network that are not allowed to interact with your node. For all entered " "domains you should also give a reason why you have blocked the remote server." msgstr "" -#: mod/admin.php:301 +#: mod/admin.php:303 msgid "" "The list of blocked servers will be made publically available on the /" "friendica page so that your users and people investigating communication " "problems can find the reason easily." msgstr "" -#: mod/admin.php:302 +#: mod/admin.php:304 msgid "Add new entry to block list" msgstr "" -#: mod/admin.php:303 +#: mod/admin.php:305 msgid "Server Domain" msgstr "" -#: mod/admin.php:303 +#: mod/admin.php:305 msgid "" "The domain of the new server to add to the block list. Do not include the " "protocol." msgstr "" -#: mod/admin.php:304 +#: mod/admin.php:306 msgid "Block reason" msgstr "" -#: mod/admin.php:305 +#: mod/admin.php:307 msgid "Add Entry" msgstr "" -#: mod/admin.php:306 +#: mod/admin.php:308 msgid "Save changes to the blocklist" msgstr "" -#: mod/admin.php:307 +#: mod/admin.php:309 msgid "Current Entries in the Blocklist" msgstr "" -#: mod/admin.php:310 +#: mod/admin.php:312 msgid "Delete entry from blocklist" msgstr "" -#: mod/admin.php:313 +#: mod/admin.php:315 msgid "Delete entry from blocklist?" msgstr "" -#: mod/admin.php:338 +#: mod/admin.php:340 msgid "Server added to blocklist." msgstr "" -#: mod/admin.php:354 +#: mod/admin.php:356 msgid "Site blocklist updated." msgstr "" -#: mod/admin.php:377 +#: mod/admin.php:379 msgid "Delete this Item" msgstr "" -#: mod/admin.php:378 +#: mod/admin.php:380 msgid "" "On this page you can delete an item from your node. If the item is a top " "level posting, the entire thread will be deleted." msgstr "" -#: mod/admin.php:379 +#: mod/admin.php:381 msgid "" "You need to know the GUID of the item. You can find it e.g. by looking at " "the display URL. The last part of http://example.com/display/123456 is the " "GUID, here 123456." msgstr "" -#: mod/admin.php:380 +#: mod/admin.php:382 msgid "GUID" msgstr "" -#: mod/admin.php:380 +#: mod/admin.php:382 msgid "The GUID of the item you want to delete." msgstr "" -#: mod/admin.php:417 +#: mod/admin.php:419 msgid "Item marked for deletion." msgstr "" -#: mod/admin.php:481 +#: mod/admin.php:483 msgid "unknown" msgstr "" -#: mod/admin.php:544 +#: mod/admin.php:546 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:545 +#: mod/admin.php:547 msgid "" "The Auto Discovered Contact Directory feature is not enabled, it " "will improve the data displayed here." msgstr "" -#: mod/admin.php:557 +#: mod/admin.php:559 #, php-format msgid "Currently this node is aware of %d nodes from the following platforms:" msgstr "" -#: mod/admin.php:587 +#: mod/admin.php:589 msgid "ID" msgstr "" -#: mod/admin.php:588 +#: mod/admin.php:590 msgid "Recipient Name" msgstr "" -#: mod/admin.php:589 +#: mod/admin.php:591 msgid "Recipient Profile" msgstr "" -#: mod/admin.php:591 +#: mod/admin.php:593 msgid "Created" msgstr "" -#: mod/admin.php:592 +#: mod/admin.php:594 msgid "Last Tried" msgstr "" -#: mod/admin.php:593 +#: mod/admin.php:595 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:617 +#: mod/admin.php:619 #, php-format msgid "" "Your DB still runs with MyISAM tables. You should change the engine type to " @@ -5367,690 +3402,690 @@ msgid "" "automatic conversion.
    " msgstr "" -#: mod/admin.php:624 +#: mod/admin.php:626 #, php-format msgid "" "There is a new version of Friendica available for download. Your current " "version is %1$s, upstream version is %2$s" msgstr "" -#: mod/admin.php:635 +#: mod/admin.php:637 msgid "" "The database update failed. Please run \"php include/dbstructure.php update" "\" from the command line and have a look at the errors that might appear." msgstr "" -#: mod/admin.php:641 +#: mod/admin.php:643 msgid "The worker was never executed. Please check your database structure!" msgstr "" -#: mod/admin.php:644 +#: mod/admin.php:646 #, php-format msgid "" "The last worker execution was on %s UTC. This is older than one hour. Please " "check your crontab settings." msgstr "" -#: mod/admin.php:649 mod/admin.php:1569 +#: mod/admin.php:651 mod/admin.php:1569 msgid "Normal Account" msgstr "" -#: mod/admin.php:650 mod/admin.php:1570 +#: mod/admin.php:652 mod/admin.php:1570 msgid "Automatic Follower Account" msgstr "" -#: mod/admin.php:651 mod/admin.php:1571 +#: mod/admin.php:653 mod/admin.php:1571 msgid "Public Forum Account" msgstr "" -#: mod/admin.php:652 mod/admin.php:1572 +#: mod/admin.php:654 mod/admin.php:1572 msgid "Automatic Friend Account" msgstr "" -#: mod/admin.php:653 +#: mod/admin.php:655 msgid "Blog Account" msgstr "" -#: mod/admin.php:654 +#: mod/admin.php:656 msgid "Private Forum Account" msgstr "" -#: mod/admin.php:676 +#: mod/admin.php:678 msgid "Message queues" msgstr "" -#: mod/admin.php:682 +#: mod/admin.php:684 msgid "Summary" msgstr "" -#: mod/admin.php:684 +#: mod/admin.php:686 msgid "Registered users" msgstr "" -#: mod/admin.php:686 +#: mod/admin.php:688 msgid "Pending registrations" msgstr "" -#: mod/admin.php:687 +#: mod/admin.php:689 msgid "Version" msgstr "" -#: mod/admin.php:692 +#: mod/admin.php:694 msgid "Active plugins" msgstr "" -#: mod/admin.php:722 +#: mod/admin.php:724 msgid "Can not parse base url. Must have at least ://" msgstr "" -#: mod/admin.php:1029 +#: mod/admin.php:1031 msgid "Site settings updated." msgstr "" -#: mod/admin.php:1057 mod/settings.php:948 +#: mod/admin.php:1059 mod/settings.php:953 msgid "No special theme for mobile devices" msgstr "" -#: mod/admin.php:1086 +#: mod/admin.php:1088 msgid "No community page" msgstr "" -#: mod/admin.php:1087 +#: mod/admin.php:1089 msgid "Public postings from users of this site" msgstr "" -#: mod/admin.php:1088 +#: mod/admin.php:1090 msgid "Global community page" msgstr "" -#: mod/admin.php:1093 mod/contacts.php:552 +#: mod/admin.php:1095 mod/contacts.php:553 msgid "Never" msgstr "" -#: mod/admin.php:1094 +#: mod/admin.php:1096 msgid "At post arrival" msgstr "" -#: mod/admin.php:1102 mod/contacts.php:579 +#: mod/admin.php:1104 mod/contacts.php:583 msgid "Disabled" msgstr "" -#: mod/admin.php:1104 +#: mod/admin.php:1106 msgid "Users, Global Contacts" msgstr "" -#: mod/admin.php:1105 +#: mod/admin.php:1107 msgid "Users, Global Contacts/fallback" msgstr "" -#: mod/admin.php:1109 +#: mod/admin.php:1111 msgid "One month" msgstr "" -#: mod/admin.php:1110 +#: mod/admin.php:1112 msgid "Three months" msgstr "" -#: mod/admin.php:1111 +#: mod/admin.php:1113 msgid "Half a year" msgstr "" -#: mod/admin.php:1112 +#: mod/admin.php:1114 msgid "One year" msgstr "" -#: mod/admin.php:1117 +#: mod/admin.php:1119 msgid "Multi user instance" msgstr "" -#: mod/admin.php:1140 +#: mod/admin.php:1142 msgid "Closed" msgstr "" -#: mod/admin.php:1141 +#: mod/admin.php:1143 msgid "Requires approval" msgstr "" -#: mod/admin.php:1142 +#: mod/admin.php:1144 msgid "Open" msgstr "" -#: mod/admin.php:1146 +#: mod/admin.php:1148 msgid "No SSL policy, links will track page SSL state" msgstr "" -#: mod/admin.php:1147 +#: mod/admin.php:1149 msgid "Force all links to use SSL" msgstr "" -#: mod/admin.php:1148 +#: mod/admin.php:1150 msgid "Self-signed certificate, use SSL for local links only (discouraged)" msgstr "" -#: mod/admin.php:1152 +#: mod/admin.php:1154 msgid "Don't check" msgstr "" -#: mod/admin.php:1153 +#: mod/admin.php:1155 msgid "check the stable version" msgstr "" -#: mod/admin.php:1154 +#: mod/admin.php:1156 msgid "check the development version" msgstr "" -#: mod/admin.php:1176 mod/admin.php:1802 mod/admin.php:2065 mod/admin.php:2139 -#: mod/admin.php:2292 mod/settings.php:691 mod/settings.php:802 -#: mod/settings.php:851 mod/settings.php:913 mod/settings.php:1010 -#: mod/settings.php:1258 +#: mod/admin.php:1178 mod/admin.php:1802 mod/admin.php:2065 mod/admin.php:2139 +#: mod/admin.php:2289 mod/settings.php:696 mod/settings.php:807 +#: mod/settings.php:856 mod/settings.php:918 mod/settings.php:1006 +#: mod/settings.php:1255 msgid "Save Settings" msgstr "" -#: mod/admin.php:1177 +#: mod/admin.php:1179 msgid "Republish users to directory" msgstr "" -#: mod/admin.php:1178 mod/register.php:277 +#: mod/admin.php:1180 mod/register.php:279 msgid "Registration" msgstr "" -#: mod/admin.php:1179 +#: mod/admin.php:1181 msgid "File upload" msgstr "" -#: mod/admin.php:1180 +#: mod/admin.php:1182 msgid "Policies" msgstr "" -#: mod/admin.php:1182 +#: mod/admin.php:1184 msgid "Auto Discovered Contact Directory" msgstr "" -#: mod/admin.php:1183 +#: mod/admin.php:1185 msgid "Performance" msgstr "" -#: mod/admin.php:1184 +#: mod/admin.php:1186 msgid "Worker" msgstr "" -#: mod/admin.php:1185 +#: mod/admin.php:1187 msgid "" "Relocate - WARNING: advanced function. Could make this server unreachable." msgstr "" -#: mod/admin.php:1188 +#: mod/admin.php:1190 msgid "Site name" msgstr "" -#: mod/admin.php:1189 +#: mod/admin.php:1191 msgid "Host name" msgstr "" -#: mod/admin.php:1190 +#: mod/admin.php:1192 msgid "Sender Email" msgstr "" -#: mod/admin.php:1190 +#: mod/admin.php:1192 msgid "" "The email address your server shall use to send notification emails from." msgstr "" -#: mod/admin.php:1191 +#: mod/admin.php:1193 msgid "Banner/Logo" msgstr "" -#: mod/admin.php:1192 +#: mod/admin.php:1194 msgid "Shortcut icon" msgstr "" -#: mod/admin.php:1192 +#: mod/admin.php:1194 msgid "Link to an icon that will be used for browsers." msgstr "" -#: mod/admin.php:1193 +#: mod/admin.php:1195 msgid "Touch icon" msgstr "" -#: mod/admin.php:1193 +#: mod/admin.php:1195 msgid "Link to an icon that will be used for tablets and mobiles." msgstr "" -#: mod/admin.php:1194 +#: mod/admin.php:1196 msgid "Additional Info" msgstr "" -#: mod/admin.php:1194 +#: mod/admin.php:1196 #, php-format msgid "" "For public servers: you can add additional information here that will be " "listed at %s/siteinfo." msgstr "" -#: mod/admin.php:1195 +#: mod/admin.php:1197 msgid "System language" msgstr "" -#: mod/admin.php:1196 +#: mod/admin.php:1198 msgid "System theme" msgstr "" -#: mod/admin.php:1196 +#: mod/admin.php:1198 msgid "" "Default system theme - may be over-ridden by user profiles - change theme settings" msgstr "" -#: mod/admin.php:1197 +#: mod/admin.php:1199 msgid "Mobile system theme" msgstr "" -#: mod/admin.php:1197 +#: mod/admin.php:1199 msgid "Theme for mobile devices" msgstr "" -#: mod/admin.php:1198 +#: mod/admin.php:1200 msgid "SSL link policy" msgstr "" -#: mod/admin.php:1198 +#: mod/admin.php:1200 msgid "Determines whether generated links should be forced to use SSL" msgstr "" -#: mod/admin.php:1199 +#: mod/admin.php:1201 msgid "Force SSL" msgstr "" -#: mod/admin.php:1199 +#: mod/admin.php:1201 msgid "" "Force all Non-SSL requests to SSL - Attention: on some systems it could lead " "to endless loops." msgstr "" -#: mod/admin.php:1200 +#: mod/admin.php:1202 msgid "Hide help entry from navigation menu" msgstr "" -#: mod/admin.php:1200 +#: mod/admin.php:1202 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:1201 +#: mod/admin.php:1203 msgid "Single user instance" msgstr "" -#: mod/admin.php:1201 +#: mod/admin.php:1203 msgid "Make this instance multi-user or single-user for the named user" msgstr "" -#: mod/admin.php:1202 +#: mod/admin.php:1204 msgid "Maximum image size" msgstr "" -#: mod/admin.php:1202 +#: mod/admin.php:1204 msgid "" "Maximum size in bytes of uploaded images. Default is 0, which means no " "limits." msgstr "" -#: mod/admin.php:1203 +#: mod/admin.php:1205 msgid "Maximum image length" msgstr "" -#: mod/admin.php:1203 +#: mod/admin.php:1205 msgid "" "Maximum length in pixels of the longest side of uploaded images. Default is " "-1, which means no limits." msgstr "" -#: mod/admin.php:1204 +#: mod/admin.php:1206 msgid "JPEG image quality" msgstr "" -#: mod/admin.php:1204 +#: mod/admin.php:1206 msgid "" "Uploaded JPEGS will be saved at this quality setting [0-100]. Default is " "100, which is full quality." msgstr "" -#: mod/admin.php:1206 +#: mod/admin.php:1208 msgid "Register policy" msgstr "" -#: mod/admin.php:1207 +#: mod/admin.php:1209 msgid "Maximum Daily Registrations" msgstr "" -#: mod/admin.php:1207 +#: mod/admin.php:1209 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:1208 +#: mod/admin.php:1210 msgid "Register text" msgstr "" -#: mod/admin.php:1208 +#: mod/admin.php:1210 msgid "Will be displayed prominently on the registration page." msgstr "" -#: mod/admin.php:1209 +#: mod/admin.php:1211 msgid "Accounts abandoned after x days" msgstr "" -#: mod/admin.php:1209 +#: mod/admin.php:1211 msgid "" "Will not waste system resources polling external sites for abandonded " "accounts. Enter 0 for no time limit." msgstr "" -#: mod/admin.php:1210 +#: mod/admin.php:1212 msgid "Allowed friend domains" msgstr "" -#: mod/admin.php:1210 +#: mod/admin.php:1212 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:1211 +#: mod/admin.php:1213 msgid "Allowed email domains" msgstr "" -#: mod/admin.php:1211 +#: mod/admin.php:1213 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:1212 +#: mod/admin.php:1214 msgid "Block public" msgstr "" -#: mod/admin.php:1212 +#: mod/admin.php:1214 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:1213 +#: mod/admin.php:1215 msgid "Force publish" msgstr "" -#: mod/admin.php:1213 +#: mod/admin.php:1215 msgid "" "Check to force all profiles on this site to be listed in the site directory." msgstr "" -#: mod/admin.php:1214 +#: mod/admin.php:1216 msgid "Global directory URL" msgstr "" -#: mod/admin.php:1214 +#: mod/admin.php:1216 msgid "" "URL to the global directory. If this is not set, the global directory is " "completely unavailable to the application." msgstr "" -#: mod/admin.php:1215 +#: mod/admin.php:1217 msgid "Allow threaded items" msgstr "" -#: mod/admin.php:1215 +#: mod/admin.php:1217 msgid "Allow infinite level threading for items on this site." msgstr "" -#: mod/admin.php:1216 +#: mod/admin.php:1218 msgid "Private posts by default for new users" msgstr "" -#: mod/admin.php:1216 +#: mod/admin.php:1218 msgid "" "Set default post permissions for all new members to the default privacy " "group rather than public." msgstr "" -#: mod/admin.php:1217 +#: mod/admin.php:1219 msgid "Don't include post content in email notifications" msgstr "" -#: mod/admin.php:1217 +#: mod/admin.php:1219 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:1218 +#: mod/admin.php:1220 msgid "Disallow public access to addons listed in the apps menu." msgstr "" -#: mod/admin.php:1218 +#: mod/admin.php:1220 msgid "" "Checking this box will restrict addons listed in the apps menu to members " "only." msgstr "" -#: mod/admin.php:1219 +#: mod/admin.php:1221 msgid "Don't embed private images in posts" msgstr "" -#: mod/admin.php:1219 +#: mod/admin.php:1221 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:1220 +#: mod/admin.php:1222 msgid "Allow Users to set remote_self" msgstr "" -#: mod/admin.php:1220 +#: mod/admin.php:1222 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:1221 +#: mod/admin.php:1223 msgid "Block multiple registrations" msgstr "" -#: mod/admin.php:1221 +#: mod/admin.php:1223 msgid "Disallow users to register additional accounts for use as pages." msgstr "" -#: mod/admin.php:1222 +#: mod/admin.php:1224 msgid "OpenID support" msgstr "" -#: mod/admin.php:1222 +#: mod/admin.php:1224 msgid "OpenID support for registration and logins." msgstr "" -#: mod/admin.php:1223 +#: mod/admin.php:1225 msgid "Fullname check" msgstr "" -#: mod/admin.php:1223 +#: mod/admin.php:1225 msgid "" "Force users to register with a space between firstname and lastname in Full " "name, as an antispam measure" msgstr "" -#: mod/admin.php:1224 +#: mod/admin.php:1226 msgid "Community Page Style" msgstr "" -#: mod/admin.php:1224 +#: mod/admin.php:1226 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:1225 +#: mod/admin.php:1227 msgid "Posts per user on community page" msgstr "" -#: mod/admin.php:1225 +#: mod/admin.php:1227 msgid "" "The maximum number of posts per user on the community page. (Not valid for " "'Global Community')" msgstr "" -#: mod/admin.php:1226 +#: mod/admin.php:1228 msgid "Enable OStatus support" msgstr "" -#: mod/admin.php:1226 +#: mod/admin.php:1228 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:1227 +#: mod/admin.php:1229 msgid "Only import OStatus threads from our contacts" msgstr "" -#: mod/admin.php:1227 +#: mod/admin.php:1229 msgid "" "Normally we import every content from our OStatus contacts. With this option " "we only store threads that are started by a contact that is known on our " "system." msgstr "" -#: mod/admin.php:1228 +#: mod/admin.php:1230 msgid "OStatus support can only be enabled if threading is enabled." msgstr "" -#: mod/admin.php:1230 +#: mod/admin.php:1232 msgid "" "Diaspora support can't be enabled because Friendica was installed into a sub " "directory." msgstr "" -#: mod/admin.php:1231 +#: mod/admin.php:1233 msgid "Enable Diaspora support" msgstr "" -#: mod/admin.php:1231 +#: mod/admin.php:1233 msgid "Provide built-in Diaspora network compatibility." msgstr "" -#: mod/admin.php:1232 +#: mod/admin.php:1234 msgid "Only allow Friendica contacts" msgstr "" -#: mod/admin.php:1232 +#: mod/admin.php:1234 msgid "" "All contacts must use Friendica protocols. All other built-in communication " "protocols disabled." msgstr "" -#: mod/admin.php:1233 +#: mod/admin.php:1235 msgid "Verify SSL" msgstr "" -#: mod/admin.php:1233 +#: mod/admin.php:1235 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:1234 +#: mod/admin.php:1236 msgid "Proxy user" msgstr "" -#: mod/admin.php:1235 +#: mod/admin.php:1237 msgid "Proxy URL" msgstr "" -#: mod/admin.php:1236 +#: mod/admin.php:1238 msgid "Network timeout" msgstr "" -#: mod/admin.php:1236 +#: mod/admin.php:1238 msgid "Value is in seconds. Set to 0 for unlimited (not recommended)." msgstr "" -#: mod/admin.php:1237 +#: mod/admin.php:1239 msgid "Maximum Load Average" msgstr "" -#: mod/admin.php:1237 +#: mod/admin.php:1239 msgid "" "Maximum system load before delivery and poll processes are deferred - " "default 50." msgstr "" -#: mod/admin.php:1238 +#: mod/admin.php:1240 msgid "Maximum Load Average (Frontend)" msgstr "" -#: mod/admin.php:1238 +#: mod/admin.php:1240 msgid "Maximum system load before the frontend quits service - default 50." msgstr "" -#: mod/admin.php:1239 +#: mod/admin.php:1241 msgid "Minimal Memory" msgstr "" -#: mod/admin.php:1239 +#: mod/admin.php:1241 msgid "" -"Minimal free memory in MB for the poller. Needs access to /proc/meminfo - " +"Minimal free memory in MB for the worker. Needs access to /proc/meminfo - " "default 0 (deactivated)." msgstr "" -#: mod/admin.php:1240 +#: mod/admin.php:1242 msgid "Maximum table size for optimization" msgstr "" -#: mod/admin.php:1240 +#: mod/admin.php:1242 msgid "" "Maximum table size (in MB) for the automatic optimization - default 100 MB. " "Enter -1 to disable it." msgstr "" -#: mod/admin.php:1241 +#: mod/admin.php:1243 msgid "Minimum level of fragmentation" msgstr "" -#: mod/admin.php:1241 +#: mod/admin.php:1243 msgid "" "Minimum fragmenation level to start the automatic optimization - default " "value is 30%." msgstr "" -#: mod/admin.php:1243 +#: mod/admin.php:1245 msgid "Periodical check of global contacts" msgstr "" -#: mod/admin.php:1243 +#: mod/admin.php:1245 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:1244 +#: mod/admin.php:1246 msgid "Days between requery" msgstr "" -#: mod/admin.php:1244 +#: mod/admin.php:1246 msgid "Number of days after which a server is requeried for his contacts." msgstr "" -#: mod/admin.php:1245 +#: mod/admin.php:1247 msgid "Discover contacts from other servers" msgstr "" -#: mod/admin.php:1245 +#: mod/admin.php:1247 msgid "" "Periodically query other servers for contacts. You can choose between " "'users': the users on the remote system, 'Global Contacts': active contacts " @@ -6060,32 +4095,32 @@ msgid "" "Global Contacts'." msgstr "" -#: mod/admin.php:1246 +#: mod/admin.php:1248 msgid "Timeframe for fetching global contacts" msgstr "" -#: mod/admin.php:1246 +#: mod/admin.php:1248 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:1247 +#: mod/admin.php:1249 msgid "Search the local directory" msgstr "" -#: mod/admin.php:1247 +#: mod/admin.php:1249 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:1249 +#: mod/admin.php:1251 msgid "Publish server information" msgstr "" -#: mod/admin.php:1249 +#: mod/admin.php:1251 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 " @@ -6093,143 +4128,143 @@ msgid "" "href='http://the-federation.info/'>the-federation.info for details." msgstr "" -#: mod/admin.php:1251 +#: mod/admin.php:1253 msgid "Check upstream version" msgstr "" -#: mod/admin.php:1251 +#: mod/admin.php:1253 msgid "" "Enables checking for new Friendica versions at github. If there is a new " "version, you will be informed in the admin panel overview." msgstr "" -#: mod/admin.php:1252 +#: mod/admin.php:1254 msgid "Suppress Tags" msgstr "" -#: mod/admin.php:1252 +#: mod/admin.php:1254 msgid "Suppress showing a list of hashtags at the end of the posting." msgstr "" -#: mod/admin.php:1253 +#: mod/admin.php:1255 msgid "Path to item cache" msgstr "" -#: mod/admin.php:1253 +#: mod/admin.php:1255 msgid "The item caches buffers generated bbcode and external images." msgstr "" -#: mod/admin.php:1254 +#: mod/admin.php:1256 msgid "Cache duration in seconds" msgstr "" -#: mod/admin.php:1254 +#: mod/admin.php:1256 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:1255 +#: mod/admin.php:1257 msgid "Maximum numbers of comments per post" msgstr "" -#: mod/admin.php:1255 +#: mod/admin.php:1257 msgid "How much comments should be shown for each post? Default value is 100." msgstr "" -#: mod/admin.php:1256 +#: mod/admin.php:1258 msgid "Temp path" msgstr "" -#: mod/admin.php:1256 +#: mod/admin.php:1258 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:1257 +#: mod/admin.php:1259 msgid "Base path to installation" msgstr "" -#: mod/admin.php:1257 +#: mod/admin.php:1259 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:1258 +#: mod/admin.php:1260 msgid "Disable picture proxy" msgstr "" -#: mod/admin.php:1258 +#: mod/admin.php:1260 msgid "" "The picture proxy increases performance and privacy. It shouldn't be used on " "systems with very low bandwith." msgstr "" -#: mod/admin.php:1259 +#: mod/admin.php:1261 msgid "Only search in tags" msgstr "" -#: mod/admin.php:1259 +#: mod/admin.php:1261 msgid "On large systems the text search can slow down the system extremely." msgstr "" -#: mod/admin.php:1261 +#: mod/admin.php:1263 msgid "New base url" msgstr "" -#: mod/admin.php:1261 +#: mod/admin.php:1263 msgid "" "Change base url for this server. Sends relocate message to all Friendica and " "Diaspora* contacts of all users." msgstr "" -#: mod/admin.php:1263 +#: mod/admin.php:1265 msgid "RINO Encryption" msgstr "" -#: mod/admin.php:1263 +#: mod/admin.php:1265 msgid "Encryption layer between nodes." msgstr "" -#: mod/admin.php:1265 +#: mod/admin.php:1267 msgid "Maximum number of parallel workers" msgstr "" -#: mod/admin.php:1265 +#: mod/admin.php:1267 msgid "" "On shared hosters set this to 2. On larger systems, values of 10 are great. " "Default value is 4." msgstr "" -#: mod/admin.php:1266 +#: mod/admin.php:1268 msgid "Don't use 'proc_open' with the worker" msgstr "" -#: mod/admin.php:1266 +#: mod/admin.php:1268 msgid "" "Enable this if your system doesn't allow the use of 'proc_open'. This can " "happen on shared hosters. If this is enabled you should increase the " -"frequency of poller calls in your crontab." +"frequency of worker calls in your crontab." msgstr "" -#: mod/admin.php:1267 +#: mod/admin.php:1269 msgid "Enable fastlane" msgstr "" -#: mod/admin.php:1267 +#: mod/admin.php:1269 msgid "" "When enabed, the fastlane mechanism starts an additional worker if processes " "with higher priority are blocked by processes of lower priority." msgstr "" -#: mod/admin.php:1268 +#: mod/admin.php:1270 msgid "Enable frontend worker" msgstr "" -#: mod/admin.php:1268 +#: mod/admin.php:1270 #, php-format msgid "" "When enabled the Worker process is triggered when backend access is " @@ -6239,66 +4274,66 @@ msgid "" "server." msgstr "" -#: mod/admin.php:1298 +#: mod/admin.php:1300 msgid "Update has been marked successful" msgstr "" -#: mod/admin.php:1306 +#: mod/admin.php:1308 #, php-format msgid "Database structure update %s was successfully applied." msgstr "" -#: mod/admin.php:1309 +#: mod/admin.php:1311 #, php-format msgid "Executing of database structure update %s failed with error: %s" msgstr "" -#: mod/admin.php:1323 +#: mod/admin.php:1325 #, php-format msgid "Executing %s failed with error: %s" msgstr "" -#: mod/admin.php:1326 +#: mod/admin.php:1328 #, php-format msgid "Update %s was successfully applied." msgstr "" -#: mod/admin.php:1329 +#: mod/admin.php:1331 #, php-format msgid "Update %s did not return a status. Unknown if it succeeded." msgstr "" -#: mod/admin.php:1332 +#: mod/admin.php:1334 #, php-format msgid "There was no additional update function %s that needed to be called." msgstr "" -#: mod/admin.php:1352 +#: mod/admin.php:1354 msgid "No failed updates." msgstr "" -#: mod/admin.php:1353 +#: mod/admin.php:1355 msgid "Check database structure" msgstr "" -#: mod/admin.php:1358 +#: mod/admin.php:1360 msgid "Failed Updates" msgstr "" -#: mod/admin.php:1359 +#: mod/admin.php:1361 msgid "" "This does not include updates prior to 1139, which did not return a status." msgstr "" -#: mod/admin.php:1360 +#: mod/admin.php:1362 msgid "Mark success (if update was manually applied)" msgstr "" -#: mod/admin.php:1361 +#: mod/admin.php:1363 msgid "Attempt to execute this update step automatically" msgstr "" -#: mod/admin.php:1395 +#: mod/admin.php:1397 #, php-format msgid "" "\n" @@ -6306,7 +4341,7 @@ msgid "" "\t\t\t\tthe administrator of %2$s has set up an account for you." msgstr "" -#: mod/admin.php:1398 +#: mod/admin.php:1400 #, php-format msgid "" "\n" @@ -6342,14 +4377,14 @@ msgid "" "\t\t\tThank you and welcome to %4$s." msgstr "" -#: mod/admin.php:1442 +#: mod/admin.php:1444 #, php-format msgid "%s user blocked/unblocked" msgid_plural "%s users blocked/unblocked" msgstr[0] "" msgstr[1] "" -#: mod/admin.php:1449 +#: mod/admin.php:1450 #, php-format msgid "%s user deleted" msgid_plural "%s users deleted" @@ -6371,6 +4406,11 @@ msgstr "" msgid "User '%s' blocked" msgstr "" +#: mod/admin.php:1612 mod/admin.php:1625 mod/admin.php:1638 mod/admin.php:1654 +#: mod/crepair.php:173 mod/settings.php:698 mod/settings.php:724 +msgid "Name" +msgstr "" + #: mod/admin.php:1612 mod/admin.php:1638 msgid "Register date" msgstr "" @@ -6383,7 +4423,7 @@ msgstr "" msgid "Last item" msgstr "" -#: mod/admin.php:1612 mod/settings.php:43 +#: mod/admin.php:1612 mod/settings.php:46 msgid "Account" msgstr "" @@ -6415,17 +4455,21 @@ msgstr "" msgid "Note from the user" msgstr "" +#: mod/admin.php:1628 mod/notifications.php:180 mod/notifications.php:265 +msgid "Approve" +msgstr "" + #: mod/admin.php:1629 msgid "Deny" msgstr "" -#: mod/admin.php:1631 mod/contacts.php:635 mod/contacts.php:835 -#: mod/contacts.php:1013 +#: mod/admin.php:1631 mod/contacts.php:642 mod/contacts.php:843 +#: mod/contacts.php:1021 msgid "Block" msgstr "" -#: mod/admin.php:1632 mod/contacts.php:635 mod/contacts.php:835 -#: mod/contacts.php:1013 +#: mod/admin.php:1632 mod/contacts.php:642 mod/contacts.php:843 +#: mod/contacts.php:1021 msgid "Unblock" msgstr "" @@ -6587,23 +4631,133 @@ msgid "" "'display_errors' is to enable these options, set to '0' to disable them." msgstr "" -#: mod/admin.php:2281 mod/admin.php:2282 mod/settings.php:792 +#: mod/admin.php:2278 mod/admin.php:2279 mod/settings.php:797 msgid "Off" msgstr "" -#: mod/admin.php:2281 mod/admin.php:2282 mod/settings.php:792 +#: mod/admin.php:2278 mod/admin.php:2279 mod/settings.php:797 msgid "On" msgstr "" -#: mod/admin.php:2282 +#: mod/admin.php:2279 #, php-format msgid "Lock feature %s" msgstr "" -#: mod/admin.php:2290 +#: mod/admin.php:2287 msgid "Manage Additional Features" msgstr "" +#: mod/allfriends.php:52 +msgid "No friends to display." +msgstr "" + +#: mod/api.php:80 mod/api.php:106 +msgid "Authorize application connection" +msgstr "" + +#: mod/api.php:81 +msgid "Return to your app and insert this Securty Code:" +msgstr "" + +#: mod/api.php:93 +msgid "Please login to continue." +msgstr "" + +#: mod/api.php:108 +msgid "" +"Do you want to authorize this application to access your posts and contacts, " +"and/or create new posts for you?" +msgstr "" + +#: mod/api.php:110 mod/dfrn_request.php:883 mod/follow.php:151 +#: mod/profiles.php:643 mod/profiles.php:647 mod/profiles.php:673 +#: mod/register.php:253 mod/settings.php:1155 mod/settings.php:1161 +#: mod/settings.php:1168 mod/settings.php:1172 mod/settings.php:1177 +#: mod/settings.php:1182 mod/settings.php:1187 mod/settings.php:1192 +#: mod/settings.php:1218 mod/settings.php:1219 mod/settings.php:1220 +#: mod/settings.php:1221 mod/settings.php:1222 +msgid "No" +msgstr "" + +#: mod/apps.php:10 index.php:246 +msgid "You must be logged in to use addons. " +msgstr "" + +#: mod/apps.php:15 +msgid "Applications" +msgstr "" + +#: mod/apps.php:18 +msgid "No installed applications." +msgstr "" + +#: mod/attach.php:11 +msgid "Item not available." +msgstr "" + +#: mod/attach.php:23 +msgid "Item was not found." +msgstr "" + +#: mod/cal.php:149 mod/display.php:339 mod/profile.php:162 +msgid "Access to this profile has been restricted." +msgstr "" + +#: mod/cal.php:277 mod/events.php:386 +msgid "View" +msgstr "" + +#: mod/cal.php:278 mod/events.php:388 +msgid "Previous" +msgstr "" + +#: mod/cal.php:279 mod/events.php:389 mod/install.php:203 +msgid "Next" +msgstr "" + +#: mod/cal.php:288 mod/events.php:398 +msgid "list" +msgstr "" + +#: mod/cal.php:298 +msgid "User not found" +msgstr "" + +#: mod/cal.php:314 +msgid "This calendar format is not supported" +msgstr "" + +#: mod/cal.php:316 +msgid "No exportable data found" +msgstr "" + +#: mod/cal.php:331 +msgid "calendar" +msgstr "" + +#: mod/common.php:96 +msgid "No contacts in common." +msgstr "" + +#: mod/common.php:146 mod/contacts.php:901 +msgid "Common Friends" +msgstr "" + +#: mod/community.php:23 +msgid "Not available." +msgstr "" + +#: mod/community.php:48 mod/search.php:218 +msgid "No results." +msgstr "" + +#: mod/community.php:91 +msgid "" +"This community stream shows all public posts received by this node. They may " +"not reflect the opinions of this node’s users." +msgstr "" + #: mod/contacts.php:139 #, php-format msgid "%d contact edited." @@ -6611,7 +4765,7 @@ msgid_plural "%d contacts edited." msgstr[0] "" msgstr[1] "" -#: mod/contacts.php:174 mod/contacts.php:392 +#: mod/contacts.php:174 mod/contacts.php:393 msgid "Could not access contact record." msgstr "" @@ -6623,518 +4777,1761 @@ msgstr "" msgid "Contact updated." msgstr "" -#: mod/contacts.php:413 +#: mod/contacts.php:223 mod/dfrn_request.php:596 +msgid "Failed to update contact record." +msgstr "" + +#: mod/contacts.php:414 msgid "Contact has been blocked" msgstr "" -#: mod/contacts.php:413 +#: mod/contacts.php:414 msgid "Contact has been unblocked" msgstr "" -#: mod/contacts.php:424 +#: mod/contacts.php:425 msgid "Contact has been ignored" msgstr "" -#: mod/contacts.php:424 +#: mod/contacts.php:425 msgid "Contact has been unignored" msgstr "" -#: mod/contacts.php:436 +#: mod/contacts.php:437 msgid "Contact has been archived" msgstr "" -#: mod/contacts.php:436 +#: mod/contacts.php:437 msgid "Contact has been unarchived" msgstr "" -#: mod/contacts.php:461 +#: mod/contacts.php:462 msgid "Drop contact" msgstr "" -#: mod/contacts.php:464 mod/contacts.php:831 +#: mod/contacts.php:465 mod/contacts.php:839 msgid "Do you really want to delete this contact?" msgstr "" -#: mod/contacts.php:483 +#: mod/contacts.php:484 msgid "Contact has been removed." msgstr "" -#: mod/contacts.php:520 +#: mod/contacts.php:521 #, php-format msgid "You are mutual friends with %s" msgstr "" -#: mod/contacts.php:524 +#: mod/contacts.php:525 #, php-format msgid "You are sharing with %s" msgstr "" -#: mod/contacts.php:529 +#: mod/contacts.php:530 #, php-format msgid "%s is sharing with you" msgstr "" -#: mod/contacts.php:549 +#: mod/contacts.php:550 msgid "Private communications are not available for this contact." msgstr "" -#: mod/contacts.php:556 +#: mod/contacts.php:557 msgid "(Update was successful)" msgstr "" -#: mod/contacts.php:556 +#: mod/contacts.php:557 msgid "(Update was not successful)" msgstr "" -#: mod/contacts.php:558 mod/contacts.php:994 +#: mod/contacts.php:559 mod/contacts.php:1002 msgid "Suggest friends" msgstr "" -#: mod/contacts.php:562 +#: mod/contacts.php:563 #, php-format msgid "Network type: %s" msgstr "" -#: mod/contacts.php:575 +#: mod/contacts.php:576 msgid "Communications lost with this contact!" msgstr "" -#: mod/contacts.php:578 +#: mod/contacts.php:580 msgid "Fetch further information for feeds" msgstr "" -#: mod/contacts.php:579 +#: mod/contacts.php:582 +msgid "" +"Fetch information like preview pictures, title and teaser from the feed " +"item. You can activate this if the feed doesn't contain much text. Keywords " +"are taken from the meta header in the feed item and are posted as hash tags." +msgstr "" + +#: mod/contacts.php:584 msgid "Fetch information" msgstr "" -#: mod/contacts.php:579 +#: mod/contacts.php:585 +msgid "Fetch keywords" +msgstr "" + +#: mod/contacts.php:586 msgid "Fetch information and keywords" msgstr "" -#: mod/contacts.php:603 +#: mod/contacts.php:600 mod/unfollow.php:99 +msgid "Disconnect/Unfollow" +msgstr "" + +#: mod/contacts.php:610 msgid "Contact" msgstr "" -#: mod/contacts.php:606 +#: mod/contacts.php:613 msgid "Profile Visibility" msgstr "" -#: mod/contacts.php:607 +#: mod/contacts.php:614 #, php-format msgid "" "Please choose the profile you would like to display to %s when viewing your " "profile securely." msgstr "" -#: mod/contacts.php:608 +#: mod/contacts.php:615 msgid "Contact Information / Notes" msgstr "" -#: mod/contacts.php:609 +#: mod/contacts.php:616 msgid "Their personal note" msgstr "" -#: mod/contacts.php:611 +#: mod/contacts.php:618 msgid "Edit contact notes" msgstr "" -#: mod/contacts.php:617 +#: mod/contacts.php:623 mod/contacts.php:968 mod/nogroup.php:44 +#: mod/viewcontacts.php:107 +#, php-format +msgid "Visit %s's profile [%s]" +msgstr "" + +#: mod/contacts.php:624 msgid "Block/Unblock contact" msgstr "" -#: mod/contacts.php:618 +#: mod/contacts.php:625 msgid "Ignore contact" msgstr "" -#: mod/contacts.php:619 +#: mod/contacts.php:626 msgid "Repair URL settings" msgstr "" -#: mod/contacts.php:620 +#: mod/contacts.php:627 msgid "View conversations" msgstr "" -#: mod/contacts.php:626 +#: mod/contacts.php:633 msgid "Last update:" msgstr "" -#: mod/contacts.php:628 +#: mod/contacts.php:635 msgid "Update public posts" msgstr "" -#: mod/contacts.php:630 mod/contacts.php:1004 +#: mod/contacts.php:637 mod/contacts.php:1012 msgid "Update now" msgstr "" -#: mod/contacts.php:636 mod/contacts.php:836 mod/contacts.php:1021 +#: mod/contacts.php:643 mod/contacts.php:844 mod/contacts.php:1029 msgid "Unignore" msgstr "" -#: mod/contacts.php:640 +#: mod/contacts.php:643 mod/contacts.php:844 mod/contacts.php:1029 +#: mod/notifications.php:64 mod/notifications.php:183 mod/notifications.php:267 +msgid "Ignore" +msgstr "" + +#: mod/contacts.php:647 msgid "Currently blocked" msgstr "" -#: mod/contacts.php:641 +#: mod/contacts.php:648 msgid "Currently ignored" msgstr "" -#: mod/contacts.php:642 +#: mod/contacts.php:649 msgid "Currently archived" msgstr "" -#: mod/contacts.php:643 +#: mod/contacts.php:650 +msgid "Awaiting connection acknowledge" +msgstr "" + +#: mod/contacts.php:651 mod/notifications.php:176 mod/notifications.php:255 +msgid "Hide this contact from others" +msgstr "" + +#: mod/contacts.php:651 msgid "" "Replies/likes to your public posts may still be visible" msgstr "" -#: mod/contacts.php:644 +#: mod/contacts.php:652 msgid "Notification for new posts" msgstr "" -#: mod/contacts.php:644 +#: mod/contacts.php:652 msgid "Send a notification of every new post of this contact" msgstr "" -#: mod/contacts.php:647 +#: mod/contacts.php:655 msgid "Blacklisted keywords" msgstr "" -#: mod/contacts.php:647 +#: mod/contacts.php:655 msgid "" "Comma separated list of keywords that should not be converted to hashtags, " "when \"Fetch information and keywords\" is selected" msgstr "" -#: mod/contacts.php:665 +#: mod/contacts.php:662 mod/follow.php:167 mod/notifications.php:259 +#: mod/unfollow.php:121 +msgid "Profile URL" +msgstr "" + +#: mod/contacts.php:673 msgid "Actions" msgstr "" -#: mod/contacts.php:668 +#: mod/contacts.php:676 msgid "Contact Settings" msgstr "" -#: mod/contacts.php:714 +#: mod/contacts.php:722 msgid "Suggestions" msgstr "" -#: mod/contacts.php:717 +#: mod/contacts.php:725 msgid "Suggest potential friends" msgstr "" -#: mod/contacts.php:725 -msgid "Show all contacts" -msgstr "" - -#: mod/contacts.php:730 -msgid "Unblocked" +#: mod/contacts.php:730 mod/group.php:214 +msgid "All Contacts" msgstr "" #: mod/contacts.php:733 +msgid "Show all contacts" +msgstr "" + +#: mod/contacts.php:738 +msgid "Unblocked" +msgstr "" + +#: mod/contacts.php:741 msgid "Only show unblocked contacts" msgstr "" -#: mod/contacts.php:739 +#: mod/contacts.php:747 msgid "Blocked" msgstr "" -#: mod/contacts.php:742 +#: mod/contacts.php:750 msgid "Only show blocked contacts" msgstr "" -#: mod/contacts.php:748 +#: mod/contacts.php:756 msgid "Ignored" msgstr "" -#: mod/contacts.php:751 +#: mod/contacts.php:759 msgid "Only show ignored contacts" msgstr "" -#: mod/contacts.php:757 +#: mod/contacts.php:765 msgid "Archived" msgstr "" -#: mod/contacts.php:760 +#: mod/contacts.php:768 msgid "Only show archived contacts" msgstr "" -#: mod/contacts.php:766 +#: mod/contacts.php:774 msgid "Hidden" msgstr "" -#: mod/contacts.php:769 +#: mod/contacts.php:777 msgid "Only show hidden contacts" msgstr "" -#: mod/contacts.php:826 +#: mod/contacts.php:834 msgid "Search your contacts" msgstr "" -#: mod/contacts.php:834 mod/settings.php:160 mod/settings.php:717 +#: mod/contacts.php:835 mod/search.php:226 +#, php-format +msgid "Results for: %s" +msgstr "" + +#: mod/contacts.php:842 mod/settings.php:163 mod/settings.php:722 msgid "Update" msgstr "" -#: mod/contacts.php:837 mod/contacts.php:1029 +#: mod/contacts.php:845 mod/contacts.php:1037 msgid "Archive" msgstr "" -#: mod/contacts.php:837 mod/contacts.php:1029 +#: mod/contacts.php:845 mod/contacts.php:1037 msgid "Unarchive" msgstr "" -#: mod/contacts.php:840 +#: mod/contacts.php:848 msgid "Batch Actions" msgstr "" -#: mod/contacts.php:886 +#: mod/contacts.php:894 msgid "View all contacts" msgstr "" -#: mod/contacts.php:896 +#: mod/contacts.php:904 msgid "View all common friends" msgstr "" -#: mod/contacts.php:903 +#: mod/contacts.php:911 msgid "Advanced Contact Settings" msgstr "" -#: mod/contacts.php:937 +#: mod/contacts.php:945 msgid "Mutual Friendship" msgstr "" -#: mod/contacts.php:941 +#: mod/contacts.php:949 msgid "is a fan of yours" msgstr "" -#: mod/contacts.php:945 +#: mod/contacts.php:953 msgid "you are a fan of" msgstr "" -#: mod/contacts.php:1015 -msgid "Toggle Blocked status" +#: mod/contacts.php:969 mod/nogroup.php:45 +msgid "Edit contact" msgstr "" #: mod/contacts.php:1023 -msgid "Toggle Ignored status" +msgid "Toggle Blocked status" msgstr "" #: mod/contacts.php:1031 -msgid "Toggle Archive status" +msgid "Toggle Ignored status" msgstr "" #: mod/contacts.php:1039 +msgid "Toggle Archive status" +msgstr "" + +#: mod/contacts.php:1047 msgid "Delete contact" msgstr "" -#: mod/dfrn_confirm.php:74 mod/profiles.php:25 mod/profiles.php:135 -#: mod/profiles.php:182 mod/profiles.php:618 +#: mod/crepair.php:95 +msgid "Contact settings applied." +msgstr "" + +#: mod/crepair.php:97 +msgid "Contact update failed." +msgstr "" + +#: mod/crepair.php:122 mod/dfrn_confirm.php:134 mod/fsuggest.php:24 +#: mod/fsuggest.php:98 +msgid "Contact not found." +msgstr "" + +#: mod/crepair.php:128 +msgid "" +"WARNING: This is highly advanced and if you enter incorrect " +"information your communications with this contact may stop working." +msgstr "" + +#: mod/crepair.php:129 +msgid "" +"Please use your browser 'Back' button now if you are " +"uncertain what to do on this page." +msgstr "" + +#: mod/crepair.php:142 mod/crepair.php:144 +msgid "No mirroring" +msgstr "" + +#: mod/crepair.php:142 +msgid "Mirror as forwarded posting" +msgstr "" + +#: mod/crepair.php:142 mod/crepair.php:144 +msgid "Mirror as my own posting" +msgstr "" + +#: mod/crepair.php:158 +msgid "Return to contact editor" +msgstr "" + +#: mod/crepair.php:160 +msgid "Refetch contact data" +msgstr "" + +#: mod/crepair.php:164 +msgid "Remote Self" +msgstr "" + +#: mod/crepair.php:167 +msgid "Mirror postings from this contact" +msgstr "" + +#: mod/crepair.php:169 +msgid "" +"Mark this contact as remote_self, this will cause friendica to repost new " +"entries from this contact." +msgstr "" + +#: mod/crepair.php:174 +msgid "Account Nickname" +msgstr "" + +#: mod/crepair.php:175 +msgid "@Tagname - overrides Name/Nickname" +msgstr "" + +#: mod/crepair.php:176 +msgid "Account URL" +msgstr "" + +#: mod/crepair.php:177 +msgid "Friend Request URL" +msgstr "" + +#: mod/crepair.php:178 +msgid "Friend Confirm URL" +msgstr "" + +#: mod/crepair.php:179 +msgid "Notification Endpoint URL" +msgstr "" + +#: mod/crepair.php:180 +msgid "Poll/Feed URL" +msgstr "" + +#: mod/crepair.php:181 +msgid "New photo from this URL" +msgstr "" + +#: mod/delegate.php:102 +msgid "No potential page delegates located." +msgstr "" + +#: mod/delegate.php:133 +msgid "" +"Delegates are able to manage all aspects of this account/page except for " +"basic account settings. Please do not delegate your personal account to " +"anybody that you do not trust completely." +msgstr "" + +#: mod/delegate.php:134 +msgid "Existing Page Managers" +msgstr "" + +#: mod/delegate.php:136 +msgid "Existing Page Delegates" +msgstr "" + +#: mod/delegate.php:138 +msgid "Potential Delegates" +msgstr "" + +#: mod/delegate.php:140 mod/tagrm.php:99 +msgid "Remove" +msgstr "" + +#: mod/delegate.php:141 +msgid "Add" +msgstr "" + +#: mod/delegate.php:142 +msgid "No entries." +msgstr "" + +#: mod/dfrn_confirm.php:78 mod/profiles.php:29 mod/profiles.php:139 +#: mod/profiles.php:186 mod/profiles.php:622 msgid "Profile not found." msgstr "" -#: mod/dfrn_confirm.php:131 +#: mod/dfrn_confirm.php:135 msgid "" "This may occasionally happen if contact was requested by both persons and it " "has already been approved." msgstr "" -#: mod/dfrn_confirm.php:248 +#: mod/dfrn_confirm.php:252 msgid "Response from remote site was not understood." msgstr "" -#: mod/dfrn_confirm.php:257 mod/dfrn_confirm.php:262 +#: mod/dfrn_confirm.php:261 mod/dfrn_confirm.php:266 msgid "Unexpected response from remote site: " msgstr "" -#: mod/dfrn_confirm.php:271 +#: mod/dfrn_confirm.php:275 msgid "Confirmation completed successfully." msgstr "" -#: mod/dfrn_confirm.php:273 mod/dfrn_confirm.php:287 mod/dfrn_confirm.php:294 +#: mod/dfrn_confirm.php:277 mod/dfrn_confirm.php:291 mod/dfrn_confirm.php:298 msgid "Remote site reported: " msgstr "" -#: mod/dfrn_confirm.php:285 +#: mod/dfrn_confirm.php:289 msgid "Temporary failure. Please wait and try again." msgstr "" -#: mod/dfrn_confirm.php:292 +#: mod/dfrn_confirm.php:296 msgid "Introduction failed or was revoked." msgstr "" -#: mod/dfrn_confirm.php:421 +#: mod/dfrn_confirm.php:425 msgid "Unable to set contact photo." msgstr "" -#: mod/dfrn_confirm.php:562 +#: mod/dfrn_confirm.php:565 #, php-format msgid "No user record found for '%s' " msgstr "" -#: mod/dfrn_confirm.php:572 +#: mod/dfrn_confirm.php:575 msgid "Our site encryption key is apparently messed up." msgstr "" -#: mod/dfrn_confirm.php:583 +#: mod/dfrn_confirm.php:586 msgid "Empty site URL was provided or URL could not be decrypted by us." msgstr "" -#: mod/dfrn_confirm.php:605 +#: mod/dfrn_confirm.php:608 msgid "Contact record was not found for you on our site." msgstr "" -#: mod/dfrn_confirm.php:619 +#: mod/dfrn_confirm.php:622 #, php-format msgid "Site public key not available in contact record for URL %s." msgstr "" -#: mod/dfrn_confirm.php:639 +#: mod/dfrn_confirm.php:642 msgid "" "The ID provided by your system is a duplicate on our system. It should work " "if you try again." msgstr "" -#: mod/dfrn_confirm.php:650 +#: mod/dfrn_confirm.php:653 msgid "Unable to set your contact credentials on our system." msgstr "" -#: mod/dfrn_confirm.php:712 +#: mod/dfrn_confirm.php:715 msgid "Unable to update your contact profile details on our system" msgstr "" -#: mod/dfrn_confirm.php:784 +#: mod/dfrn_confirm.php:787 #, php-format msgid "%1$s has joined %2$s" msgstr "" -#: mod/dirfind.php:41 +#: mod/dfrn_poll.php:118 mod/dfrn_poll.php:554 +#, php-format +msgid "%1$s welcomes %2$s" +msgstr "" + +#: mod/dfrn_request.php:106 +msgid "This introduction has already been accepted." +msgstr "" + +#: mod/dfrn_request.php:129 mod/dfrn_request.php:531 +msgid "Profile location is not valid or does not contain profile information." +msgstr "" + +#: mod/dfrn_request.php:134 mod/dfrn_request.php:536 +msgid "Warning: profile location has no identifiable owner name." +msgstr "" + +#: mod/dfrn_request.php:137 mod/dfrn_request.php:539 +msgid "Warning: profile location has no profile photo." +msgstr "" + +#: mod/dfrn_request.php:141 mod/dfrn_request.php:543 +#, 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] "" +msgstr[1] "" + +#: mod/dfrn_request.php:185 +msgid "Introduction complete." +msgstr "" + +#: mod/dfrn_request.php:230 +msgid "Unrecoverable protocol error." +msgstr "" + +#: mod/dfrn_request.php:258 +msgid "Profile unavailable." +msgstr "" + +#: mod/dfrn_request.php:285 +#, php-format +msgid "%s has received too many connection requests today." +msgstr "" + +#: mod/dfrn_request.php:286 +msgid "Spam protection measures have been invoked." +msgstr "" + +#: mod/dfrn_request.php:287 +msgid "Friends are advised to please try again in 24 hours." +msgstr "" + +#: mod/dfrn_request.php:349 +msgid "Invalid locator" +msgstr "" + +#: mod/dfrn_request.php:358 +msgid "Invalid email address." +msgstr "" + +#: mod/dfrn_request.php:383 +msgid "This account has not been configured for email. Request failed." +msgstr "" + +#: mod/dfrn_request.php:486 +msgid "You have already introduced yourself here." +msgstr "" + +#: mod/dfrn_request.php:490 +#, php-format +msgid "Apparently you are already friends with %s." +msgstr "" + +#: mod/dfrn_request.php:511 +msgid "Invalid profile URL." +msgstr "" + +#: mod/dfrn_request.php:617 +msgid "Your introduction has been sent." +msgstr "" + +#: mod/dfrn_request.php:659 +msgid "" +"Remote subscription can't be done for your network. Please subscribe " +"directly on your system." +msgstr "" + +#: mod/dfrn_request.php:680 +msgid "Please login to confirm introduction." +msgstr "" + +#: mod/dfrn_request.php:690 +msgid "" +"Incorrect identity currently logged in. Please login to this profile." +msgstr "" + +#: mod/dfrn_request.php:704 mod/dfrn_request.php:721 +msgid "Confirm" +msgstr "" + +#: mod/dfrn_request.php:716 +msgid "Hide this contact" +msgstr "" + +#: mod/dfrn_request.php:719 +#, php-format +msgid "Welcome home %s." +msgstr "" + +#: mod/dfrn_request.php:720 +#, php-format +msgid "Please confirm your introduction/connection request to %s." +msgstr "" + +#: mod/dfrn_request.php:851 +msgid "" +"Please enter your 'Identity Address' from one of the following supported " +"communications networks:" +msgstr "" + +#: mod/dfrn_request.php:875 +#, php-format +msgid "" +"If you are not yet a member of the free social web, follow this link to find a public Friendica site and join us today." +msgstr "" + +#: mod/dfrn_request.php:880 +msgid "Friend/Connection Request" +msgstr "" + +#: mod/dfrn_request.php:881 +msgid "" +"Examples: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, " +"testuser@identi.ca" +msgstr "" + +#: mod/dfrn_request.php:882 mod/follow.php:150 +msgid "Please answer the following:" +msgstr "" + +#: mod/dfrn_request.php:883 mod/follow.php:151 +#, php-format +msgid "Does %s know you?" +msgstr "" + +#: mod/dfrn_request.php:887 mod/follow.php:152 +msgid "Add a personal note:" +msgstr "" + +#: mod/dfrn_request.php:890 +msgid "StatusNet/Federated Social Web" +msgstr "" + +#: mod/dfrn_request.php:892 +#, php-format +msgid "" +" - please do not use this form. Instead, enter %s into your Diaspora search " +"bar." +msgstr "" + +#: mod/dfrn_request.php:893 mod/follow.php:158 mod/unfollow.php:112 +msgid "Your Identity Address:" +msgstr "" + +#: mod/dfrn_request.php:896 mod/follow.php:64 mod/unfollow.php:64 +msgid "Submit Request" +msgstr "" + +#: mod/directory.php:191 view/theme/vier/theme.php:197 +msgid "Global Directory" +msgstr "" + +#: mod/directory.php:193 +msgid "Find on this site" +msgstr "" + +#: mod/directory.php:195 +msgid "Results for:" +msgstr "" + +#: mod/directory.php:197 +msgid "Site Directory" +msgstr "" + +#: mod/directory.php:204 +msgid "No entries (some entries may be hidden)." +msgstr "" + +#: mod/dirfind.php:45 #, php-format msgid "People Search - %s" msgstr "" -#: mod/dirfind.php:52 +#: mod/dirfind.php:56 #, php-format msgid "Forum Search - %s" msgstr "" +#: mod/dirfind.php:253 mod/match.php:122 +msgid "No matches" +msgstr "" + #: mod/display.php:482 msgid "Item has been removed." msgstr "" -#: mod/events.php:98 mod/events.php:100 +#: mod/editpost.php:22 mod/editpost.php:32 +msgid "Item not found" +msgstr "" + +#: mod/editpost.php:37 +msgid "Edit post" +msgstr "" + +#: mod/events.php:100 mod/events.php:102 msgid "Event can not end before it has started." msgstr "" -#: mod/events.php:107 mod/events.php:109 +#: mod/events.php:109 mod/events.php:111 msgid "Event title and start time are required." msgstr "" -#: mod/events.php:385 +#: mod/events.php:387 msgid "Create New Event" msgstr "" -#: mod/events.php:505 +#: mod/events.php:507 msgid "Event details" msgstr "" -#: mod/events.php:506 +#: mod/events.php:508 msgid "Starting date and Title are required." msgstr "" -#: mod/events.php:507 mod/events.php:508 +#: mod/events.php:509 mod/events.php:510 msgid "Event Starts:" msgstr "" -#: mod/events.php:507 mod/events.php:519 mod/profiles.php:708 +#: mod/events.php:509 mod/events.php:521 mod/profiles.php:712 msgid "Required" msgstr "" -#: mod/events.php:509 mod/events.php:525 +#: mod/events.php:511 mod/events.php:527 msgid "Finish date/time is not known or not relevant" msgstr "" -#: mod/events.php:511 mod/events.php:512 +#: mod/events.php:513 mod/events.php:514 msgid "Event Finishes:" msgstr "" -#: mod/events.php:513 mod/events.php:526 +#: mod/events.php:515 mod/events.php:528 msgid "Adjust for viewer timezone" msgstr "" -#: mod/events.php:515 +#: mod/events.php:517 msgid "Description:" msgstr "" -#: mod/events.php:519 mod/events.php:521 +#: mod/events.php:521 mod/events.php:523 msgid "Title:" msgstr "" -#: mod/events.php:522 mod/events.php:523 +#: mod/events.php:524 mod/events.php:525 msgid "Share this event" msgstr "" -#: mod/events.php:552 +#: mod/events.php:554 msgid "Failed to remove event" msgstr "" -#: mod/events.php:554 +#: mod/events.php:556 msgid "Event removed" msgstr "" -#: mod/fsuggest.php:66 +#: mod/fbrowser.php:125 +msgid "Files" +msgstr "" + +#: mod/filer.php:32 +msgid "- select -" +msgstr "" + +#: mod/follow.php:43 +msgid "Contact added" +msgstr "" + +#: mod/follow.php:75 +msgid "You already added this contact." +msgstr "" + +#: mod/follow.php:84 +msgid "Diaspora support isn't enabled. Contact can't be added." +msgstr "" + +#: mod/follow.php:91 +msgid "OStatus support is disabled. Contact can't be added." +msgstr "" + +#: mod/follow.php:98 +msgid "The network type couldn't be detected. Contact can't be added." +msgstr "" + +#: mod/friendica.php:71 +msgid "This is Friendica, version" +msgstr "" + +#: mod/friendica.php:72 +msgid "running at web location" +msgstr "" + +#: mod/friendica.php:76 +msgid "" +"Please visit Friendi.ca to learn more " +"about the Friendica project." +msgstr "" + +#: mod/friendica.php:80 +msgid "Bug reports and issues: please visit" +msgstr "" + +#: mod/friendica.php:80 +msgid "the bugtracker at github" +msgstr "" + +#: mod/friendica.php:83 +msgid "" +"Suggestions, praise, donations, etc. - please email \"Info\" at Friendica - " +"dot com" +msgstr "" + +#: mod/friendica.php:97 +msgid "Installed plugins/addons/apps:" +msgstr "" + +#: mod/friendica.php:111 +msgid "No installed plugins/addons/apps" +msgstr "" + +#: mod/friendica.php:116 +msgid "On this server the following remote servers are blocked." +msgstr "" + +#: mod/fsuggest.php:67 msgid "Friend suggestion sent." msgstr "" -#: mod/fsuggest.php:100 +#: mod/fsuggest.php:103 msgid "Suggest Friends" msgstr "" -#: mod/fsuggest.php:102 +#: mod/fsuggest.php:105 #, php-format msgid "Suggest a friend for %s" msgstr "" -#: mod/item.php:120 +#: mod/group.php:34 +msgid "Group created." +msgstr "" + +#: mod/group.php:40 +msgid "Could not create group." +msgstr "" + +#: mod/group.php:54 mod/group.php:156 +msgid "Group not found." +msgstr "" + +#: mod/group.php:68 +msgid "Group name changed." +msgstr "" + +#: mod/group.php:81 mod/profperm.php:25 index.php:398 +msgid "Permission denied" +msgstr "" + +#: mod/group.php:95 +msgid "Save Group" +msgstr "" + +#: mod/group.php:100 +msgid "Create a group of contacts/friends." +msgstr "" + +#: mod/group.php:125 +msgid "Group removed." +msgstr "" + +#: mod/group.php:127 +msgid "Unable to remove group." +msgstr "" + +#: mod/group.php:191 +msgid "Delete Group" +msgstr "" + +#: mod/group.php:197 +msgid "Group Editor" +msgstr "" + +#: mod/group.php:202 +msgid "Edit Group Name" +msgstr "" + +#: mod/group.php:212 +msgid "Members" +msgstr "" + +#: mod/group.php:215 mod/network.php:661 +msgid "Group is empty" +msgstr "" + +#: mod/group.php:228 +msgid "Remove Contact" +msgstr "" + +#: mod/group.php:252 +msgid "Add Contact" +msgstr "" + +#: mod/group.php:264 mod/profperm.php:110 +msgid "Click on a contact to add or remove." +msgstr "" + +#: mod/hcard.php:15 +msgid "No profile" +msgstr "" + +#: mod/home.php:43 +#, php-format +msgid "Welcome to %s" +msgstr "" + +#: mod/install.php:108 +msgid "Friendica Communications Server - Setup" +msgstr "" + +#: mod/install.php:114 +msgid "Could not connect to database." +msgstr "" + +#: mod/install.php:118 +msgid "Could not create table." +msgstr "" + +#: mod/install.php:124 +msgid "Your Friendica site database has been installed." +msgstr "" + +#: mod/install.php:129 +msgid "" +"You may need to import the file \"database.sql\" manually using phpmyadmin " +"or mysql." +msgstr "" + +#: mod/install.php:130 mod/install.php:202 mod/install.php:549 +msgid "Please see the file \"INSTALL.txt\"." +msgstr "" + +#: mod/install.php:142 +msgid "Database already in use." +msgstr "" + +#: mod/install.php:199 +msgid "System check" +msgstr "" + +#: mod/install.php:204 +msgid "Check again" +msgstr "" + +#: mod/install.php:223 +msgid "Database connection" +msgstr "" + +#: mod/install.php:224 +msgid "" +"In order to install Friendica we need to know how to connect to your " +"database." +msgstr "" + +#: mod/install.php:225 +msgid "" +"Please contact your hosting provider or site administrator if you have " +"questions about these settings." +msgstr "" + +#: mod/install.php:226 +msgid "" +"The database you specify below should already exist. If it does not, please " +"create it before continuing." +msgstr "" + +#: mod/install.php:230 +msgid "Database Server Name" +msgstr "" + +#: mod/install.php:231 +msgid "Database Login Name" +msgstr "" + +#: mod/install.php:232 +msgid "Database Login Password" +msgstr "" + +#: mod/install.php:232 +msgid "For security reasons the password must not be empty" +msgstr "" + +#: mod/install.php:233 +msgid "Database Name" +msgstr "" + +#: mod/install.php:234 mod/install.php:275 +msgid "Site administrator email address" +msgstr "" + +#: mod/install.php:234 mod/install.php:275 +msgid "" +"Your account email address must match this in order to use the web admin " +"panel." +msgstr "" + +#: mod/install.php:238 mod/install.php:278 +msgid "Please select a default timezone for your website" +msgstr "" + +#: mod/install.php:265 +msgid "Site settings" +msgstr "" + +#: mod/install.php:279 +msgid "System Language:" +msgstr "" + +#: mod/install.php:279 +msgid "" +"Set the default language for your Friendica installation interface and to " +"send emails." +msgstr "" + +#: mod/install.php:319 +msgid "Could not find a command line version of PHP in the web server PATH." +msgstr "" + +#: mod/install.php:320 +msgid "" +"If you don't have a command line version of PHP installed on server, you " +"will not be able to run the background processing. See 'Setup the worker'" +msgstr "" + +#: mod/install.php:324 +msgid "PHP executable path" +msgstr "" + +#: mod/install.php:324 +msgid "" +"Enter full path to php executable. You can leave this blank to continue the " +"installation." +msgstr "" + +#: mod/install.php:329 +msgid "Command line PHP" +msgstr "" + +#: mod/install.php:338 +msgid "PHP executable is not the php cli binary (could be cgi-fgci version)" +msgstr "" + +#: mod/install.php:339 +msgid "Found PHP version: " +msgstr "" + +#: mod/install.php:341 +msgid "PHP cli binary" +msgstr "" + +#: mod/install.php:352 +msgid "" +"The command line version of PHP on your system does not have " +"\"register_argc_argv\" enabled." +msgstr "" + +#: mod/install.php:353 +msgid "This is required for message delivery to work." +msgstr "" + +#: mod/install.php:355 +msgid "PHP register_argc_argv" +msgstr "" + +#: mod/install.php:378 +msgid "" +"Error: the \"openssl_pkey_new\" function on this system is not able to " +"generate encryption keys" +msgstr "" + +#: mod/install.php:379 +msgid "" +"If running under Windows, please see \"http://www.php.net/manual/en/openssl." +"installation.php\"." +msgstr "" + +#: mod/install.php:381 +msgid "Generate encryption keys" +msgstr "" + +#: mod/install.php:388 +msgid "libCurl PHP module" +msgstr "" + +#: mod/install.php:389 +msgid "GD graphics PHP module" +msgstr "" + +#: mod/install.php:390 +msgid "OpenSSL PHP module" +msgstr "" + +#: mod/install.php:391 +msgid "PDO or MySQLi PHP module" +msgstr "" + +#: mod/install.php:392 +msgid "mb_string PHP module" +msgstr "" + +#: mod/install.php:393 +msgid "XML PHP module" +msgstr "" + +#: mod/install.php:394 +msgid "iconv module" +msgstr "" + +#: mod/install.php:398 mod/install.php:400 +msgid "Apache mod_rewrite module" +msgstr "" + +#: mod/install.php:398 +msgid "" +"Error: Apache webserver mod-rewrite module is required but not installed." +msgstr "" + +#: mod/install.php:406 +msgid "Error: libCURL PHP module required but not installed." +msgstr "" + +#: mod/install.php:410 +msgid "" +"Error: GD graphics PHP module with JPEG support required but not installed." +msgstr "" + +#: mod/install.php:414 +msgid "Error: openssl PHP module required but not installed." +msgstr "" + +#: mod/install.php:418 +msgid "Error: PDO or MySQLi PHP module required but not installed." +msgstr "" + +#: mod/install.php:422 +msgid "Error: The MySQL driver for PDO is not installed." +msgstr "" + +#: mod/install.php:426 +msgid "Error: mb_string PHP module required but not installed." +msgstr "" + +#: mod/install.php:430 +msgid "Error: iconv PHP module required but not installed." +msgstr "" + +#: mod/install.php:440 +msgid "Error, XML PHP module required but not installed." +msgstr "" + +#: mod/install.php:452 +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 "" + +#: mod/install.php:453 +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 "" + +#: mod/install.php:454 +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 "" + +#: mod/install.php:455 +msgid "" +"You can alternatively skip this procedure and perform a manual installation. " +"Please see the file \"INSTALL.txt\" for instructions." +msgstr "" + +#: mod/install.php:458 +msgid ".htconfig.php is writable" +msgstr "" + +#: mod/install.php:468 +msgid "" +"Friendica uses the Smarty3 template engine to render its web views. Smarty3 " +"compiles templates to PHP to speed up rendering." +msgstr "" + +#: mod/install.php:469 +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 "" + +#: mod/install.php:470 +msgid "" +"Please ensure that the user that your web server runs as (e.g. www-data) has " +"write access to this folder." +msgstr "" + +#: mod/install.php:471 +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 "" + +#: mod/install.php:474 +msgid "view/smarty3 is writable" +msgstr "" + +#: mod/install.php:490 +msgid "" +"Url rewrite in .htaccess is not working. Check your server configuration." +msgstr "" + +#: mod/install.php:492 +msgid "Url rewrite is working" +msgstr "" + +#: mod/install.php:511 +msgid "ImageMagick PHP extension is not installed" +msgstr "" + +#: mod/install.php:513 +msgid "ImageMagick PHP extension is installed" +msgstr "" + +#: mod/install.php:515 +msgid "ImageMagick supports GIF" +msgstr "" + +#: mod/install.php:522 +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 "" + +#: mod/install.php:547 +msgid "

    What next

    " +msgstr "" + +#: mod/install.php:548 +msgid "" +"IMPORTANT: You will need to [manually] setup a scheduled task for the worker." +msgstr "" + +#: mod/invite.php:33 +msgid "Total invitation limit exceeded." +msgstr "" + +#: mod/invite.php:56 +#, php-format +msgid "%s : Not a valid email address." +msgstr "" + +#: mod/invite.php:81 +msgid "Please join us on Friendica" +msgstr "" + +#: mod/invite.php:92 +msgid "Invitation limit exceeded. Please contact your site administrator." +msgstr "" + +#: mod/invite.php:96 +#, php-format +msgid "%s : Message delivery failed." +msgstr "" + +#: mod/invite.php:100 +#, php-format +msgid "%d message sent." +msgid_plural "%d messages sent." +msgstr[0] "" +msgstr[1] "" + +#: mod/invite.php:119 +msgid "You have no more invitations available" +msgstr "" + +#: mod/invite.php:127 +#, php-format +msgid "" +"Visit %s for a list of public sites that you can join. Friendica members on " +"other sites can all connect with each other, as well as with members of many " +"other social networks." +msgstr "" + +#: mod/invite.php:129 +#, php-format +msgid "" +"To accept this invitation, please visit and register at %s or any other " +"public Friendica website." +msgstr "" + +#: mod/invite.php:130 +#, php-format +msgid "" +"Friendica sites all inter-connect to create a huge privacy-enhanced social " +"web that is owned and controlled by its members. They can also connect with " +"many traditional social networks. See %s for a list of alternate Friendica " +"sites you can join." +msgstr "" + +#: mod/invite.php:134 +msgid "" +"Our apologies. This system is not currently configured to connect with other " +"public sites or invite members." +msgstr "" + +#: mod/invite.php:137 +#, php-format +msgid "To accept this invitation, please visit and register at %s." +msgstr "" + +#: mod/invite.php:138 +msgid "" +"Friendica sites all inter-connect to create a huge privacy-enhanced social " +"web that is owned and controlled by its members. They can also connect with " +"many traditional social networks." +msgstr "" + +#: mod/invite.php:144 +msgid "Send invitations" +msgstr "" + +#: mod/invite.php:145 +msgid "Enter email addresses, one per line:" +msgstr "" + +#: mod/invite.php:146 mod/message.php:334 mod/message.php:506 +#: mod/wallmessage.php:139 +msgid "Your message:" +msgstr "" + +#: mod/invite.php:147 +msgid "" +"You are cordially invited to join me and other close friends on Friendica - " +"and help us to create a better social web." +msgstr "" + +#: mod/invite.php:149 +msgid "You will need to supply this invitation code: $invite_code" +msgstr "" + +#: mod/invite.php:149 +msgid "" +"Once you have registered, please connect with me via my profile page at:" +msgstr "" + +#: mod/invite.php:151 +msgid "" +"For more information about the Friendica project and why we feel it is " +"important, please visit http://friendi.ca" +msgstr "" + +#: mod/item.php:124 msgid "Unable to locate original post." msgstr "" -#: mod/item.php:347 +#: mod/item.php:351 msgid "Empty post discarded." msgstr "" -#: mod/item.php:931 +#: mod/item.php:937 msgid "System error. Post not saved." msgstr "" -#: mod/item.php:1022 +#: mod/item.php:1028 #, php-format msgid "" "This message was sent to you by %s, a member of the Friendica social network." msgstr "" -#: mod/item.php:1024 +#: mod/item.php:1030 #, php-format msgid "You may visit them online at %s" msgstr "" -#: mod/item.php:1025 +#: mod/item.php:1031 msgid "" "Please contact the sender by replying to this post if you do not wish to " "receive these messages." msgstr "" -#: mod/item.php:1029 +#: mod/item.php:1035 #, php-format msgid "%s posted an update." msgstr "" -#: mod/mood.php:137 +#: mod/lockview.php:34 mod/lockview.php:42 +msgid "Remote privacy information not available." +msgstr "" + +#: mod/lockview.php:51 +msgid "Visible to:" +msgstr "" + +#: mod/lostpass.php:23 +msgid "No valid account found." +msgstr "" + +#: mod/lostpass.php:39 +msgid "Password reset request issued. Check your email." +msgstr "" + +#: mod/lostpass.php:45 +#, php-format +msgid "" +"\n" +"\t\tDear %1$s,\n" +"\t\t\tA request was recently received at \"%2$s\" to reset your account\n" +"\t\tpassword. In order to confirm this request, please select the " +"verification link\n" +"\t\tbelow or paste it into your web browser address bar.\n" +"\n" +"\t\tIf you did NOT request this change, please DO NOT follow the link\n" +"\t\tprovided and ignore and/or delete this email.\n" +"\n" +"\t\tYour password will not be changed unless we can verify that you\n" +"\t\tissued this request." +msgstr "" + +#: mod/lostpass.php:56 +#, php-format +msgid "" +"\n" +"\t\tFollow this link to verify your identity:\n" +"\n" +"\t\t%1$s\n" +"\n" +"\t\tYou will then receive a follow-up message containing the new password.\n" +"\t\tYou may change that password from your account settings page after " +"logging in.\n" +"\n" +"\t\tThe login details are as follows:\n" +"\n" +"\t\tSite Location:\t%2$s\n" +"\t\tLogin Name:\t%3$s" +msgstr "" + +#: mod/lostpass.php:75 +#, php-format +msgid "Password reset requested at %s" +msgstr "" + +#: mod/lostpass.php:95 +msgid "" +"Request could not be verified. (You may have previously submitted it.) " +"Password reset failed." +msgstr "" + +#: mod/lostpass.php:114 boot.php:916 +msgid "Password Reset" +msgstr "" + +#: mod/lostpass.php:115 +msgid "Your password has been reset as requested." +msgstr "" + +#: mod/lostpass.php:116 +msgid "Your new password is" +msgstr "" + +#: mod/lostpass.php:117 +msgid "Save or copy your new password - and then" +msgstr "" + +#: mod/lostpass.php:118 +msgid "click here to login" +msgstr "" + +#: mod/lostpass.php:119 +msgid "" +"Your password may be changed from the Settings page after " +"successful login." +msgstr "" + +#: mod/lostpass.php:129 +#, php-format +msgid "" +"\n" +"\t\t\t\tDear %1$s,\n" +"\t\t\t\t\tYour password has been changed as requested. Please retain this\n" +"\t\t\t\tinformation for your records (or change your password immediately " +"to\n" +"\t\t\t\tsomething that you will remember).\n" +"\t\t\t" +msgstr "" + +#: mod/lostpass.php:135 +#, php-format +msgid "" +"\n" +"\t\t\t\tYour login details are as follows:\n" +"\n" +"\t\t\t\tSite Location:\t%1$s\n" +"\t\t\t\tLogin Name:\t%2$s\n" +"\t\t\t\tPassword:\t%3$s\n" +"\n" +"\t\t\t\tYou may change that password from your account settings page after " +"logging in.\n" +"\t\t\t" +msgstr "" + +#: mod/lostpass.php:151 +#, php-format +msgid "Your password has been changed at %s" +msgstr "" + +#: mod/lostpass.php:163 +msgid "Forgot your Password?" +msgstr "" + +#: mod/lostpass.php:164 +msgid "" +"Enter your email address and submit to have your password reset. Then check " +"your email for further instructions." +msgstr "" + +#: mod/lostpass.php:165 boot.php:904 +msgid "Nickname or Email: " +msgstr "" + +#: mod/lostpass.php:166 +msgid "Reset" +msgstr "" + +#: mod/manage.php:154 +msgid "Manage Identities and/or Pages" +msgstr "" + +#: mod/manage.php:155 +msgid "" +"Toggle between different identities or community/group pages which share " +"your account details or which you have been granted \"manage\" permissions" +msgstr "" + +#: mod/manage.php:156 +msgid "Select an identity to manage: " +msgstr "" + +#: mod/match.php:45 +msgid "No keywords to match. Please add keywords to your default profile." +msgstr "" + +#: mod/match.php:101 +msgid "is interested in:" +msgstr "" + +#: mod/match.php:117 +msgid "Profile Match" +msgstr "" + +#: mod/message.php:65 mod/wallmessage.php:54 +msgid "No recipient selected." +msgstr "" + +#: mod/message.php:69 +msgid "Unable to locate contact information." +msgstr "" + +#: mod/message.php:72 mod/wallmessage.php:60 +msgid "Message could not be sent." +msgstr "" + +#: mod/message.php:75 mod/wallmessage.php:63 +msgid "Message collection failure." +msgstr "" + +#: mod/message.php:78 mod/wallmessage.php:66 +msgid "Message sent." +msgstr "" + +#: mod/message.php:207 +msgid "Do you really want to delete this message?" +msgstr "" + +#: mod/message.php:227 +msgid "Message deleted." +msgstr "" + +#: mod/message.php:257 +msgid "Conversation removed." +msgstr "" + +#: mod/message.php:324 mod/wallmessage.php:130 +msgid "Send Private Message" +msgstr "" + +#: mod/message.php:325 mod/message.php:501 mod/wallmessage.php:132 +msgid "To:" +msgstr "" + +#: mod/message.php:330 mod/message.php:503 mod/wallmessage.php:133 +msgid "Subject:" +msgstr "" + +#: mod/message.php:366 +msgid "No messages." +msgstr "" + +#: mod/message.php:405 +msgid "Message not available." +msgstr "" + +#: mod/message.php:473 +msgid "Delete message" +msgstr "" + +#: mod/message.php:494 mod/message.php:576 +msgid "Delete conversation" +msgstr "" + +#: mod/message.php:496 +msgid "" +"No secure communications available. You may be able to " +"respond from the sender's profile page." +msgstr "" + +#: mod/message.php:500 +msgid "Send Reply" +msgstr "" + +#: mod/message.php:552 +#, php-format +msgid "Unknown sender - %s" +msgstr "" + +#: mod/message.php:554 +#, php-format +msgid "You and %s" +msgstr "" + +#: mod/message.php:556 +#, php-format +msgid "%s and You" +msgstr "" + +#: mod/message.php:579 +msgid "D, d M Y - g:i A" +msgstr "" + +#: mod/message.php:582 +#, php-format +msgid "%d message" +msgid_plural "%d messages" +msgstr[0] "" +msgstr[1] "" + +#: mod/mood.php:138 msgid "Mood" msgstr "" -#: mod/mood.php:138 +#: mod/mood.php:139 msgid "Set your current mood and tell your friends" msgstr "" -#: mod/network.php:563 +#: mod/network.php:195 mod/search.php:31 +msgid "Remove term" +msgstr "" + +#: mod/network.php:569 #, php-format msgid "" "Warning: This group contains %s member from a network that doesn't allow non " @@ -7145,1748 +6542,2160 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: mod/network.php:566 +#: mod/network.php:572 msgid "Messages in this group won't be send to these receivers." msgstr "" -#: mod/network.php:634 +#: mod/network.php:640 msgid "No such group" msgstr "" -#: mod/network.php:659 +#: mod/network.php:665 #, php-format msgid "Group: %s" msgstr "" -#: mod/network.php:686 +#: mod/network.php:692 msgid "Private messages to this person are at risk of public disclosure." msgstr "" -#: mod/network.php:690 +#: mod/network.php:696 msgid "Invalid contact." msgstr "" -#: mod/network.php:895 +#: mod/network.php:901 msgid "Commented Order" msgstr "" -#: mod/network.php:898 +#: mod/network.php:904 msgid "Sort by Comment Date" msgstr "" -#: mod/network.php:903 +#: mod/network.php:909 msgid "Posted Order" msgstr "" -#: mod/network.php:906 +#: mod/network.php:912 msgid "Sort by Post Date" msgstr "" -#: mod/network.php:917 +#: mod/network.php:920 mod/profiles.php:699 +#: src/Core/NotificationsManager.php:190 +msgid "Personal" +msgstr "" + +#: mod/network.php:923 msgid "Posts that mention or involve you" msgstr "" -#: mod/network.php:925 +#: mod/network.php:931 msgid "New" msgstr "" -#: mod/network.php:928 +#: mod/network.php:934 msgid "Activity Stream - by date" msgstr "" -#: mod/network.php:936 +#: mod/network.php:942 msgid "Shared Links" msgstr "" -#: mod/network.php:939 +#: mod/network.php:945 msgid "Interesting Links" msgstr "" -#: mod/network.php:947 +#: mod/network.php:953 msgid "Starred" msgstr "" -#: mod/network.php:950 +#: mod/network.php:956 msgid "Favourite Posts" msgstr "" -#: mod/ostatus_subscribe.php:17 +#: mod/newmember.php:8 +msgid "Welcome to Friendica" +msgstr "" + +#: mod/newmember.php:9 +msgid "New Member Checklist" +msgstr "" + +#: mod/newmember.php:11 +msgid "" +"We would like to offer some tips and links to help make your experience " +"enjoyable. Click any item to visit the relevant page. A link to this page " +"will be visible from your home page for two weeks after your initial " +"registration and then will quietly disappear." +msgstr "" + +#: mod/newmember.php:12 +msgid "Getting Started" +msgstr "" + +#: mod/newmember.php:14 +msgid "Friendica Walk-Through" +msgstr "" + +#: mod/newmember.php:14 +msgid "" +"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." +msgstr "" + +#: mod/newmember.php:18 +msgid "Go to Your Settings" +msgstr "" + +#: mod/newmember.php:18 +msgid "" +"On your Settings page - change your initial password. Also make a " +"note of your Identity Address. This looks just like an email address - and " +"will be useful in making friends on the free social web." +msgstr "" + +#: mod/newmember.php:19 +msgid "" +"Review the other settings, particularly the privacy settings. An unpublished " +"directory listing is like having an unlisted phone number. In general, you " +"should probably publish your listing - unless all of your friends and " +"potential friends know exactly how to find you." +msgstr "" + +#: mod/newmember.php:23 mod/profile_photo.php:259 mod/profiles.php:703 +msgid "Upload Profile Photo" +msgstr "" + +#: mod/newmember.php:23 +msgid "" +"Upload a profile photo if you have not done so already. Studies have shown " +"that people with real photos of themselves are ten times more likely to make " +"friends than people who do not." +msgstr "" + +#: mod/newmember.php:24 +msgid "Edit Your Profile" +msgstr "" + +#: mod/newmember.php:24 +msgid "" +"Edit your default profile to your liking. Review the " +"settings for hiding your list of friends and hiding the profile from unknown " +"visitors." +msgstr "" + +#: mod/newmember.php:25 +msgid "Profile Keywords" +msgstr "" + +#: mod/newmember.php:25 +msgid "" +"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." +msgstr "" + +#: mod/newmember.php:27 +msgid "Connecting" +msgstr "" + +#: mod/newmember.php:33 +msgid "Importing Emails" +msgstr "" + +#: mod/newmember.php:33 +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 "" + +#: mod/newmember.php:36 +msgid "Go to Your Contacts Page" +msgstr "" + +#: mod/newmember.php:36 +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 "" + +#: mod/newmember.php:37 +msgid "Go to Your Site's Directory" +msgstr "" + +#: mod/newmember.php:37 +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 "" + +#: mod/newmember.php:38 +msgid "Finding New People" +msgstr "" + +#: mod/newmember.php:38 +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 " +"interest, and provide suggestions based on network relationships. On a brand " +"new site, friend suggestions will usually begin to be populated within 24 " +"hours." +msgstr "" + +#: mod/newmember.php:42 +msgid "Group Your Contacts" +msgstr "" + +#: mod/newmember.php:42 +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 "" + +#: mod/newmember.php:45 +msgid "Why Aren't My Posts Public?" +msgstr "" + +#: mod/newmember.php:45 +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 "" + +#: mod/newmember.php:49 +msgid "Getting Help" +msgstr "" + +#: mod/newmember.php:51 +msgid "Go to the Help Section" +msgstr "" + +#: mod/newmember.php:51 +msgid "" +"Our help pages may be consulted for detail on other program " +"features and resources." +msgstr "" + +#: mod/nogroup.php:68 +msgid "Contacts who are not members of a group" +msgstr "" + +#: mod/notifications.php:39 +msgid "Invalid request identifier." +msgstr "" + +#: mod/notifications.php:48 mod/notifications.php:184 mod/notifications.php:231 +msgid "Discard" +msgstr "" + +#: mod/notifications.php:109 +msgid "Network Notifications" +msgstr "" + +#: mod/notifications.php:115 mod/notify.php:73 +msgid "System Notifications" +msgstr "" + +#: mod/notifications.php:121 +msgid "Personal Notifications" +msgstr "" + +#: mod/notifications.php:127 +msgid "Home Notifications" +msgstr "" + +#: mod/notifications.php:156 +msgid "Show Ignored Requests" +msgstr "" + +#: mod/notifications.php:156 +msgid "Hide Ignored Requests" +msgstr "" + +#: mod/notifications.php:168 mod/notifications.php:238 +msgid "Notification type: " +msgstr "" + +#: mod/notifications.php:171 +#, php-format +msgid "suggested by %s" +msgstr "" + +#: mod/notifications.php:177 mod/notifications.php:256 +msgid "Post a new friend activity" +msgstr "" + +#: mod/notifications.php:177 mod/notifications.php:256 +msgid "if applicable" +msgstr "" + +#: mod/notifications.php:199 +msgid "Claims to be known to you: " +msgstr "" + +#: mod/notifications.php:200 +msgid "yes" +msgstr "" + +#: mod/notifications.php:200 +msgid "no" +msgstr "" + +#: mod/notifications.php:201 mod/notifications.php:206 +msgid "Shall your connection be bidirectional or not?" +msgstr "" + +#: mod/notifications.php:202 mod/notifications.php:207 +#, php-format +msgid "" +"Accepting %s as a friend allows %s to subscribe to your posts, and you will " +"also receive updates from them in your news feed." +msgstr "" + +#: mod/notifications.php:203 +#, php-format +msgid "" +"Accepting %s as a subscriber allows them to subscribe to your posts, but you " +"will not receive updates from them in your news feed." +msgstr "" + +#: mod/notifications.php:208 +#, php-format +msgid "" +"Accepting %s as a sharer allows them to subscribe to your posts, but you " +"will not receive updates from them in your news feed." +msgstr "" + +#: mod/notifications.php:219 +msgid "Friend" +msgstr "" + +#: mod/notifications.php:220 +msgid "Sharer" +msgstr "" + +#: mod/notifications.php:220 +msgid "Subscriber" +msgstr "" + +#: mod/notifications.php:276 +msgid "No introductions." +msgstr "" + +#: mod/notifications.php:317 +msgid "Show unread" +msgstr "" + +#: mod/notifications.php:317 +msgid "Show all" +msgstr "" + +#: mod/notifications.php:323 +#, php-format +msgid "No more %s notifications." +msgstr "" + +#: mod/notify.php:69 +msgid "No more system notifications." +msgstr "" + +#: mod/openid.php:27 +msgid "OpenID protocol error. No ID returned." +msgstr "" + +#: mod/openid.php:63 +msgid "" +"Account not found and OpenID registration is not permitted on this site." +msgstr "" + +#: mod/ostatus_subscribe.php:18 msgid "Subscribing to OStatus contacts" msgstr "" -#: mod/ostatus_subscribe.php:28 +#: mod/ostatus_subscribe.php:29 msgid "No contact provided." msgstr "" -#: mod/ostatus_subscribe.php:34 +#: mod/ostatus_subscribe.php:35 msgid "Couldn't fetch information for contact." msgstr "" -#: mod/ostatus_subscribe.php:43 +#: mod/ostatus_subscribe.php:44 msgid "Couldn't fetch friends for contact." msgstr "" -#: mod/ostatus_subscribe.php:71 +#: mod/ostatus_subscribe.php:58 mod/repair_ostatus.php:46 +msgid "Done" +msgstr "" + +#: mod/ostatus_subscribe.php:72 msgid "success" msgstr "" -#: mod/ostatus_subscribe.php:73 +#: mod/ostatus_subscribe.php:74 msgid "failed" msgstr "" -#: mod/ostatus_subscribe.php:76 object/Item.php:262 +#: mod/ostatus_subscribe.php:77 src/Object/Item.php:276 msgid "ignored" msgstr "" -#: mod/photos.php:98 mod/photos.php:1877 +#: mod/ostatus_subscribe.php:82 mod/repair_ostatus.php:52 +msgid "Keep this window open until done." +msgstr "" + +#: mod/p.php:13 +msgid "Not Extended" +msgstr "" + +#: mod/photos.php:100 mod/photos.php:1841 msgid "Recent Photos" msgstr "" -#: mod/photos.php:101 mod/photos.php:1305 mod/photos.php:1879 +#: mod/photos.php:103 mod/photos.php:1293 mod/photos.php:1843 msgid "Upload New Photos" msgstr "" -#: mod/photos.php:116 mod/settings.php:36 +#: mod/photos.php:118 mod/settings.php:39 msgid "everybody" msgstr "" -#: mod/photos.php:180 +#: mod/photos.php:182 msgid "Contact information unavailable" msgstr "" -#: mod/photos.php:201 +#: mod/photos.php:203 msgid "Album not found." msgstr "" -#: mod/photos.php:234 mod/photos.php:246 mod/photos.php:1249 +#: mod/photos.php:236 mod/photos.php:248 mod/photos.php:1242 msgid "Delete Album" msgstr "" -#: mod/photos.php:244 +#: mod/photos.php:246 msgid "Do you really want to delete this photo album and all its photos?" msgstr "" -#: mod/photos.php:327 mod/photos.php:338 mod/photos.php:1575 +#: mod/photos.php:329 mod/photos.php:340 mod/photos.php:1557 msgid "Delete Photo" msgstr "" -#: mod/photos.php:336 +#: mod/photos.php:338 msgid "Do you really want to delete this photo?" msgstr "" -#: mod/photos.php:717 +#: mod/photos.php:719 #, php-format msgid "%1$s was tagged in %2$s by %3$s" msgstr "" -#: mod/photos.php:717 +#: mod/photos.php:719 msgid "a photo" msgstr "" -#: mod/photos.php:817 mod/profile_photo.php:157 mod/wall_upload.php:182 +#: mod/photos.php:819 mod/profile_photo.php:159 mod/wall_upload.php:183 #, php-format msgid "Image exceeds size limit of %s" msgstr "" -#: mod/photos.php:825 +#: mod/photos.php:827 msgid "Image file is empty." msgstr "" -#: mod/photos.php:840 mod/profile_photo.php:166 mod/wall_upload.php:196 +#: mod/photos.php:842 mod/profile_photo.php:168 mod/wall_upload.php:197 msgid "Unable to process image." msgstr "" -#: mod/photos.php:869 mod/profile_photo.php:316 mod/wall_upload.php:235 +#: mod/photos.php:871 mod/profile_photo.php:318 mod/wall_upload.php:236 msgid "Image upload failed." msgstr "" -#: mod/photos.php:974 +#: mod/photos.php:976 msgid "No photos selected" msgstr "" -#: mod/photos.php:1077 mod/videos.php:313 +#: mod/photos.php:1079 mod/videos.php:316 msgid "Access to this item is restricted." msgstr "" -#: mod/photos.php:1165 +#: mod/photos.php:1162 msgid "Upload Photos" msgstr "" -#: mod/photos.php:1169 mod/photos.php:1244 +#: mod/photos.php:1166 mod/photos.php:1237 msgid "New album name: " msgstr "" -#: mod/photos.php:1170 +#: mod/photos.php:1167 msgid "or existing album name: " msgstr "" -#: mod/photos.php:1171 +#: mod/photos.php:1168 msgid "Do not show a status post for this upload" msgstr "" -#: mod/photos.php:1182 mod/photos.php:1579 mod/settings.php:1294 +#: mod/photos.php:1179 mod/photos.php:1561 mod/settings.php:1291 msgid "Show to Groups" msgstr "" -#: mod/photos.php:1183 mod/photos.php:1580 mod/settings.php:1295 +#: mod/photos.php:1180 mod/photos.php:1562 mod/settings.php:1292 msgid "Show to Contacts" msgstr "" -#: mod/photos.php:1184 +#: mod/photos.php:1181 msgid "Private Photo" msgstr "" -#: mod/photos.php:1185 +#: mod/photos.php:1182 msgid "Public Photo" msgstr "" -#: mod/photos.php:1255 +#: mod/photos.php:1248 msgid "Edit Album" msgstr "" -#: mod/photos.php:1260 +#: mod/photos.php:1253 msgid "Show Newest First" msgstr "" -#: mod/photos.php:1262 +#: mod/photos.php:1255 msgid "Show Oldest First" msgstr "" -#: mod/photos.php:1291 mod/photos.php:1862 +#: mod/photos.php:1279 mod/photos.php:1826 msgid "View Photo" msgstr "" -#: mod/photos.php:1336 +#: mod/photos.php:1324 msgid "Permission denied. Access to this item may be restricted." msgstr "" -#: mod/photos.php:1338 +#: mod/photos.php:1326 msgid "Photo not available" msgstr "" -#: mod/photos.php:1399 +#: mod/photos.php:1387 msgid "View photo" msgstr "" -#: mod/photos.php:1399 +#: mod/photos.php:1387 msgid "Edit photo" msgstr "" -#: mod/photos.php:1400 +#: mod/photos.php:1388 msgid "Use as profile photo" msgstr "" -#: mod/photos.php:1406 object/Item.php:127 +#: mod/photos.php:1394 src/Object/Item.php:144 msgid "Private Message" msgstr "" -#: mod/photos.php:1425 +#: mod/photos.php:1413 msgid "View Full Size" msgstr "" -#: mod/photos.php:1515 +#: mod/photos.php:1503 msgid "Tags: " msgstr "" -#: mod/photos.php:1518 +#: mod/photos.php:1506 msgid "[Remove any tag]" msgstr "" -#: mod/photos.php:1561 +#: mod/photos.php:1543 msgid "New album name" msgstr "" -#: mod/photos.php:1562 +#: mod/photos.php:1544 msgid "Caption" msgstr "" -#: mod/photos.php:1563 +#: mod/photos.php:1545 msgid "Add a Tag" msgstr "" -#: mod/photos.php:1563 +#: mod/photos.php:1545 msgid "Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping" msgstr "" -#: mod/photos.php:1564 +#: mod/photos.php:1546 msgid "Do not rotate" msgstr "" -#: mod/photos.php:1565 +#: mod/photos.php:1547 msgid "Rotate CW (right)" msgstr "" -#: mod/photos.php:1566 +#: mod/photos.php:1548 msgid "Rotate CCW (left)" msgstr "" -#: mod/photos.php:1581 +#: mod/photos.php:1563 msgid "Private photo" msgstr "" -#: mod/photos.php:1582 +#: mod/photos.php:1564 msgid "Public photo" msgstr "" -#: mod/photos.php:1602 object/Item.php:280 +#: mod/photos.php:1584 src/Object/Item.php:294 msgid "I like this (toggle)" msgstr "" -#: mod/photos.php:1603 object/Item.php:281 +#: mod/photos.php:1585 src/Object/Item.php:295 msgid "I don't like this (toggle)" msgstr "" -#: mod/photos.php:1620 mod/photos.php:1662 mod/photos.php:1742 -#: object/Item.php:699 +#: mod/photos.php:1602 mod/photos.php:1644 mod/photos.php:1718 +#: src/Object/Item.php:784 msgid "This is you" msgstr "" -#: mod/photos.php:1622 mod/photos.php:1664 mod/photos.php:1744 -#: object/Item.php:386 object/Item.php:701 +#: mod/photos.php:1604 mod/photos.php:1646 mod/photos.php:1720 +#: src/Object/Item.php:391 src/Object/Item.php:786 msgid "Comment" msgstr "" -#: mod/photos.php:1791 +#: mod/photos.php:1760 msgid "Map" msgstr "" -#: mod/photos.php:1868 mod/videos.php:397 +#: mod/photos.php:1832 mod/videos.php:394 msgid "View Album" msgstr "" -#: mod/ping.php:276 +#: mod/ping.php:287 msgid "{0} wants to be your friend" msgstr "" -#: mod/ping.php:291 +#: mod/ping.php:302 msgid "{0} sent you a message" msgstr "" -#: mod/ping.php:306 +#: mod/ping.php:317 msgid "{0} requested registration" msgstr "" -#: mod/poke.php:199 +#: mod/poke.php:200 msgid "Poke/Prod" msgstr "" -#: mod/poke.php:200 +#: mod/poke.php:201 msgid "poke, prod or do other things to somebody" msgstr "" -#: mod/poke.php:201 +#: mod/poke.php:202 msgid "Recipient" msgstr "" -#: mod/poke.php:202 +#: mod/poke.php:203 msgid "Choose what you wish to do to recipient" msgstr "" -#: mod/poke.php:205 +#: mod/poke.php:206 msgid "Make this post private" msgstr "" -#: mod/profile_photo.php:46 +#: mod/profile.php:182 +msgid "Tips for New Members" +msgstr "" + +#: mod/profile_photo.php:48 msgid "Image uploaded but image cropping failed." msgstr "" -#: mod/profile_photo.php:79 mod/profile_photo.php:87 mod/profile_photo.php:95 -#: mod/profile_photo.php:324 +#: mod/profile_photo.php:81 mod/profile_photo.php:89 mod/profile_photo.php:97 +#: mod/profile_photo.php:326 #, php-format msgid "Image size reduction [%s] failed." msgstr "" -#: mod/profile_photo.php:129 +#: mod/profile_photo.php:131 msgid "" "Shift-reload the page or clear browser cache if the new photo does not " "display immediately." msgstr "" -#: mod/profile_photo.php:138 +#: mod/profile_photo.php:140 msgid "Unable to process image" msgstr "" -#: mod/profile_photo.php:255 +#: mod/profile_photo.php:257 msgid "Upload File:" msgstr "" -#: mod/profile_photo.php:256 +#: mod/profile_photo.php:258 msgid "Select a profile:" msgstr "" -#: mod/profile_photo.php:258 +#: mod/profile_photo.php:260 msgid "Upload" msgstr "" -#: mod/profile_photo.php:261 +#: mod/profile_photo.php:263 msgid "or" msgstr "" -#: mod/profile_photo.php:261 +#: mod/profile_photo.php:263 msgid "skip this step" msgstr "" -#: mod/profile_photo.php:261 +#: mod/profile_photo.php:263 msgid "select a photo from your photo albums" msgstr "" -#: mod/profile_photo.php:275 +#: mod/profile_photo.php:277 msgid "Crop Image" msgstr "" -#: mod/profile_photo.php:276 +#: mod/profile_photo.php:278 msgid "Please adjust the image cropping for optimum viewing." msgstr "" -#: mod/profile_photo.php:278 +#: mod/profile_photo.php:280 msgid "Done Editing" msgstr "" -#: mod/profile_photo.php:314 +#: mod/profile_photo.php:316 msgid "Image uploaded successfully." msgstr "" -#: mod/profiles.php:44 +#: mod/profiles.php:48 msgid "Profile deleted." msgstr "" -#: mod/profiles.php:60 mod/profiles.php:96 +#: mod/profiles.php:64 mod/profiles.php:100 msgid "Profile-" msgstr "" -#: mod/profiles.php:79 mod/profiles.php:118 +#: mod/profiles.php:83 mod/profiles.php:122 msgid "New profile created." msgstr "" -#: mod/profiles.php:102 +#: mod/profiles.php:106 msgid "Profile unavailable to clone." msgstr "" -#: mod/profiles.php:192 +#: mod/profiles.php:196 msgid "Profile Name is required." msgstr "" -#: mod/profiles.php:332 +#: mod/profiles.php:336 msgid "Marital Status" msgstr "" -#: mod/profiles.php:336 +#: mod/profiles.php:340 msgid "Romantic Partner" msgstr "" -#: mod/profiles.php:348 +#: mod/profiles.php:352 msgid "Work/Employment" msgstr "" -#: mod/profiles.php:351 +#: mod/profiles.php:355 msgid "Religion" msgstr "" -#: mod/profiles.php:355 +#: mod/profiles.php:359 msgid "Political Views" msgstr "" -#: mod/profiles.php:359 +#: mod/profiles.php:363 msgid "Gender" msgstr "" -#: mod/profiles.php:363 +#: mod/profiles.php:367 msgid "Sexual Preference" msgstr "" -#: mod/profiles.php:367 +#: mod/profiles.php:371 msgid "XMPP" msgstr "" -#: mod/profiles.php:371 +#: mod/profiles.php:375 msgid "Homepage" msgstr "" -#: mod/profiles.php:375 mod/profiles.php:694 +#: mod/profiles.php:379 mod/profiles.php:698 msgid "Interests" msgstr "" -#: mod/profiles.php:379 +#: mod/profiles.php:383 msgid "Address" msgstr "" -#: mod/profiles.php:386 mod/profiles.php:690 +#: mod/profiles.php:390 mod/profiles.php:694 msgid "Location" msgstr "" -#: mod/profiles.php:471 +#: mod/profiles.php:475 msgid "Profile updated." msgstr "" -#: mod/profiles.php:563 +#: mod/profiles.php:567 msgid " and " msgstr "" -#: mod/profiles.php:572 +#: mod/profiles.php:576 msgid "public profile" msgstr "" -#: mod/profiles.php:575 +#: mod/profiles.php:579 #, php-format msgid "%1$s changed %2$s to “%3$s”" msgstr "" -#: mod/profiles.php:576 +#: mod/profiles.php:580 #, php-format msgid " - Visit %1$s's %2$s" msgstr "" -#: mod/profiles.php:578 +#: mod/profiles.php:582 #, php-format msgid "%1$s has an updated %2$s, changing %3$s." msgstr "" -#: mod/profiles.php:636 +#: mod/profiles.php:640 msgid "Hide contacts and friends:" msgstr "" -#: mod/profiles.php:641 +#: mod/profiles.php:645 msgid "Hide your contact/friend list from viewers of this profile?" msgstr "" -#: mod/profiles.php:666 +#: mod/profiles.php:670 msgid "Show more profile fields:" msgstr "" -#: mod/profiles.php:678 +#: mod/profiles.php:682 msgid "Profile Actions" msgstr "" -#: mod/profiles.php:679 +#: mod/profiles.php:683 msgid "Edit Profile Details" msgstr "" -#: mod/profiles.php:681 +#: mod/profiles.php:685 msgid "Change Profile Photo" msgstr "" -#: mod/profiles.php:682 +#: mod/profiles.php:686 msgid "View this profile" msgstr "" -#: mod/profiles.php:684 +#: mod/profiles.php:688 msgid "Create a new profile using these settings" msgstr "" -#: mod/profiles.php:685 +#: mod/profiles.php:689 msgid "Clone this profile" msgstr "" -#: mod/profiles.php:686 +#: mod/profiles.php:690 msgid "Delete this profile" msgstr "" -#: mod/profiles.php:688 +#: mod/profiles.php:692 msgid "Basic information" msgstr "" -#: mod/profiles.php:689 +#: mod/profiles.php:693 msgid "Profile picture" msgstr "" -#: mod/profiles.php:691 +#: mod/profiles.php:695 msgid "Preferences" msgstr "" -#: mod/profiles.php:692 +#: mod/profiles.php:696 msgid "Status information" msgstr "" -#: mod/profiles.php:693 +#: mod/profiles.php:697 msgid "Additional information" msgstr "" -#: mod/profiles.php:696 +#: mod/profiles.php:700 msgid "Relation" msgstr "" -#: mod/profiles.php:700 +#: mod/profiles.php:704 msgid "Your Gender:" msgstr "" -#: mod/profiles.php:701 +#: mod/profiles.php:705 msgid " Marital Status:" msgstr "" -#: mod/profiles.php:703 +#: mod/profiles.php:707 msgid "Example: fishing photography software" msgstr "" -#: mod/profiles.php:708 +#: mod/profiles.php:712 msgid "Profile Name:" msgstr "" -#: mod/profiles.php:710 +#: mod/profiles.php:714 msgid "" "This is your public profile.
    It may " "be visible to anybody using the internet." msgstr "" -#: mod/profiles.php:711 +#: mod/profiles.php:715 msgid "Your Full Name:" msgstr "" -#: mod/profiles.php:712 +#: mod/profiles.php:716 msgid "Title/Description:" msgstr "" -#: mod/profiles.php:715 +#: mod/profiles.php:719 msgid "Street Address:" msgstr "" -#: mod/profiles.php:716 +#: mod/profiles.php:720 msgid "Locality/City:" msgstr "" -#: mod/profiles.php:717 +#: mod/profiles.php:721 msgid "Region/State:" msgstr "" -#: mod/profiles.php:718 +#: mod/profiles.php:722 msgid "Postal/Zip Code:" msgstr "" -#: mod/profiles.php:719 +#: mod/profiles.php:723 msgid "Country:" msgstr "" -#: mod/profiles.php:723 +#: mod/profiles.php:727 msgid "Who: (if applicable)" msgstr "" -#: mod/profiles.php:723 +#: mod/profiles.php:727 msgid "Examples: cathy123, Cathy Williams, cathy@example.com" msgstr "" -#: mod/profiles.php:724 +#: mod/profiles.php:728 msgid "Since [date]:" msgstr "" -#: mod/profiles.php:726 +#: mod/profiles.php:730 msgid "Tell us about yourself..." msgstr "" -#: mod/profiles.php:727 +#: mod/profiles.php:731 msgid "XMPP (Jabber) address:" msgstr "" -#: mod/profiles.php:727 +#: mod/profiles.php:731 msgid "" "The XMPP address will be propagated to your contacts so that they can follow " "you." msgstr "" -#: mod/profiles.php:728 +#: mod/profiles.php:732 msgid "Homepage URL:" msgstr "" -#: mod/profiles.php:731 +#: mod/profiles.php:735 msgid "Religious Views:" msgstr "" -#: mod/profiles.php:732 +#: mod/profiles.php:736 msgid "Public Keywords:" msgstr "" -#: mod/profiles.php:732 +#: mod/profiles.php:736 msgid "(Used for suggesting potential friends, can be seen by others)" msgstr "" -#: mod/profiles.php:733 +#: mod/profiles.php:737 msgid "Private Keywords:" msgstr "" -#: mod/profiles.php:733 +#: mod/profiles.php:737 msgid "(Used for searching profiles, never shown to others)" msgstr "" -#: mod/profiles.php:736 +#: mod/profiles.php:740 msgid "Musical interests" msgstr "" -#: mod/profiles.php:737 +#: mod/profiles.php:741 msgid "Books, literature" msgstr "" -#: mod/profiles.php:738 +#: mod/profiles.php:742 msgid "Television" msgstr "" -#: mod/profiles.php:739 +#: mod/profiles.php:743 msgid "Film/dance/culture/entertainment" msgstr "" -#: mod/profiles.php:740 +#: mod/profiles.php:744 msgid "Hobbies/Interests" msgstr "" -#: mod/profiles.php:741 +#: mod/profiles.php:745 msgid "Love/romance" msgstr "" -#: mod/profiles.php:742 +#: mod/profiles.php:746 msgid "Work/employment" msgstr "" -#: mod/profiles.php:743 +#: mod/profiles.php:747 msgid "School/education" msgstr "" -#: mod/profiles.php:744 +#: mod/profiles.php:748 msgid "Contact information and Social Networks" msgstr "" -#: mod/profiles.php:785 +#: mod/profiles.php:788 msgid "Edit/Manage Profiles" msgstr "" -#: mod/register.php:98 +#: mod/profperm.php:31 mod/profperm.php:60 +msgid "Invalid profile identifier." +msgstr "" + +#: mod/profperm.php:106 +msgid "Profile Visibility Editor" +msgstr "" + +#: mod/profperm.php:119 +msgid "Visible To" +msgstr "" + +#: mod/profperm.php:135 +msgid "All Contacts (with secure profile access)" +msgstr "" + +#: mod/register.php:100 msgid "" "Registration successful. Please check your email for further instructions." msgstr "" -#: mod/register.php:103 +#: mod/register.php:105 #, php-format msgid "" "Failed to send email message. Here your accout details:
    login: %s
    " "password: %s

    You can change your password after login." msgstr "" -#: mod/register.php:110 +#: mod/register.php:112 msgid "Registration successful." msgstr "" -#: mod/register.php:116 +#: mod/register.php:118 msgid "Your registration can not be processed." msgstr "" -#: mod/register.php:165 +#: mod/register.php:167 msgid "Your registration is pending approval by the site owner." msgstr "" -#: mod/register.php:231 +#: mod/register.php:205 mod/uimport.php:54 +msgid "" +"This site has exceeded the number of allowed daily account registrations. " +"Please try again tomorrow." +msgstr "" + +#: mod/register.php:233 msgid "" "You may (optionally) fill in this form via OpenID by supplying your OpenID " "and clicking 'Register'." msgstr "" -#: mod/register.php:232 +#: mod/register.php:234 msgid "" "If you are not familiar with OpenID, please leave that field blank and fill " "in the rest of the items." msgstr "" -#: mod/register.php:233 +#: mod/register.php:235 msgid "Your OpenID (optional): " msgstr "" -#: mod/register.php:247 +#: mod/register.php:249 msgid "Include your profile in member directory?" msgstr "" -#: mod/register.php:272 +#: mod/register.php:274 msgid "Note for the admin" msgstr "" -#: mod/register.php:272 +#: mod/register.php:274 msgid "Leave a message for the admin, why you want to join this node" msgstr "" -#: mod/register.php:273 +#: mod/register.php:275 msgid "Membership on this site is by invitation only." msgstr "" -#: mod/register.php:274 +#: mod/register.php:276 msgid "Your invitation ID: " msgstr "" -#: mod/register.php:285 +#: mod/register.php:287 msgid "Your Full Name (e.g. Joe Smith, real or real-looking): " msgstr "" -#: mod/register.php:286 -msgid "Your Email Address: " +#: mod/register.php:288 +msgid "" +"Your Email Address: (Initial information will be send there, so this has to " +"be an existing address.)" msgstr "" -#: mod/register.php:288 mod/settings.php:1265 +#: mod/register.php:290 mod/settings.php:1262 msgid "New Password:" msgstr "" -#: mod/register.php:288 +#: mod/register.php:290 msgid "Leave empty for an auto generated password." msgstr "" -#: mod/register.php:289 mod/settings.php:1266 +#: mod/register.php:291 mod/settings.php:1263 msgid "Confirm:" msgstr "" -#: mod/register.php:290 +#: mod/register.php:292 msgid "" "Choose a profile nickname. This must begin with a text character. Your " "profile address on this site will then be 'nickname@$sitename'." msgstr "" -#: mod/register.php:291 +#: mod/register.php:293 msgid "Choose a nickname: " msgstr "" -#: mod/register.php:301 +#: mod/register.php:302 mod/uimport.php:69 +msgid "Import" +msgstr "" + +#: mod/register.php:303 msgid "Import your profile to this friendica instance" msgstr "" -#: mod/regmod.php:62 +#: mod/regmod.php:64 msgid "Account approved." msgstr "" -#: mod/regmod.php:90 +#: mod/regmod.php:92 #, php-format msgid "Registration revoked for %s" msgstr "" -#: mod/regmod.php:102 +#: mod/regmod.php:104 msgid "Please login." msgstr "" -#: mod/settings.php:60 +#: mod/removeme.php:55 mod/removeme.php:58 +msgid "Remove My Account" +msgstr "" + +#: mod/removeme.php:56 +msgid "" +"This will completely remove your account. Once this has been done it is not " +"recoverable." +msgstr "" + +#: mod/removeme.php:57 +msgid "Please enter your password for verification:" +msgstr "" + +#: mod/repair_ostatus.php:16 +msgid "Resubscribing to OStatus contacts" +msgstr "" + +#: mod/repair_ostatus.php:32 +msgid "Error" +msgstr "" + +#: mod/search.php:99 +msgid "Only logged in users are permitted to perform a search." +msgstr "" + +#: mod/search.php:123 +msgid "Too Many Requests" +msgstr "" + +#: mod/search.php:124 +msgid "Only one search per minute is permitted for not logged in users." +msgstr "" + +#: mod/search.php:224 +#, php-format +msgid "Items tagged with: %s" +msgstr "" + +#: mod/settings.php:63 msgid "Display" msgstr "" -#: mod/settings.php:67 mod/settings.php:895 +#: mod/settings.php:70 mod/settings.php:900 msgid "Social Networks" msgstr "" -#: mod/settings.php:88 +#: mod/settings.php:91 msgid "Connected apps" msgstr "" -#: mod/settings.php:102 +#: mod/settings.php:98 mod/uexport.php:48 +msgid "Export personal data" +msgstr "" + +#: mod/settings.php:105 msgid "Remove account" msgstr "" -#: mod/settings.php:157 +#: mod/settings.php:160 msgid "Missing some important data!" msgstr "" -#: mod/settings.php:267 +#: mod/settings.php:270 msgid "Failed to connect with email account using the settings provided." msgstr "" -#: mod/settings.php:272 +#: mod/settings.php:275 msgid "Email settings updated." msgstr "" -#: mod/settings.php:288 +#: mod/settings.php:291 msgid "Features updated" msgstr "" -#: mod/settings.php:359 +#: mod/settings.php:364 msgid "Relocate message has been send to your contacts" msgstr "" -#: mod/settings.php:378 +#: mod/settings.php:383 msgid "Empty passwords are not allowed. Password unchanged." msgstr "" -#: mod/settings.php:386 +#: mod/settings.php:391 msgid "Wrong password." msgstr "" -#: mod/settings.php:397 +#: mod/settings.php:402 msgid "Password changed." msgstr "" -#: mod/settings.php:399 +#: mod/settings.php:404 msgid "Password update failed. Please try again." msgstr "" -#: mod/settings.php:489 +#: mod/settings.php:494 msgid " Please use a shorter name." msgstr "" -#: mod/settings.php:492 +#: mod/settings.php:497 msgid " Name too short." msgstr "" -#: mod/settings.php:502 +#: mod/settings.php:507 msgid "Wrong Password" msgstr "" -#: mod/settings.php:507 +#: mod/settings.php:512 msgid " Not valid email." msgstr "" -#: mod/settings.php:514 +#: mod/settings.php:519 msgid " Cannot change to that email." msgstr "" -#: mod/settings.php:570 +#: mod/settings.php:575 msgid "Private forum has no privacy permissions. Using default privacy group." msgstr "" -#: mod/settings.php:573 +#: mod/settings.php:578 msgid "Private forum has no privacy permissions and no default privacy group." msgstr "" -#: mod/settings.php:613 +#: mod/settings.php:618 msgid "Settings updated." msgstr "" -#: mod/settings.php:690 mod/settings.php:716 mod/settings.php:752 +#: mod/settings.php:695 mod/settings.php:721 mod/settings.php:757 msgid "Add application" msgstr "" -#: mod/settings.php:694 mod/settings.php:720 +#: mod/settings.php:699 mod/settings.php:725 msgid "Consumer Key" msgstr "" -#: mod/settings.php:695 mod/settings.php:721 +#: mod/settings.php:700 mod/settings.php:726 msgid "Consumer Secret" msgstr "" -#: mod/settings.php:696 mod/settings.php:722 +#: mod/settings.php:701 mod/settings.php:727 msgid "Redirect" msgstr "" -#: mod/settings.php:697 mod/settings.php:723 +#: mod/settings.php:702 mod/settings.php:728 msgid "Icon url" msgstr "" -#: mod/settings.php:708 +#: mod/settings.php:713 msgid "You can't edit this application." msgstr "" -#: mod/settings.php:751 +#: mod/settings.php:756 msgid "Connected Apps" msgstr "" -#: mod/settings.php:753 object/Item.php:132 object/Item.php:134 +#: mod/settings.php:758 src/Object/Item.php:149 src/Object/Item.php:151 msgid "Edit" msgstr "" -#: mod/settings.php:755 +#: mod/settings.php:760 msgid "Client key starts with" msgstr "" -#: mod/settings.php:756 +#: mod/settings.php:761 msgid "No name" msgstr "" -#: mod/settings.php:757 +#: mod/settings.php:762 msgid "Remove authorization" msgstr "" -#: mod/settings.php:769 +#: mod/settings.php:774 msgid "No Plugin settings configured" msgstr "" -#: mod/settings.php:778 +#: mod/settings.php:783 msgid "Plugin Settings" msgstr "" -#: mod/settings.php:800 +#: mod/settings.php:805 msgid "Additional Features" msgstr "" -#: mod/settings.php:810 mod/settings.php:814 +#: mod/settings.php:815 mod/settings.php:819 msgid "General Social Media Settings" msgstr "" -#: mod/settings.php:820 +#: mod/settings.php:825 msgid "Disable intelligent shortening" msgstr "" -#: mod/settings.php:822 +#: mod/settings.php:827 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:828 +#: mod/settings.php:833 msgid "Automatically follow any GNU Social (OStatus) followers/mentioners" msgstr "" -#: mod/settings.php:830 +#: mod/settings.php:835 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:836 +#: mod/settings.php:841 msgid "Default group for OStatus contacts" msgstr "" -#: mod/settings.php:844 +#: mod/settings.php:849 msgid "Your legacy GNU Social account" msgstr "" -#: mod/settings.php:846 +#: mod/settings.php:851 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:849 +#: mod/settings.php:854 msgid "Repair OStatus subscriptions" msgstr "" -#: mod/settings.php:858 mod/settings.php:859 +#: mod/settings.php:863 mod/settings.php:864 #, php-format msgid "Built-in support for %s connectivity is %s" msgstr "" -#: mod/settings.php:858 mod/settings.php:859 +#: mod/settings.php:863 mod/settings.php:864 msgid "enabled" msgstr "" -#: mod/settings.php:858 mod/settings.php:859 +#: mod/settings.php:863 mod/settings.php:864 msgid "disabled" msgstr "" -#: mod/settings.php:859 +#: mod/settings.php:864 msgid "GNU Social (OStatus)" msgstr "" -#: mod/settings.php:890 +#: mod/settings.php:895 msgid "Email access is disabled on this site." msgstr "" -#: mod/settings.php:900 +#: mod/settings.php:905 msgid "Email/Mailbox Setup" msgstr "" -#: mod/settings.php:901 +#: mod/settings.php:906 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:902 +#: mod/settings.php:907 msgid "Last successful email check:" msgstr "" -#: mod/settings.php:904 +#: mod/settings.php:909 msgid "IMAP server name:" msgstr "" -#: mod/settings.php:905 +#: mod/settings.php:910 msgid "IMAP port:" msgstr "" -#: mod/settings.php:906 +#: mod/settings.php:911 msgid "Security:" msgstr "" -#: mod/settings.php:906 mod/settings.php:911 +#: mod/settings.php:911 mod/settings.php:916 msgid "None" msgstr "" -#: mod/settings.php:907 +#: mod/settings.php:912 msgid "Email login name:" msgstr "" -#: mod/settings.php:908 +#: mod/settings.php:913 msgid "Email password:" msgstr "" -#: mod/settings.php:909 +#: mod/settings.php:914 msgid "Reply-to address:" msgstr "" -#: mod/settings.php:910 +#: mod/settings.php:915 msgid "Send public posts to all email contacts:" msgstr "" -#: mod/settings.php:911 +#: mod/settings.php:916 msgid "Action after import:" msgstr "" -#: mod/settings.php:911 +#: mod/settings.php:916 msgid "Move to folder" msgstr "" -#: mod/settings.php:912 +#: mod/settings.php:917 msgid "Move to folder:" msgstr "" -#: mod/settings.php:1008 +#: mod/settings.php:1004 msgid "Display Settings" msgstr "" -#: mod/settings.php:1014 mod/settings.php:1037 +#: mod/settings.php:1010 mod/settings.php:1034 msgid "Display Theme:" msgstr "" -#: mod/settings.php:1015 +#: mod/settings.php:1011 msgid "Mobile Theme:" msgstr "" -#: mod/settings.php:1016 +#: mod/settings.php:1012 msgid "Suppress warning of insecure networks" msgstr "" -#: mod/settings.php:1016 +#: mod/settings.php:1012 msgid "" "Should the system suppress the warning that the current group contains " "members of networks that can't receive non public postings." msgstr "" -#: mod/settings.php:1017 +#: mod/settings.php:1013 msgid "Update browser every xx seconds" msgstr "" -#: mod/settings.php:1017 +#: mod/settings.php:1013 msgid "Minimum of 10 seconds. Enter -1 to disable it." msgstr "" -#: mod/settings.php:1018 +#: mod/settings.php:1014 msgid "Number of items to display per page:" msgstr "" -#: mod/settings.php:1018 mod/settings.php:1019 +#: mod/settings.php:1014 mod/settings.php:1015 msgid "Maximum of 100 items" msgstr "" -#: mod/settings.php:1019 +#: mod/settings.php:1015 msgid "Number of items to display per page when viewed from mobile device:" msgstr "" -#: mod/settings.php:1020 +#: mod/settings.php:1016 msgid "Don't show emoticons" msgstr "" -#: mod/settings.php:1021 +#: mod/settings.php:1017 msgid "Calendar" msgstr "" -#: mod/settings.php:1022 +#: mod/settings.php:1018 msgid "Beginning of week:" msgstr "" -#: mod/settings.php:1023 +#: mod/settings.php:1019 msgid "Don't show notices" msgstr "" -#: mod/settings.php:1024 +#: mod/settings.php:1020 msgid "Infinite scroll" msgstr "" -#: mod/settings.php:1025 +#: mod/settings.php:1021 msgid "Automatic updates only at the top of the network page" msgstr "" -#: mod/settings.php:1025 +#: mod/settings.php:1021 msgid "" "When disabled, the network page is updated all the time, which could be " "confusing while reading." msgstr "" -#: mod/settings.php:1026 +#: mod/settings.php:1022 msgid "Bandwith Saver Mode" msgstr "" -#: mod/settings.php:1026 +#: mod/settings.php:1022 msgid "" "When enabled, embedded content is not displayed on automatic updates, they " "only show on page reload." msgstr "" -#: mod/settings.php:1028 +#: mod/settings.php:1023 +msgid "Smart Threading" +msgstr "" + +#: mod/settings.php:1023 +msgid "" +"When enabled, suppress extraneous thread indentation while keeping it where " +"it matters. Only works if threading is available and enabled." +msgstr "" + +#: mod/settings.php:1025 msgid "General Theme Settings" msgstr "" -#: mod/settings.php:1029 +#: mod/settings.php:1026 msgid "Custom Theme Settings" msgstr "" -#: mod/settings.php:1030 +#: mod/settings.php:1027 msgid "Content Settings" msgstr "" -#: mod/settings.php:1031 view/theme/duepuntozero/config.php:67 -#: view/theme/frio/config.php:110 view/theme/quattro/config.php:73 -#: view/theme/vier/config.php:116 +#: mod/settings.php:1028 view/theme/duepuntozero/config.php:69 +#: view/theme/frio/config.php:110 view/theme/quattro/config.php:75 +#: view/theme/vier/config.php:119 msgid "Theme settings" msgstr "" -#: mod/settings.php:1097 +#: mod/settings.php:1094 msgid "Account Types" msgstr "" -#: mod/settings.php:1098 +#: mod/settings.php:1095 msgid "Personal Page Subtypes" msgstr "" -#: mod/settings.php:1099 +#: mod/settings.php:1096 msgid "Community Forum Subtypes" msgstr "" -#: mod/settings.php:1106 +#: mod/settings.php:1103 msgid "Personal Page" msgstr "" -#: mod/settings.php:1107 +#: mod/settings.php:1104 msgid "Account for a personal profile." msgstr "" -#: mod/settings.php:1110 +#: mod/settings.php:1107 msgid "Organisation Page" msgstr "" -#: mod/settings.php:1111 +#: mod/settings.php:1108 msgid "" "Account for an organisation that automatically approves contact requests as " "\"Followers\"." msgstr "" -#: mod/settings.php:1114 +#: mod/settings.php:1111 msgid "News Page" msgstr "" -#: mod/settings.php:1115 +#: mod/settings.php:1112 msgid "" "Account for a news reflector that automatically approves contact requests as " "\"Followers\"." msgstr "" -#: mod/settings.php:1118 +#: mod/settings.php:1115 msgid "Community Forum" msgstr "" -#: mod/settings.php:1119 +#: mod/settings.php:1116 msgid "Account for community discussions." msgstr "" -#: mod/settings.php:1122 +#: mod/settings.php:1119 msgid "Normal Account Page" msgstr "" -#: mod/settings.php:1123 +#: mod/settings.php:1120 msgid "" "Account for a regular personal profile that requires manual approval of " "\"Friends\" and \"Followers\"." msgstr "" -#: mod/settings.php:1126 +#: mod/settings.php:1123 msgid "Soapbox Page" msgstr "" -#: mod/settings.php:1127 +#: mod/settings.php:1124 msgid "" "Account for a public profile that automatically approves contact requests as " "\"Followers\"." msgstr "" -#: mod/settings.php:1130 +#: mod/settings.php:1127 msgid "Public Forum" msgstr "" -#: mod/settings.php:1131 +#: mod/settings.php:1128 msgid "Automatically approves all contact requests." msgstr "" -#: mod/settings.php:1134 +#: mod/settings.php:1131 msgid "Automatic Friend Page" msgstr "" -#: mod/settings.php:1135 +#: mod/settings.php:1132 msgid "" "Account for a popular profile that automatically approves contact requests " "as \"Friends\"." msgstr "" -#: mod/settings.php:1138 +#: mod/settings.php:1135 msgid "Private Forum [Experimental]" msgstr "" -#: mod/settings.php:1139 +#: mod/settings.php:1136 msgid "Requires manual approval of contact requests." msgstr "" -#: mod/settings.php:1150 +#: mod/settings.php:1147 msgid "OpenID:" msgstr "" -#: mod/settings.php:1150 +#: mod/settings.php:1147 msgid "(Optional) Allow this OpenID to login to this account." msgstr "" -#: mod/settings.php:1158 +#: mod/settings.php:1155 msgid "Publish your default profile in your local site directory?" msgstr "" -#: mod/settings.php:1158 +#: mod/settings.php:1155 msgid "Your profile may be visible in public." msgstr "" -#: mod/settings.php:1164 +#: mod/settings.php:1161 msgid "Publish your default profile in the global social directory?" msgstr "" -#: mod/settings.php:1171 +#: mod/settings.php:1168 msgid "Hide your contact/friend list from viewers of your default profile?" msgstr "" -#: mod/settings.php:1175 +#: mod/settings.php:1172 msgid "" "If enabled, posting public messages to Diaspora and other networks isn't " "possible." msgstr "" -#: mod/settings.php:1180 +#: mod/settings.php:1177 msgid "Allow friends to post to your profile page?" msgstr "" -#: mod/settings.php:1185 +#: mod/settings.php:1182 msgid "Allow friends to tag your posts?" msgstr "" -#: mod/settings.php:1190 +#: mod/settings.php:1187 msgid "Allow us to suggest you as a potential friend to new members?" msgstr "" -#: mod/settings.php:1195 +#: mod/settings.php:1192 msgid "Permit unknown people to send you private mail?" msgstr "" -#: mod/settings.php:1203 +#: mod/settings.php:1200 msgid "Profile is not published." msgstr "" -#: mod/settings.php:1211 +#: mod/settings.php:1208 #, php-format msgid "Your Identity Address is '%s' or '%s'." msgstr "" -#: mod/settings.php:1218 +#: mod/settings.php:1215 msgid "Automatically expire posts after this many days:" msgstr "" -#: mod/settings.php:1218 +#: mod/settings.php:1215 msgid "If empty, posts will not expire. Expired posts will be deleted" msgstr "" -#: mod/settings.php:1219 +#: mod/settings.php:1216 msgid "Advanced expiration settings" msgstr "" -#: mod/settings.php:1220 +#: mod/settings.php:1217 msgid "Advanced Expiration" msgstr "" -#: mod/settings.php:1221 +#: mod/settings.php:1218 msgid "Expire posts:" msgstr "" -#: mod/settings.php:1222 +#: mod/settings.php:1219 msgid "Expire personal notes:" msgstr "" -#: mod/settings.php:1223 +#: mod/settings.php:1220 msgid "Expire starred posts:" msgstr "" -#: mod/settings.php:1224 +#: mod/settings.php:1221 msgid "Expire photos:" msgstr "" -#: mod/settings.php:1225 +#: mod/settings.php:1222 msgid "Only expire posts by others:" msgstr "" -#: mod/settings.php:1256 +#: mod/settings.php:1253 msgid "Account Settings" msgstr "" -#: mod/settings.php:1264 +#: mod/settings.php:1261 msgid "Password Settings" msgstr "" -#: mod/settings.php:1266 +#: mod/settings.php:1263 msgid "Leave password fields blank unless changing" msgstr "" -#: mod/settings.php:1267 +#: mod/settings.php:1264 msgid "Current Password:" msgstr "" -#: mod/settings.php:1267 mod/settings.php:1268 +#: mod/settings.php:1264 mod/settings.php:1265 msgid "Your current password to confirm the changes" msgstr "" -#: mod/settings.php:1268 +#: mod/settings.php:1265 msgid "Password:" msgstr "" -#: mod/settings.php:1272 +#: mod/settings.php:1269 msgid "Basic Settings" msgstr "" -#: mod/settings.php:1274 +#: mod/settings.php:1271 msgid "Email Address:" msgstr "" -#: mod/settings.php:1275 +#: mod/settings.php:1272 msgid "Your Timezone:" msgstr "" -#: mod/settings.php:1276 +#: mod/settings.php:1273 msgid "Your Language:" msgstr "" -#: mod/settings.php:1276 +#: mod/settings.php:1273 msgid "" "Set the language we use to show you friendica interface and to send you " "emails" msgstr "" -#: mod/settings.php:1277 +#: mod/settings.php:1274 msgid "Default Post Location:" msgstr "" -#: mod/settings.php:1278 +#: mod/settings.php:1275 msgid "Use Browser Location:" msgstr "" -#: mod/settings.php:1281 +#: mod/settings.php:1278 msgid "Security and Privacy Settings" msgstr "" -#: mod/settings.php:1283 +#: mod/settings.php:1280 msgid "Maximum Friend Requests/Day:" msgstr "" -#: mod/settings.php:1283 mod/settings.php:1313 +#: mod/settings.php:1280 mod/settings.php:1310 msgid "(to prevent spam abuse)" msgstr "" -#: mod/settings.php:1284 +#: mod/settings.php:1281 msgid "Default Post Permissions" msgstr "" -#: mod/settings.php:1285 +#: mod/settings.php:1282 msgid "(click to open/close)" msgstr "" -#: mod/settings.php:1296 +#: mod/settings.php:1293 msgid "Default Private Post" msgstr "" -#: mod/settings.php:1297 +#: mod/settings.php:1294 msgid "Default Public Post" msgstr "" -#: mod/settings.php:1301 +#: mod/settings.php:1298 msgid "Default Permissions for New Posts" msgstr "" -#: mod/settings.php:1313 +#: mod/settings.php:1310 msgid "Maximum private messages per day from unknown people:" msgstr "" -#: mod/settings.php:1316 +#: mod/settings.php:1313 msgid "Notification Settings" msgstr "" -#: mod/settings.php:1317 +#: mod/settings.php:1314 msgid "By default post a status message when:" msgstr "" -#: mod/settings.php:1318 +#: mod/settings.php:1315 msgid "accepting a friend request" msgstr "" -#: mod/settings.php:1319 +#: mod/settings.php:1316 msgid "joining a forum/community" msgstr "" -#: mod/settings.php:1320 +#: mod/settings.php:1317 msgid "making an interesting profile change" msgstr "" -#: mod/settings.php:1321 +#: mod/settings.php:1318 msgid "Send a notification email when:" msgstr "" -#: mod/settings.php:1322 +#: mod/settings.php:1319 msgid "You receive an introduction" msgstr "" -#: mod/settings.php:1323 +#: mod/settings.php:1320 msgid "Your introductions are confirmed" msgstr "" -#: mod/settings.php:1324 +#: mod/settings.php:1321 msgid "Someone writes on your profile wall" msgstr "" -#: mod/settings.php:1325 +#: mod/settings.php:1322 msgid "Someone writes a followup comment" msgstr "" -#: mod/settings.php:1326 +#: mod/settings.php:1323 msgid "You receive a private message" msgstr "" -#: mod/settings.php:1327 +#: mod/settings.php:1324 msgid "You receive a friend suggestion" msgstr "" -#: mod/settings.php:1328 +#: mod/settings.php:1325 msgid "You are tagged in a post" msgstr "" -#: mod/settings.php:1329 +#: mod/settings.php:1326 msgid "You are poked/prodded/etc. in a post" msgstr "" -#: mod/settings.php:1331 +#: mod/settings.php:1328 msgid "Activate desktop notifications" msgstr "" -#: mod/settings.php:1331 +#: mod/settings.php:1328 msgid "Show desktop popup on new notifications" msgstr "" -#: mod/settings.php:1333 +#: mod/settings.php:1330 msgid "Text-only notification emails" msgstr "" -#: mod/settings.php:1335 +#: mod/settings.php:1332 msgid "Send text only notification emails, without the html part" msgstr "" -#: mod/settings.php:1337 +#: mod/settings.php:1334 msgid "Show detailled notifications" msgstr "" -#: mod/settings.php:1339 +#: mod/settings.php:1336 msgid "" "Per default the notificiation are condensed to a single notification per " "item. When enabled, every notification is displayed." msgstr "" -#: mod/settings.php:1341 +#: mod/settings.php:1338 msgid "Advanced Account/Page Type Settings" msgstr "" -#: mod/settings.php:1342 +#: mod/settings.php:1339 msgid "Change the behaviour of this account for special situations" msgstr "" -#: mod/settings.php:1345 +#: mod/settings.php:1342 msgid "Relocate" msgstr "" -#: mod/settings.php:1346 +#: mod/settings.php:1343 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:1347 +#: mod/settings.php:1344 msgid "Resend relocate message to contacts" msgstr "" -#: mod/videos.php:128 +#: mod/subthread.php:107 +#, php-format +msgid "%1$s is following %2$s's %3$s" +msgstr "" + +#: mod/suggest.php:34 +msgid "Do you really want to delete this suggestion?" +msgstr "" + +#: mod/suggest.php:75 +msgid "" +"No suggestions available. If this is a new site, please try again in 24 " +"hours." +msgstr "" + +#: mod/suggest.php:88 mod/suggest.php:108 +msgid "Ignore/Hide" +msgstr "" + +#: mod/tagrm.php:47 +msgid "Tag removed" +msgstr "" + +#: mod/tagrm.php:86 +msgid "Remove Item Tag" +msgstr "" + +#: mod/tagrm.php:88 +msgid "Select a tag to remove: " +msgstr "" + +#: mod/uexport.php:40 +msgid "Export account" +msgstr "" + +#: mod/uexport.php:40 +msgid "" +"Export your account info and contacts. Use this to make a backup of your " +"account and/or to move it to another server." +msgstr "" + +#: mod/uexport.php:41 +msgid "Export all" +msgstr "" + +#: mod/uexport.php:41 +msgid "" +"Export your accout info, contacts and all your items as json. Could be a " +"very big file, and could take a lot of time. Use this to make a full backup " +"of your account (photos are not exported)" +msgstr "" + +#: mod/uimport.php:71 +msgid "Move account" +msgstr "" + +#: mod/uimport.php:72 +msgid "You can import an account from another Friendica server." +msgstr "" + +#: mod/uimport.php:73 +msgid "" +"You need to export your account from the old server and upload it here. We " +"will recreate your old account here with all your contacts. We will try also " +"to inform your friends that you moved here." +msgstr "" + +#: mod/uimport.php:74 +msgid "" +"This feature is experimental. We can't import contacts from the OStatus " +"network (GNU Social/Statusnet) or from Diaspora" +msgstr "" + +#: mod/uimport.php:75 +msgid "Account file" +msgstr "" + +#: mod/uimport.php:75 +msgid "" +"To export your account, go to \"Settings->Export your personal data\" and " +"select \"Export account\"" +msgstr "" + +#: mod/unfollow.php:33 +msgid "Contact wasn't found or can't be unfollowed." +msgstr "" + +#: mod/unfollow.php:46 +msgid "Contact unfollowed" +msgstr "" + +#: mod/unfollow.php:72 +msgid "You aren't a friend of this contact." +msgstr "" + +#: mod/unfollow.php:78 +msgid "Unfollowing is currently not supported by your network." +msgstr "" + +#: mod/update_community.php:22 mod/update_display.php:26 +#: mod/update_network.php:30 mod/update_notes.php:39 mod/update_profile.php:38 +msgid "[Embedded content - reload page to view]" +msgstr "" + +#: mod/videos.php:131 msgid "Do you really want to delete this video?" msgstr "" -#: mod/videos.php:133 +#: mod/videos.php:136 msgid "Delete Video" msgstr "" -#: mod/videos.php:212 +#: mod/videos.php:215 msgid "No videos selected" msgstr "" -#: mod/videos.php:406 +#: mod/videos.php:403 msgid "Recent Videos" msgstr "" -#: mod/videos.php:408 +#: mod/videos.php:405 msgid "Upload New Videos" msgstr "" -#: mod/wall_attach.php:19 mod/wall_attach.php:27 mod/wall_attach.php:78 -#: mod/wall_upload.php:37 mod/wall_upload.php:53 mod/wall_upload.php:111 -#: mod/wall_upload.php:151 mod/wall_upload.php:154 +#: mod/viewcontacts.php:80 +msgid "No contacts." +msgstr "" + +#: mod/viewsrc.php:9 +msgid "Access denied." +msgstr "" + +#: mod/wall_attach.php:21 mod/wall_attach.php:29 mod/wall_attach.php:80 +#: mod/wall_upload.php:38 mod/wall_upload.php:54 mod/wall_upload.php:112 +#: mod/wall_upload.php:152 mod/wall_upload.php:155 msgid "Invalid request." msgstr "" -#: mod/wall_attach.php:96 +#: mod/wall_attach.php:98 msgid "Sorry, maybe your upload is bigger than the PHP configuration allows" msgstr "" -#: mod/wall_attach.php:96 +#: mod/wall_attach.php:98 msgid "Or - did you try to upload an empty file?" msgstr "" -#: mod/wall_attach.php:107 +#: mod/wall_attach.php:109 #, php-format msgid "File exceeds size limit of %s" msgstr "" -#: mod/wall_attach.php:131 mod/wall_attach.php:147 +#: mod/wall_attach.php:133 mod/wall_attach.php:149 msgid "File upload failed." msgstr "" -#: object/Item.php:106 -msgid "This entry was edited" -msgstr "" - -#: object/Item.php:151 -msgid "save to folder" -msgstr "" - -#: object/Item.php:221 -msgid "I will attend" -msgstr "" - -#: object/Item.php:221 -msgid "I will not attend" -msgstr "" - -#: object/Item.php:221 -msgid "I might attend" -msgstr "" - -#: object/Item.php:247 -msgid "add star" -msgstr "" - -#: object/Item.php:248 -msgid "remove star" -msgstr "" - -#: object/Item.php:249 -msgid "toggle star status" -msgstr "" - -#: object/Item.php:252 -msgid "starred" -msgstr "" - -#: object/Item.php:257 -msgid "ignore thread" -msgstr "" - -#: object/Item.php:258 -msgid "unignore thread" -msgstr "" - -#: object/Item.php:259 -msgid "toggle ignore status" -msgstr "" - -#: object/Item.php:269 -msgid "add tag" -msgstr "" - -#: object/Item.php:280 -msgid "like" -msgstr "" - -#: object/Item.php:281 -msgid "dislike" -msgstr "" - -#: object/Item.php:284 -msgid "Share this" -msgstr "" - -#: object/Item.php:284 -msgid "share" -msgstr "" - -#: object/Item.php:352 -msgid "to" -msgstr "" - -#: object/Item.php:353 -msgid "via" -msgstr "" - -#: object/Item.php:354 -msgid "Wall-to-Wall" -msgstr "" - -#: object/Item.php:355 -msgid "via Wall-To-Wall:" -msgstr "" - -#: object/Item.php:414 +#: mod/wallmessage.php:46 mod/wallmessage.php:110 #, php-format -msgid "%d comment" -msgid_plural "%d comments" -msgstr[0] "" -msgstr[1] "" - -#: object/Item.php:703 -msgid "Bold" +msgid "Number of daily wall messages for %s exceeded. Message failed." msgstr "" -#: object/Item.php:704 -msgid "Italic" +#: mod/wallmessage.php:57 +msgid "Unable to check your home location." msgstr "" -#: object/Item.php:705 -msgid "Underline" +#: mod/wallmessage.php:84 mod/wallmessage.php:93 +msgid "No recipient." msgstr "" -#: object/Item.php:706 -msgid "Quote" -msgstr "" - -#: object/Item.php:707 -msgid "Code" -msgstr "" - -#: object/Item.php:708 -msgid "Image" -msgstr "" - -#: object/Item.php:709 -msgid "Link" -msgstr "" - -#: object/Item.php:710 -msgid "Video" -msgstr "" - -#: view/theme/duepuntozero/config.php:48 -msgid "greenzero" -msgstr "" - -#: view/theme/duepuntozero/config.php:49 -msgid "purplezero" +#: mod/wallmessage.php:131 +#, php-format +msgid "" +"If you wish for %s to respond, please check that the privacy settings on " +"your site allow private mail from unknown senders." msgstr "" #: view/theme/duepuntozero/config.php:50 -msgid "easterbunny" +msgid "greenzero" msgstr "" #: view/theme/duepuntozero/config.php:51 -msgid "darkzero" +msgid "purplezero" msgstr "" #: view/theme/duepuntozero/config.php:52 -msgid "comix" +msgid "easterbunny" msgstr "" #: view/theme/duepuntozero/config.php:53 +msgid "darkzero" +msgstr "" + +#: view/theme/duepuntozero/config.php:54 +msgid "comix" +msgstr "" + +#: view/theme/duepuntozero/config.php:55 msgid "slackr" msgstr "" -#: view/theme/duepuntozero/config.php:68 +#: view/theme/duepuntozero/config.php:70 msgid "Variations" msgstr "" @@ -8962,76 +8771,136 @@ msgstr "" msgid "Set the background image" msgstr "" -#: view/theme/frio/theme.php:231 +#: view/theme/frio/theme.php:234 msgid "Guest" msgstr "" -#: view/theme/frio/theme.php:237 +#: view/theme/frio/theme.php:240 msgid "Visitor" msgstr "" -#: view/theme/quattro/config.php:74 +#: view/theme/quattro/config.php:76 msgid "Alignment" msgstr "" -#: view/theme/quattro/config.php:74 +#: view/theme/quattro/config.php:76 msgid "Left" msgstr "" -#: view/theme/quattro/config.php:74 +#: view/theme/quattro/config.php:76 msgid "Center" msgstr "" -#: view/theme/quattro/config.php:75 +#: view/theme/quattro/config.php:77 msgid "Color scheme" msgstr "" -#: view/theme/quattro/config.php:76 +#: view/theme/quattro/config.php:78 msgid "Posts font size" msgstr "" -#: view/theme/quattro/config.php:77 +#: view/theme/quattro/config.php:79 msgid "Textareas font size" msgstr "" -#: view/theme/vier/theme.php:144 view/theme/vier/config.php:119 +#: view/theme/vier/config.php:73 +msgid "Comma separated list of helper forums" +msgstr "" + +#: view/theme/vier/config.php:120 +msgid "Set style" +msgstr "" + +#: view/theme/vier/config.php:121 +msgid "Community Pages" +msgstr "" + +#: view/theme/vier/config.php:122 view/theme/vier/theme.php:147 msgid "Community Profiles" msgstr "" -#: view/theme/vier/theme.php:174 view/theme/vier/config.php:123 -msgid "Last users" +#: view/theme/vier/config.php:123 +msgid "Help or @NewHere ?" msgstr "" -#: view/theme/vier/theme.php:192 view/theme/vier/config.php:122 +#: view/theme/vier/config.php:124 view/theme/vier/theme.php:385 +msgid "Connect Services" +msgstr "" + +#: view/theme/vier/config.php:125 view/theme/vier/theme.php:195 msgid "Find Friends" msgstr "" -#: view/theme/vier/theme.php:193 +#: view/theme/vier/config.php:126 view/theme/vier/theme.php:177 +msgid "Last users" +msgstr "" + +#: view/theme/vier/theme.php:196 msgid "Local Directory" msgstr "" +#: view/theme/vier/theme.php:251 src/Content/ForumManager.php:123 +msgid "External link to forum" +msgstr "" + #: view/theme/vier/theme.php:285 msgid "Quick Start" msgstr "" -#: view/theme/vier/theme.php:385 view/theme/vier/config.php:121 -msgid "Connect Services" +#: src/Core/NotificationsManager.php:176 +msgid "System" msgstr "" -#: view/theme/vier/config.php:71 -msgid "Comma separated list of helper forums" +#: src/Core/NotificationsManager.php:261 src/Core/NotificationsManager.php:273 +#, php-format +msgid "%s commented on %s's post" msgstr "" -#: view/theme/vier/config.php:117 -msgid "Set style" +#: src/Core/NotificationsManager.php:272 +#, php-format +msgid "%s created a new post" msgstr "" -#: view/theme/vier/config.php:118 -msgid "Community Pages" +#: src/Core/NotificationsManager.php:286 +#, php-format +msgid "%s liked %s's post" msgstr "" -#: view/theme/vier/config.php:120 -msgid "Help or @NewHere ?" +#: src/Core/NotificationsManager.php:299 +#, php-format +msgid "%s disliked %s's post" +msgstr "" + +#: src/Core/NotificationsManager.php:312 +#, php-format +msgid "%s is attending %s's event" +msgstr "" + +#: src/Core/NotificationsManager.php:325 +#, php-format +msgid "%s is not attending %s's event" +msgstr "" + +#: src/Core/NotificationsManager.php:338 +#, php-format +msgid "%s may attend %s's event" +msgstr "" + +#: src/Core/NotificationsManager.php:355 +#, php-format +msgid "%s is now friends with %s" +msgstr "" + +#: src/Core/NotificationsManager.php:829 +msgid "Friend Suggestion" +msgstr "" + +#: src/Core/NotificationsManager.php:856 +msgid "Friend/Connect Request" +msgstr "" + +#: src/Core/NotificationsManager.php:856 +msgid "New Follower" msgstr "" #: src/App.php:522 @@ -9042,47 +8911,221 @@ msgstr "" msgid "show fewer" msgstr "" -#: boot.php:738 +#: src/Object/Contact.php:440 +msgid "Drop Contact" +msgstr "" + +#: src/Object/Contact.php:807 +msgid "Organisation" +msgstr "" + +#: src/Object/Contact.php:810 +msgid "News" +msgstr "" + +#: src/Object/Contact.php:813 +msgid "Forum" +msgstr "" + +#: src/Object/Item.php:123 +msgid "This entry was edited" +msgstr "" + +#: src/Object/Item.php:168 +msgid "save to folder" +msgstr "" + +#: src/Object/Item.php:235 +msgid "I will attend" +msgstr "" + +#: src/Object/Item.php:235 +msgid "I will not attend" +msgstr "" + +#: src/Object/Item.php:235 +msgid "I might attend" +msgstr "" + +#: src/Object/Item.php:261 +msgid "add star" +msgstr "" + +#: src/Object/Item.php:262 +msgid "remove star" +msgstr "" + +#: src/Object/Item.php:263 +msgid "toggle star status" +msgstr "" + +#: src/Object/Item.php:266 +msgid "starred" +msgstr "" + +#: src/Object/Item.php:271 +msgid "ignore thread" +msgstr "" + +#: src/Object/Item.php:272 +msgid "unignore thread" +msgstr "" + +#: src/Object/Item.php:273 +msgid "toggle ignore status" +msgstr "" + +#: src/Object/Item.php:283 +msgid "add tag" +msgstr "" + +#: src/Object/Item.php:294 +msgid "like" +msgstr "" + +#: src/Object/Item.php:295 +msgid "dislike" +msgstr "" + +#: src/Object/Item.php:298 +msgid "Share this" +msgstr "" + +#: src/Object/Item.php:298 +msgid "share" +msgstr "" + +#: src/Object/Item.php:357 +msgid "to" +msgstr "" + +#: src/Object/Item.php:358 +msgid "via" +msgstr "" + +#: src/Object/Item.php:359 +msgid "Wall-to-Wall" +msgstr "" + +#: src/Object/Item.php:360 +msgid "via Wall-To-Wall:" +msgstr "" + +#: src/Object/Item.php:419 +#, php-format +msgid "%d comment" +msgid_plural "%d comments" +msgstr[0] "" +msgstr[1] "" + +#: src/Object/Item.php:788 +msgid "Bold" +msgstr "" + +#: src/Object/Item.php:789 +msgid "Italic" +msgstr "" + +#: src/Object/Item.php:790 +msgid "Underline" +msgstr "" + +#: src/Object/Item.php:791 +msgid "Quote" +msgstr "" + +#: src/Object/Item.php:792 +msgid "Code" +msgstr "" + +#: src/Object/Item.php:793 +msgid "Image" +msgstr "" + +#: src/Object/Item.php:794 +msgid "Link" +msgstr "" + +#: src/Object/Item.php:795 +msgid "Video" +msgstr "" + +#: src/Protocol/DFRN.php:1416 +#, php-format +msgid "%s\\'s birthday" +msgstr "" + +#: src/Protocol/Diaspora.php:2488 +msgid "Sharing notification from Diaspora network" +msgstr "" + +#: src/Protocol/Diaspora.php:3530 +msgid "Attachments:" +msgstr "" + +#: src/Protocol/OStatus.php:1786 +#, php-format +msgid "%s is now following %s." +msgstr "" + +#: src/Protocol/OStatus.php:1787 +msgid "following" +msgstr "" + +#: src/Protocol/OStatus.php:1790 +#, php-format +msgid "%s stopped following %s." +msgstr "" + +#: src/Protocol/OStatus.php:1791 +msgid "stopped following" +msgstr "" + +#: src/Worker/Delivery.php:421 +msgid "(no subject)" +msgstr "" + +#: boot.php:762 #, php-format msgid "Update %s failed. See error logs." msgstr "" -#: boot.php:850 +#: boot.php:873 msgid "Create a New Account" msgstr "" -#: boot.php:878 +#: boot.php:905 msgid "Password: " msgstr "" -#: boot.php:879 +#: boot.php:906 msgid "Remember me" msgstr "" -#: boot.php:882 +#: boot.php:909 msgid "Or login using OpenID: " msgstr "" -#: boot.php:888 +#: boot.php:915 msgid "Forgot your password?" msgstr "" -#: boot.php:891 +#: boot.php:918 msgid "Website Terms of Service" msgstr "" -#: boot.php:892 +#: boot.php:919 msgid "terms of service" msgstr "" -#: boot.php:894 +#: boot.php:921 msgid "Website Privacy Policy" msgstr "" -#: boot.php:895 +#: boot.php:922 msgid "privacy policy" msgstr "" -#: index.php:438 +#: index.php:427 msgid "toggle mobile" msgstr "" From ced1063a10909fd10c8dcfb0331e86fb0fa208d5 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 27 Nov 2017 08:17:56 -0500 Subject: [PATCH 163/175] Improved dba calls - Removed intval calls - Used boolean values for params when relevant --- include/auth.php | 20 ++++++++++---------- src/Model/User.php | 2 +- src/Worker/Queue.php | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/auth.php b/include/auth.php index 5da71ef6e..a02c18d1d 100644 --- a/include/auth.php +++ b/include/auth.php @@ -17,11 +17,11 @@ if (isset($_COOKIE["Friendica"])) { $user = dba::select('user', [], [ - 'uid' => intval($data->uid), - 'blocked' => 0, - 'account_expired' => 0, - 'account_removed' => 0, - 'verified' => 1, + 'uid' => $data->uid, + 'blocked' => false, + 'account_expired' => false, + 'account_removed' => false, + 'verified' => true, ], ['limit' => 1] ); @@ -86,11 +86,11 @@ if (isset($_SESSION) && x($_SESSION, 'authenticated') && (!x($_POST, 'auth-param $user = dba::select('user', [], [ - 'uid' => intval($_SESSION['uid']), - 'blocked' => 0, - 'account_expired' => 0, - 'account_removed' => 0, - 'verified' => 1, + 'uid' => $_SESSION['uid'], + 'blocked' => false, + 'account_expired' => false, + 'account_removed' => false, + 'verified' => true, ], ['limit' => 1] ); diff --git a/src/Model/User.php b/src/Model/User.php index 3fa394862..b2beb8e19 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -87,7 +87,7 @@ class User dba::insert('userd', ['username' => $user['nickname']]); // The user and related data will be deleted in "cron_expire_and_remove_users" (cronjobs.php) - dba::update('user', ['account_removed' => 1, 'account_expires_on' => datetime_convert()], ['uid' => intval($uid)]); + dba::update('user', ['account_removed' => true, 'account_expires_on' => datetime_convert()], ['uid' => $uid]); Worker::add(PRIORITY_HIGH, "Notifier", "removeme", $uid); // Send an update to the directory diff --git a/src/Worker/Queue.php b/src/Worker/Queue.php index f2da80007..35642ae72 100644 --- a/src/Worker/Queue.php +++ b/src/Worker/Queue.php @@ -80,7 +80,7 @@ class Queue $q_item = $r[0]; - $contact = dba::select('contact', [], ['id' => intval($q_item['cid'])], ['limit' => 1]); + $contact = dba::select('contact', [], ['id' => $q_item['cid']], ['limit' => 1]); if (!DBM::is_result($contact)) { remove_queue_item($q_item['id']); return; @@ -113,7 +113,7 @@ class Queue } } - $user = dba::select('user', [], ['uid' => intval($contact['uid'])], ['limit' => 1]); + $user = dba::select('user', [], ['uid' => $contact['uid']], ['limit' => 1]); if (!DBM::is_result($user)) { remove_queue_item($q_item['id']); return; From 25c8db16256a55a226d9972fe854d85efdced613 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 27 Nov 2017 18:27:57 +0100 Subject: [PATCH 164/175] config tool needed some touch up to work again --- util/config | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/util/config b/util/config index 3057b8793..7774fb602 100644 --- a/util/config +++ b/util/config @@ -1,13 +1,38 @@ #!/usr/bin/env php 3) { Config::set($argv[1],$argv[2],$argv[3]); @@ -19,9 +44,13 @@ if($argc == 3) { } if($argc == 2) { - load_config($argv[1]); - foreach($a->config[$argv[1]] as $k => $x) { - echo "config[{$argv[1]}][{$k}] = " . $x . "\n"; + Config::load($argv[1]); + if (!is_null($a->config[$argv[1]])) { + foreach($a->config[$argv[1]] as $k => $x) { + echo "config[{$argv[1]}][{$k}] = " . $x . "\n"; + } + } else { + echo "config section '$argv[1]' returned nothing.\n"; } } From 6f825c5db4a0b932cd6662879512f3a19fd24076 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 27 Nov 2017 18:42:05 +0100 Subject: [PATCH 165/175] regen credits --- util/credits.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/util/credits.txt b/util/credits.txt index 9c6eca370..0dd8aa95f 100644 --- a/util/credits.txt +++ b/util/credits.txt @@ -2,9 +2,11 @@ Abinoam P. Marques Jr. Abrax Adam Jurkiewicz +Adam Magness Albert Alberto Díaz Tormo Alex +Alexander Fortin Alexander Kampmann Alexandre Alapetite AlfredSK @@ -80,6 +82,8 @@ Hans Meine hauke Hauke Altmann Hauke Zühl +Herbert Thielen +hoergen Hubert Kościański Hypolite Petovan irhen @@ -118,6 +122,7 @@ Mats Sjöberg Matthew Exon Matthias Matthias Moritz +Mauro Batini Max Weller mhnxo Michael Johnston @@ -144,6 +149,7 @@ Radek Rafael Garau Rainulf Pineda Ralph +Ratten rcmaniac rebeka-catalina repat @@ -151,6 +157,7 @@ Ricardo Pereira RJ Madsen Roland Häder Rui Andrada +S.Krumbholz Sakałoŭ Alaksiej Sam Sandro Santilli From 7eee227698a1b7bbc97129e4dd414307fa51642d Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 27 Nov 2017 19:20:43 +0100 Subject: [PATCH 166/175] missing false for the tagcloud settings --- include/features.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/features.php b/include/features.php index fcd2148b4..e03dc4a5b 100644 --- a/include/features.php +++ b/include/features.php @@ -114,7 +114,7 @@ function get_features($filtered = true) { 'advanced_profile' => array( t('Advanced Profile Settings'), array('forumlist_profile', t('List Forums'), t('Show visitors public community forums at the Advanced Profile Page'), false, Config::get('feature_lock','forumlist_profile', false)), - array('tagadelic', t('Tag Cloud'), t('Provide a personal tag cloud on your profile page'), false, Config::get('feature_lock', 'tagadelic')), + array('tagadelic', t('Tag Cloud'), t('Provide a personal tag cloud on your profile page'), false, Config::get('feature_lock', 'tagadelic', false)), ), ); From 16fb01454759dfe2c127c3656a0982e84fa6f8f8 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 27 Nov 2017 14:03:47 -0500 Subject: [PATCH 167/175] Hotfix missing use dba --- src/Worker/Queue.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Worker/Queue.php b/src/Worker/Queue.php index 35642ae72..47f1c8044 100644 --- a/src/Worker/Queue.php +++ b/src/Worker/Queue.php @@ -13,6 +13,7 @@ use Friendica\Database\DBM; use Friendica\Protocol\Diaspora; use Friendica\Protocol\DFRN; use Friendica\Protocol\PortableContact; +use dba; require_once 'include/queue_fn.php'; require_once 'include/datetime.php'; From f5715cece99d03d058def65a9d4695a2f660b578 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Tue, 28 Nov 2017 01:08:03 +0100 Subject: [PATCH 168/175] acl: only one forum account should be selectable --- js/acl.js | 88 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 62 insertions(+), 26 deletions(-) diff --git a/js/acl.js b/js/acl.js index 9a575729f..257e2c158 100644 --- a/js/acl.js +++ b/js/acl.js @@ -7,12 +7,15 @@ function ACL(backend_url, preset, automention, is_mobile){ this.kp_timer = null; - if (preset==undefined) preset = []; + if (preset == undefined) { + preset = []; + } this.allow_cid = (preset[0] || []); this.allow_gid = (preset[1] || []); this.deny_cid = (preset[2] || []); this.deny_gid = (preset[3] || []); this.group_uids = []; + this.forumCache = null; if (this.is_mobile) { this.nw = 1; @@ -25,7 +28,9 @@ function ACL(backend_url, preset, automention, is_mobile){ this.item_tpl = unescape($(".acl-list-item[rel=acl-template]").html()); this.showall = $("#acl-showall"); - if (preset.length==0) this.showall.addClass("selected"); + if (preset.length==0) { + this.showall.addClass("selected"); + } /*events*/ this.showall.click(this.on_showall.bind(this)); @@ -61,7 +66,7 @@ ACL.prototype.remove_mention = function(id) { } var end = start + searchText.length; this.element.setSelection(start, end).replaceSelectedText('').collapseSelection(false); -} +}; ACL.prototype.add_mention = function(id) { if (!this.automention) { @@ -96,18 +101,18 @@ ACL.prototype.on_submit = function(){ $(this.deny_cid).each(function(i,v){ aclfields.append(""); }); -} +}; ACL.prototype.search = function(){ var srcstr = $("#acl-search").val(); this.list_content.html(""); this.get(0,100, srcstr); -} +}; ACL.prototype.on_search = function(event){ if (this.kp_timer) clearTimeout(this.kp_timer); this.kp_timer = setTimeout( this.search.bind(this), 1000); -} +}; ACL.prototype.on_showall = function(event){ event.preventDefault() @@ -126,7 +131,7 @@ ACL.prototype.on_showall = function(event){ this.update_view(); return false; -} +}; ACL.prototype.on_button_show = function(event){ event.preventDefault() @@ -136,7 +141,8 @@ ACL.prototype.on_button_show = function(event){ this.set_allow($(event.target).parent().attr('id')); return false; -} +}; + ACL.prototype.on_button_hide = function(event){ event.preventDefault() event.stopImmediatePropagation() @@ -145,34 +151,50 @@ ACL.prototype.on_button_hide = function(event){ this.set_deny($(event.target).parent().attr('id')); return false; -} +}; -ACL.prototype.set_allow = function(itemid){ +ACL.prototype.set_allow = function(itemid) { type = itemid[0]; - id = parseInt(itemid.substr(1)); + id = parseInt(itemid.substr(1)); - switch(type){ + switch (type){ case "g": - if (this.allow_gid.indexOf(id)<0){ - this.allow_gid.push(id) + if (this.allow_gid.indexOf(id) < 0) { + this.allow_gid.push(id); }else { this.allow_gid.remove(id); } - if (this.deny_gid.indexOf(id)>=0) this.deny_gid.remove(id); + if (this.deny_gid.indexOf(id) >= 0) { + this.deny_gid.remove(id); + } break; case "c": - if (this.allow_cid.indexOf(id)<0){ - this.allow_cid.push(id) - if (this.data[id].forum=="1") this.add_mention(id); + if (this.allow_cid.indexOf(id) < 0){ + this.allow_cid.push(id); + if (this.data[id].forum == "1") { + // If we have select already a forum, + // we need to remove the old one (because friendica does + // allow only one forum as receiver). + if (this.forumCache !== null && this.forumCache !== id) { + this.deselectCid(this.forumCache); + } + // Update the forum cache. + this.forumCache = id; + this.add_mention(id); + } } else { this.allow_cid.remove(id); - if (this.data[id].forum=="1") this.remove_mention(id); + if (this.data[id].forum == "1") { + this.remove_mention(id); + } + } + if (this.deny_cid.indexOf(id) >=0 ) { + this.deny_cid.remove(id); } - if (this.deny_cid.indexOf(id)>=0) this.deny_cid.remove(id); break; } this.update_view(); -} +}; ACL.prototype.set_deny = function(itemid){ type = itemid[0]; @@ -198,12 +220,12 @@ ACL.prototype.set_deny = function(itemid){ break; } this.update_view(); -} +}; ACL.prototype.is_show_all = function() { return (this.allow_gid.length==0 && this.allow_cid.length==0 && this.deny_gid.length==0 && this.deny_cid.length==0); -} +}; ACL.prototype.update_view = function(){ if (this.is_show_all()){ @@ -279,7 +301,6 @@ ACL.prototype.update_view = function(){ } - ACL.prototype.get = function(start,count, search){ var postdata = { start:start, @@ -294,7 +315,7 @@ ACL.prototype.get = function(start,count, search){ dataType: 'json', success:this.populate.bind(this) }); -} +}; ACL.prototype.populate = function(data){ var height = Math.ceil(data.tot / this.nw) * 42; @@ -319,5 +340,20 @@ ACL.prototype.populate = function(data){ }); this.update_view(); -} +}; +/** + * @brief Deselect previous selected contact. + * + * @param {int} id The contact ID. + * @returns {void} + */ +ACL.prototype.deselectCid = function(id) { + if (this.allow_cid.indexOf(id) >= 0) { + this.allow_cid.remove(id); + } + if (this.deny_cid.indexOf(id) >=0 ) { + this.deny_cid.remove(id); + } + this.remove_mention(id); +}; From 9f845b02797038896793cf60689d98dd7a0371a2 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Tue, 28 Nov 2017 14:29:50 +0100 Subject: [PATCH 169/175] Events doc is not in DE, but had a from link to the doc home page --- doc/de/Home.md | 2 +- doc/de/events.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/de/Home.md b/doc/de/Home.md index c76a91f53..4ddc1e918 100644 --- a/doc/de/Home.md +++ b/doc/de/Home.md @@ -11,7 +11,7 @@ Friendica - Dokumentation und Ressourcen * [Beiträge kommentieren, einordnen und löschen](help/Text_comment) * [Profile](help/Profiles) * [Referenz der Accesskeys](help/Accesskeys) - * [Veranstaltungen](help/events) (EN) + * [Veranstaltungen](help/events) * Du und andere Nutzer * [Konnektoren (Connectors)](help/Connectors) * [Freunde finden](help/Making-Friends) diff --git a/doc/de/events.md b/doc/de/events.md index 809b8c0e4..b4979da1d 100644 --- a/doc/de/events.md +++ b/doc/de/events.md @@ -1,6 +1,6 @@ # Veranstaltungen -* [Home](Zur Startseite der Hilfe) +* [Zur Startseite der Hilfe](help) Veranstaltungen sind spezielle Postings. Die Veranstaltungen, die Du und deine Kontakte teilen, können unter [/events](/events) auf deiner Instanz aufgefunden werden. From 8bffee43b3bb5f5ddcdf525511659681d2b6914c Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 28 Nov 2017 18:54:39 +0000 Subject: [PATCH 170/175] Threads are now always enabled. --- include/conversation.php | 6 ++---- mod/admin.php | 6 ------ src/App.php | 2 -- src/Object/Item.php | 5 +---- view/templates/admin_site.tpl | 12 ++---------- view/theme/frost-mobile/templates/admin_site.tpl | 1 - view/theme/frost-mobile/theme.php | 1 - view/theme/frost/templates/admin_site.tpl | 1 - view/theme/frost/theme.php | 1 - 9 files changed, 5 insertions(+), 30 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 7e6fefc64..bba852e7a 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1517,15 +1517,13 @@ function conv_sort(array $item_list, $order) usort($parents, 'sort_thr_commented'); } - $thread_allowed = Config::get('system', 'thread_allow') && get_app()->theme_thread_allow; - /* * Plucks children from the item_array, second pass collects eventual orphan * items and add them as children of their top-level post. */ foreach ($parents as $i => $parent) { $parents[$i]['children'] = - array_merge(get_item_children($item_array, $parent, $thread_allowed), + array_merge(get_item_children($item_array, $parent, true), get_item_children($item_array, $parent, false)); } @@ -1533,7 +1531,7 @@ function conv_sort(array $item_list, $order) $parents[$i]['children'] = sort_item_children($parents[$i]['children']); } - if ($thread_allowed && PConfig::get(local_user(), 'system', 'smart_threading', 0)) { + if (PConfig::get(local_user(), 'system', 'smart_threading', 0)) { foreach ($parents as $i => $parent) { $parents[$i] = smart_flatten_conversation($parent); } diff --git a/mod/admin.php b/mod/admin.php index 4b3e01b3d..4b034b8cc 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -814,7 +814,6 @@ function admin_page_site_post(App $a) { $block_public = ((x($_POST,'block_public')) ? True : False); $force_publish = ((x($_POST,'publish_all')) ? True : False); $global_directory = ((x($_POST,'directory')) ? notags(trim($_POST['directory'])) : ''); - $thread_allow = ((x($_POST,'thread_allow')) ? True : False); $newuser_private = ((x($_POST,'newuser_private')) ? True : False); $enotify_no_content = ((x($_POST,'enotify_no_content')) ? True : False); $private_addons = ((x($_POST,'private_addons')) ? True : False); @@ -874,9 +873,6 @@ function admin_page_site_post(App $a) { if ($a->get_path() != "") { $diaspora_enabled = false; } - if (!$thread_allow) { - $ostatus_disabled = true; - } if ($ssl_policy != intval(Config::get('system','ssl_policy'))) { if ($ssl_policy == SSL_POLICY_FULL) { q("UPDATE `contact` SET @@ -975,7 +971,6 @@ function admin_page_site_post(App $a) { Config::set('system', 'allowed_email', $allowed_email); Config::set('system', 'block_public', $block_public); Config::set('system', 'publish_all', $force_publish); - Config::set('system', 'thread_allow', $thread_allow); Config::set('system', 'newuser_private', $newuser_private); Config::set('system', 'enotify_no_content', $enotify_no_content); Config::set('system', 'disable_embedded', $disable_embedded); @@ -1214,7 +1209,6 @@ function admin_page_site(App $a) { '$block_public' => array('block_public', t("Block public"), Config::get('system','block_public'), t("Check to block public access to all otherwise public personal pages on this site unless you are currently logged in.")), '$force_publish' => array('publish_all', t("Force publish"), Config::get('system','publish_all'), t("Check to force all profiles on this site to be listed in the site directory.")), '$global_directory' => array('directory', t("Global directory URL"), Config::get('system','directory'), t("URL to the global directory. If this is not set, the global directory is completely unavailable to the application.")), - '$thread_allow' => array('thread_allow', t("Allow threaded items"), Config::get('system','thread_allow'), t("Allow infinite level threading for items on this site.")), '$newuser_private' => array('newuser_private', t("Private posts by default for new users"), Config::get('system','newuser_private'), t("Set default post permissions for all new members to the default privacy group rather than public.")), '$enotify_no_content' => array('enotify_no_content', t("Don't include post content in email notifications"), Config::get('system','enotify_no_content'), t("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.")), '$private_addons' => array('private_addons', t("Disallow public access to addons listed in the apps menu."), Config::get('config','private_addons'), t("Checking this box will restrict addons listed in the apps menu to members only.")), diff --git a/src/App.php b/src/App.php index ab64d7a3f..3e34d3c5a 100644 --- a/src/App.php +++ b/src/App.php @@ -73,7 +73,6 @@ class App { public $videowidth = 425; public $videoheight = 350; public $force_max_items = 0; - public $theme_thread_allow = true; public $theme_events_in_profile = true; /** @@ -87,7 +86,6 @@ class App { 'videowidth' => 425, 'videoheight' => 350, 'force_max_items' => 0, - 'thread_allow' => true, 'stylesheet' => '', 'template_engine' => 'smarty3', ); diff --git a/src/Object/Item.php b/src/Object/Item.php index 2bfdc6895..c51c21366 100644 --- a/src/Object/Item.php +++ b/src/Object/Item.php @@ -66,7 +66,7 @@ class Item extends BaseObject $ssl_state = ((local_user()) ? true : false); $this->redirect_url = 'redir/' . $this->getDataValue('cid'); - if (Config::get('system', 'thread_allow') && $a->theme_thread_allow && !$this->isToplevel()) { + if (!$this->isToplevel()) { $this->threaded = true; } @@ -744,9 +744,6 @@ class Item extends BaseObject private function getCommentBox($indent) { $a = self::getApp(); - if (!$this->isToplevel() && !(Config::get('system', 'thread_allow') && $a->theme_thread_allow)) { - return ''; - } $comment_box = ''; $conv = $this->getConversation(); diff --git a/view/templates/admin_site.tpl b/view/templates/admin_site.tpl index 9f25ac085..9f7b3601e 100644 --- a/view/templates/admin_site.tpl +++ b/view/templates/admin_site.tpl @@ -83,15 +83,8 @@ {{include file="field_select.tpl" field=$community_page_style}} {{include file="field_input.tpl" field=$max_author_posts_community_page}} - {{if $thread_allow.2}} - {{include file="field_checkbox.tpl" field=$ostatus_disabled}} - {{include file="field_checkbox.tpl" field=$ostatus_full_threads}} - {{else}} -
    - - {{$ostatus_not_able}} -
    - {{/if}} + {{include file="field_checkbox.tpl" field=$ostatus_disabled}} + {{include file="field_checkbox.tpl" field=$ostatus_full_threads}} {{if $diaspora_able}} {{include file="field_checkbox.tpl" field=$diaspora_enabled}} @@ -104,7 +97,6 @@ {{include file="field_checkbox.tpl" field=$dfrn_only}} {{include file="field_input.tpl" field=$global_directory}}
    - {{include file="field_checkbox.tpl" field=$thread_allow}} {{include file="field_checkbox.tpl" field=$newuser_private}} {{include file="field_checkbox.tpl" field=$enotify_no_content}} {{include file="field_checkbox.tpl" field=$private_addons}} diff --git a/view/theme/frost-mobile/templates/admin_site.tpl b/view/theme/frost-mobile/templates/admin_site.tpl index 95d13c019..d5b64e58d 100644 --- a/view/theme/frost-mobile/templates/admin_site.tpl +++ b/view/theme/frost-mobile/templates/admin_site.tpl @@ -43,7 +43,6 @@ {{include file="field_checkbox.tpl" field=$diaspora_enabled}} {{include file="field_checkbox.tpl" field=$dfrn_only}} {{include file="field_input.tpl" field=$global_directory}} - {{include file="field_checkbox.tpl" field=$thread_allow}} {{include file="field_checkbox.tpl" field=$newuser_private}} {{include file="field_checkbox.tpl" field=$enotify_no_content}} {{include file="field_checkbox.tpl" field=$private_addons}} diff --git a/view/theme/frost-mobile/theme.php b/view/theme/frost-mobile/theme.php index 20b304d87..68b3ad710 100644 --- a/view/theme/frost-mobile/theme.php +++ b/view/theme/frost-mobile/theme.php @@ -16,7 +16,6 @@ function frost_mobile_init(App $a) { $a->sourcename = 'Friendica mobile web'; $a->videowidth = 250; $a->videoheight = 200; - $a->theme_thread_allow = false; $a->force_max_items = 10; $a->set_template_engine('smarty3'); } diff --git a/view/theme/frost/templates/admin_site.tpl b/view/theme/frost/templates/admin_site.tpl index cc301a2dc..8dcfa9129 100644 --- a/view/theme/frost/templates/admin_site.tpl +++ b/view/theme/frost/templates/admin_site.tpl @@ -43,7 +43,6 @@ {{include file="field_checkbox.tpl" field=$diaspora_enabled}} {{include file="field_checkbox.tpl" field=$dfrn_only}} {{include file="field_input.tpl" field=$global_directory}} - {{include file="field_checkbox.tpl" field=$thread_allow}} {{include file="field_checkbox.tpl" field=$newuser_private}} {{include file="field_checkbox.tpl" field=$enotify_no_content}} {{include file="field_checkbox.tpl" field=$private_addons}} diff --git a/view/theme/frost/theme.php b/view/theme/frost/theme.php index a504a542d..5023aeb9b 100644 --- a/view/theme/frost/theme.php +++ b/view/theme/frost/theme.php @@ -15,7 +15,6 @@ use Friendica\Core\System; function frost_init(App $a) { $a->videowidth = 400; $a->videoheight = 330; - $a->theme_thread_allow = false; $a->set_template_engine('smarty3'); } From a926c8ce4c363dd5084d790d72d4cc9371d619e5 Mon Sep 17 00:00:00 2001 From: hoergen Date: Wed, 29 Nov 2017 17:12:25 +0100 Subject: [PATCH 171/175] added some more minimalism, added annotations, removed some blank lines --- view/theme/vier/plusminus.css | 114 +++++++++++++++++++++++++++------- 1 file changed, 90 insertions(+), 24 deletions(-) diff --git a/view/theme/vier/plusminus.css b/view/theme/vier/plusminus.css index 6829487d6..c9c736b66 100644 --- a/view/theme/vier/plusminus.css +++ b/view/theme/vier/plusminus.css @@ -1,6 +1,5 @@ - - /* Modifications by https://horche.demkontinuum.de/profile/hoergen */ + h1 { font-size: 18px; color: blue; @@ -9,8 +8,7 @@ h1 { h2 { font-size: 16px; color: blue; - background-color: whitesmoke; -/* background-color: #ededed; */ + background-color: #EEEEEE; } h3 { @@ -61,7 +59,6 @@ nav a:hover, } nav .nav-notify { -/* background-color: #427FED; */ background-color: #CB4437; top: -3px; right: -4px; @@ -76,7 +73,6 @@ nav .nav-menu-icon .nav-notify { nav .nav-menu.selected a { color: #000; -/* font-weight: bold; */ } nav .nav-menu:hover, @@ -204,18 +200,39 @@ nav #nav-search-box #nav-search-text { } .widget h3 { - padding: 0px; - margin: 0px; - font-size: 14px; - font-weight: initial; - background-color: #EEEEEE; + padding: 0px; + margin: 0px; + font-size: 14px; + font-weight: initial; + background-color: #EEEEEE; + color: #505050; + font-weight: bolder; } +/* Timeline */ + +div.pager, ul.tabs { + border-radius:5px; +} + +/* Post*/ + +#profile-jot-form { + border-radius: 5px; +} + +.tread-wrapper { + border-radius: 5px; +} + + +/* Post header */ + .wall-item-container .wall-item-name, .wall-item-container .shared-author { - color: #AAA; + color: #555; font-weight: normal; - font-size:13px; + font-size:10px; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; @@ -236,19 +253,63 @@ nav #nav-search-box #nav-search-text { transition: all 0.2s ease-in-out; } +.dt-published { + font-size:10px; +} + +/* Post content */ +.wall-item-content blockquote { + border-left: 2px solid #D2D2D2; + margin-top: 10px; + margin-bottom:10px; +} + +.wall-item-content strong { + color:#565656; +} + +.wall-item-network { + font-size:10px; +} + +.mention { font-size:12px;} + +.tag { + font-size:12px; +} + +.type-link, .type-video { + border-top: 0px solid #D2D2D2; + border-bottom: 0px solid #D2D2D2; + display: block; + padding-top: 5px; + padding-bottom: 5px; + margin-top: 20px; +} + +.type-link blockquote{ + border-left: 2px solid #D2D2D2; + margin-top: 10px; + margin-bottom:10px; + padding-left: 5px; + font-size:12px; + +} + +/* Post footer */ .wall-item-like { font-size:12px; } - -.wall-item-actions-autho{ - font-size:12px; +.wall-item-actions-author{ + font-size:10px; font-weight:normal; margin-bottom: -0.7em; + line-height: 5px; } .wall-item-tags { - font-size:12px; + font-size:10px; } .wall-item-container.comment .contact-photo { height:25px; width:25px;} @@ -274,15 +335,23 @@ nav #nav-search-box #nav-search-text { .wall-item-bottom { - font-size: 14px; + font-size: 14px; + +} +/* comments */ + +.wall-item-like { font-size:10px; } + +.wall-item-container.comment { + border-bottom: 0px; } .hide-comments-outer { margin-left: 80px; margin-bottom: 5px; width: 660px; - border-bottom: 1px solid #BDCDD4; - border-top: 1px solid #BDCDD4; + border-bottom: 0px; + border-top: 0px; font-size: 10px; padding: 8px; } @@ -290,9 +359,6 @@ nav #nav-search-box #nav-search-text { .fakelink { color: #36c; - /* color: #3e3e8c; */ - /* color: #3465A4; */ - /* color: #3E3E8C; */ text-decoration: none; font-size: 10px; cursor: pointer; @@ -343,7 +409,7 @@ select { option { background:white; - border-top:2px solid #000; + border-top:0px solid #000; height:15px; font-size:10px; From 52625653d389c9c8d484781059a11f626e8f6a7a Mon Sep 17 00:00:00 2001 From: hoergen Date: Wed, 29 Nov 2017 17:43:09 +0100 Subject: [PATCH 172/175] removed tabsi, removed some blank lines. --- view/theme/vier/plusminus.css | 187 +++++++++++++--------------------- 1 file changed, 73 insertions(+), 114 deletions(-) diff --git a/view/theme/vier/plusminus.css b/view/theme/vier/plusminus.css index c9c736b66..47bd002ac 100644 --- a/view/theme/vier/plusminus.css +++ b/view/theme/vier/plusminus.css @@ -1,36 +1,35 @@ /* Modifications by https://horche.demkontinuum.de/profile/hoergen */ h1 { - font-size: 18px; - color: blue; + font-size: 18px; + color: blue; } h2 { - font-size: 16px; - color: blue; - background-color: #EEEEEE; + font-size: 16px; + color: blue; + background-color: #EEEEEE; } h3 { - font-size: 14px; - color: blue; + font-size: 14px; + color: blue; } -h4 { font-size: 14px;} +h4 { font-size: 14px;} .settings-heading { - - font-size: 18px; - color: black; - font-weight: bold; - background-color: #cfcece; + font-size: 18px; + color: black; + font-weight: bold; + background-color: #cfcece; } .setings-contend-block { - background-color: white; + background-color: white; } #settings-form { - background-color: whitesmoke; + background-color: whitesmoke; } nav { @@ -200,31 +199,26 @@ nav #nav-search-box #nav-search-text { } .widget h3 { - padding: 0px; - margin: 0px; - font-size: 14px; - font-weight: initial; - background-color: #EEEEEE; - color: #505050; - font-weight: bolder; + padding: 0px; + margin: 0px; + font-size: 14px; + font-weight: initial; + background-color: #EEEEEE; + color: #505050; + font-weight: bolder; } /* Timeline */ div.pager, ul.tabs { - border-radius:5px; + border-radius:5px; } /* Post*/ -#profile-jot-form { - border-radius: 5px; -} - -.tread-wrapper { - border-radius: 5px; -} +#profile-jot-form { border-radius: 5px; } +.tread-wrapper { border-radius: 5px; } /* Post header */ @@ -253,98 +247,77 @@ div.pager, ul.tabs { transition: all 0.2s ease-in-out; } -.dt-published { - font-size:10px; -} +.dt-published { font-size:10px; } /* Post content */ .wall-item-content blockquote { - border-left: 2px solid #D2D2D2; - margin-top: 10px; - margin-bottom:10px; + border-left: 2px solid #D2D2D2; + margin-top: 10px; + margin-bottom:10px; } -.wall-item-content strong { - color:#565656; -} +.wall-item-content strong { color:#565656; } -.wall-item-network { - font-size:10px; -} +.wall-item-network { font-size:10px; } .mention { font-size:12px;} -.tag { - font-size:12px; -} +.tag { font-size:12px; } .type-link, .type-video { - border-top: 0px solid #D2D2D2; - border-bottom: 0px solid #D2D2D2; - display: block; - padding-top: 5px; - padding-bottom: 5px; - margin-top: 20px; + border-top: 0px solid #D2D2D2; + border-bottom: 0px solid #D2D2D2; + display: block; + padding-top: 5px; + padding-bottom: 5px; + margin-top: 20px; } .type-link blockquote{ - border-left: 2px solid #D2D2D2; - margin-top: 10px; - margin-bottom:10px; - padding-left: 5px; - font-size:12px; - + border-left: 2px solid #D2D2D2; + margin-top: 10px; + margin-bottom:10px; + padding-left: 5px; + font-size:12px; } /* Post footer */ -.wall-item-like { - font-size:12px; -} +.wall-item-like { font-size:12px; } .wall-item-actions-author{ - font-size:10px; - font-weight:normal; - margin-bottom: -0.7em; - line-height: 5px; + font-size:10px; + font-weight:normal; + margin-bottom: -0.7em; + line-height: 5px; } -.wall-item-tags { - font-size:10px; -} +.wall-item-tags { font-size:10px; } .wall-item-container.comment .contact-photo { height:25px; width:25px;} -#item-delete-selected { - font-size:12px; -} +#item-delete-selected { font-size:12px; } .item-select { - width: 1px; - height: 1px; - background: #000; - position: relative; - border-radius: 9px; + width: 1px; + height: 1px; + background: #000; + position: relative; + border-radius: 9px; } - .contact-menu { - font-size:12px; - padding-top:0px; - padding-bottom:0px; + font-size:12px; + padding-top:0px; + padding-bottom:0px; } +.wall-item-bottom { font-size: 14px; } -.wall-item-bottom { - font-size: 14px; - -} /* comments */ .wall-item-like { font-size:10px; } -.wall-item-container.comment { - border-bottom: 0px; -} +.wall-item-container.comment { border-bottom: 0px; } .hide-comments-outer { margin-left: 80px; @@ -356,7 +329,6 @@ div.pager, ul.tabs { padding: 8px; } - .fakelink { color: #36c; text-decoration: none; @@ -365,40 +337,32 @@ div.pager, ul.tabs { } /* Calendar */ -.fc-body { - background-color: white; -} + +.fc-body { background-color: white; } .fc-content, .fc-widget { - background-color: #a7ecff; - color: black; - text-decoration: normal; + background-color: #a7ecff; + color: black; + text-decoration: normal; } .fc-toolbar { - text-align: center; - margin-bottom: 1em; - background: white; -}:wq - + text-align: center; + margin-bottom: 1em; + background: white; +} .fc-day-grid-event .fc-time { - font-weight: normal; - font-size: 10px; -} - -.fc-title, fc-time { - text-decoration: normal; -} - - -.fc-unthemed .fc-today { - background: #f9ff97; + font-weight: normal; + font-size: 10px; } +.fc-title, fc-time { text-decoration: normal; } +.fc-unthemed .fc-today { background: #f9ff97; } /* remove standard-styles */ + select { -webkit-appearance: none; -moz-appearance: none; @@ -412,10 +376,8 @@ option { border-top:0px solid #000; height:15px; font-size:10px; - } - /* styling */ select { border: 1px solid #bbb; @@ -424,6 +386,3 @@ select { height:20px; } - - - From fe348acb49e9c80028fe6618f10f8b894510a84b Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 29 Nov 2017 20:59:06 +0000 Subject: [PATCH 173/175] Small fixes to "nogroup" --- mod/nogroup.php | 2 +- src/Object/Contact.php | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/mod/nogroup.php b/mod/nogroup.php index a66a70a1e..5fb9afc2a 100644 --- a/mod/nogroup.php +++ b/mod/nogroup.php @@ -55,7 +55,7 @@ function nogroup_content(App $a) 'about' => $contact_details['about'], 'sparkle' => $sparkle, 'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']), - 'url' => $url, + 'url' => $rr['url'], 'network' => network_to_name($rr['network'], $url), ); } diff --git a/src/Object/Contact.php b/src/Object/Contact.php index d7e785362..919113672 100644 --- a/src/Object/Contact.php +++ b/src/Object/Contact.php @@ -477,12 +477,14 @@ class Contact extends BaseObject "SELECT COUNT(*) AS `total` FROM `contact` WHERE `uid` = %d - AND `self` = 0 + AND NOT `self` + AND NOT `blocked` + AND NOT `pending` AND `id` NOT IN ( SELECT DISTINCT(`contact-id`) FROM `group_member` WHERE `uid` = %d - ) ", intval($uid), intval($uid) + )", intval($uid), intval($uid) ); return $r; @@ -492,13 +494,13 @@ class Contact extends BaseObject "SELECT * FROM `contact` WHERE `uid` = %d - AND `self` = 0 + AND NOT `self` + AND NOT `blocked` + AND NOT `pending` AND `id` NOT IN ( SELECT DISTINCT(`contact-id`) FROM `group_member` WHERE `uid` = %d ) - AND `blocked` = 0 - AND `pending` = 0 LIMIT %d, %d", intval($uid), intval($uid), intval($start), intval($count) ); return $r; From 0982b0413b33805eed5a81d8d7beb13c39da4d60 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 29 Nov 2017 21:27:39 +0000 Subject: [PATCH 174/175] Bugfix for "Call to undefined function best_link_url()" --- include/event.php | 1 + include/text.php | 1 + src/Object/Item.php | 1 + 3 files changed, 3 insertions(+) diff --git a/include/event.php b/include/event.php index 4ecc411b7..a0509aa0f 100644 --- a/include/event.php +++ b/include/event.php @@ -12,6 +12,7 @@ use Friendica\Database\DBM; require_once 'include/bbcode.php'; require_once 'include/map.php'; require_once 'include/datetime.php'; +require_once "include/conversation.php"; function format_event_html($ev, $simple = false) { if (! ((is_array($ev)) && count($ev))) { diff --git a/include/text.php b/include/text.php index 5df1d65ce..9a3d24bd1 100644 --- a/include/text.php +++ b/include/text.php @@ -10,6 +10,7 @@ use Friendica\Database\DBM; require_once "include/friendica_smarty.php"; require_once "include/map.php"; require_once "mod/proxy.php"; +require_once "include/conversation.php"; /** * This is our template processor diff --git a/src/Object/Item.php b/src/Object/Item.php index c51c21366..cd05b91cf 100644 --- a/src/Object/Item.php +++ b/src/Object/Item.php @@ -13,6 +13,7 @@ use dba; require_once 'include/text.php'; require_once 'boot.php'; +require_once "include/conversation.php"; /** * An item From 346820990cb3059798c327f2fdb79c938407c80a Mon Sep 17 00:00:00 2001 From: hoergen Date: Thu, 30 Nov 2017 00:13:16 +0100 Subject: [PATCH 175/175] added some styles and removed typos --- view/theme/vier/plusminus.css | 61 ++++++++++++++++++++++++++++------- 1 file changed, 49 insertions(+), 12 deletions(-) diff --git a/view/theme/vier/plusminus.css b/view/theme/vier/plusminus.css index 47bd002ac..77e8d3895 100644 --- a/view/theme/vier/plusminus.css +++ b/view/theme/vier/plusminus.css @@ -9,6 +9,7 @@ h2 { font-size: 16px; color: blue; background-color: #EEEEEE; + border-radius:5px; } h3 { @@ -17,20 +18,13 @@ h3 { } h4 { font-size: 14px;} -.settings-heading { - font-size: 18px; +h5 { + font-size: 16px; color: black; - font-weight: bold; background-color: #cfcece; + border-radius:5px; } -.setings-contend-block { - background-color: white; -} - -#settings-form { - background-color: whitesmoke; -} nav { background: #fff; @@ -201,11 +195,13 @@ nav #nav-search-box #nav-search-text { .widget h3 { padding: 0px; margin: 0px; + border-radius:5px; font-size: 14px; font-weight: initial; background-color: #EEEEEE; color: #505050; font-weight: bolder; + width: 100%; } /* Timeline */ @@ -254,6 +250,7 @@ div.pager, ul.tabs { border-left: 2px solid #D2D2D2; margin-top: 10px; margin-bottom:10px; + padding-left: 5px; } .wall-item-content strong { color:#565656; } @@ -291,6 +288,10 @@ div.pager, ul.tabs { line-height: 5px; } +.icon-commenting::before { + font-size: 17px; +} + .wall-item-tags { font-size:10px; } .wall-item-container.comment .contact-photo { height:25px; width:25px;} @@ -374,8 +375,8 @@ select { option { background:white; border-top:0px solid #000; - height:15px; - font-size:10px; + height:18px; + font-size:14px; } /* styling */ @@ -386,3 +387,39 @@ select { height:20px; } +/* Settings */ + +.ps-theme-default h1,h2,h3,h4,h5{ + color:black; + border-radius:5px; +} + +.settings-heading * { + color: black; +} + +.settings-heading { + font-size: 18px; + font-weight: bold; + background-color: #cfcece; + border-radius: 5px; +} + +.setings-contend-block { + background-color: white; +} + +#settings-form { + background-color: whitesmoke; +} + +.field_help { + font-size:12px; + display: block; + margin-left: 20px; + color: #666666; +} + +.field label { + width: 300px; +}