From b1548c21528cc8158f09a3acaf6fb8ef51ae7e5f Mon Sep 17 00:00:00 2001
From: Christian Schneider
Date: Wed, 13 Jan 2021 16:17:00 +0100
Subject: Unified comment style

---
 it_dbi_postgres.class | 27 ++++++++++++++-------------
 it_mail.class         |  1 -
 it_pipe.class         |  2 +-
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/it_dbi_postgres.class b/it_dbi_postgres.class
index 7ea3139..6ca4b50 100644
--- a/it_dbi_postgres.class
+++ b/it_dbi_postgres.class
@@ -22,7 +22,7 @@
 class it_dbi_postgres extends it_dbi
 {
 
-static $_global_key = 'it_dbi_postgres'; // override base class to get our own singleton
+static $_global_key = 'it_dbi_postgres'; # Override base class to get our own singleton
 
 function _where($params)
 {
@@ -59,7 +59,7 @@ function _get_field_defs()
 	list($table_name, $table_schema) = array_reverse(explode('.', $this->_p['table'], 2));
 	$where = $this->_where(['t.table_name' => $table_name, 't.table_schema' => $table_schema ?: 'public', 't.table_catalog' => $this->_p['db']]);
 
-	// recreate Key column of mysql show columns
+	# Recreate Key column of mysql show columns
 	$res = $this->query('SELECT column_name,constraint_type,ordinal_position FROM information_schema.table_constraints AS t JOIN information_schema.key_column_usage USING (constraint_name, constraint_schema, constraint_catalog) ' . $where);
 	while ($res && ($row = $this->_fetch_assoc($res)))
 	{
@@ -126,17 +126,18 @@ function _query($query, $p)
 
 	$this->_affectedrows = pg_affected_rows($result);
 	$this->_insertid = $isinsert ? $this->_fetch_assoc($result)[$this->_p['keyfield']] : 0;
-	// TODO probably PGSQl_NOTICE_ALL
-	// if (($warning = $this->_link->get_warnings()))
-	// {
-	// 	do {
-	// 		if (!it::match(trim($this->_p['ignored_warnings'] . "|1364|1261|1051|1062", "|"), $warning->errno))
-	// 			$messages[] = $warning->message . " [error $warning->errno]";
-	// 	} while ($warning->next() && ++$checked < 20);
-
-	// 	if ($messages)
-	// 		it::error(['title' => "Mysql warning: " . $messages[0], 'body' => "$query\n\n" . join("\n", $messages) . "\n"]);
-	// }
+	/* TODO probably PGSQl_NOTICE_ALL
+	if (($warning = $this->_link->get_warnings()))
+	{
+		do {
+			if (!it::match(trim($this->_p['ignored_warnings'] . "|1364|1261|1051|1062", "|"), $warning->errno))
+				$messages[] = $warning->message . " [error $warning->errno]";
+		} while ($warning->next() && ++$checked < 20);
+
+		if ($messages)
+			it::error(['title' => "Mysql warning: " . $messages[0], 'body' => "$query\n\n" . join("\n", $messages) . "\n"]);
+	}
+	*/
 
 	return $result;
 }
diff --git a/it_mail.class b/it_mail.class
index b235dee..0c5cb4a 100644
--- a/it_mail.class
+++ b/it_mail.class
@@ -472,7 +472,6 @@ static function check_email($email, $checkmailbox = false)
 
 				foreach ($mx as $mxhost => $dummy_weight)
 				{
-					//echo ">>it_mail::check_email: " . time() . " checking $mxhost\n";
 					if ($fp = @fsockopen($mxhost, $port, $dummy_errno, $dummy_errstr, 5))
 					{
 						$connected++;
diff --git a/it_pipe.class b/it_pipe.class
index a2588fe..967cc77 100644
--- a/it_pipe.class
+++ b/it_pipe.class
@@ -203,7 +203,7 @@ function csv($p = [])
 	$p = is_string($p) ? ['forceschema' => $p] : $p;
 	$counts = count_chars($this->lines[0]);
 	$splitchar = $counts[ord("\t")] ? "\t" : ($counts[ord(";")] > $counts[ord(",")] ? ";" : ",");
-	$csvhead = it::replace(['^\x{FEFF}' => ''], array_shift($this->lines)); // it::replace removes utf8 byte order mark
+	$csvhead = it::replace(['^\x{FEFF}' => ''], array_shift($this->lines));	# it::replace removes utf8 byte order mark
 	$schema = $p['forceschema'] ? explode(",", $p['forceschema']) : str_getcsv(trim($csvhead, "#\n "), $splitchar, '"'); # should function_exists('str_getcsv')
 	foreach ($schema as $idx => $col)
 		$schema[$idx] = it::replace(['^$' => "field$idx", '\W' => $p['fixcolnames'] ? "_" : '$0'], $col);
-- 
cgit v1.2.3