From 108a892a11d737a80c1736defd1b40ba81449812 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Fri, 9 Nov 2018 05:31:55 -0500 Subject: Remove DNS check for database connection during installation. Causes friction with Docker deployment. --- include/dba/dba_driver.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/dba/dba_driver.php b/include/dba/dba_driver.php index 9533acc7f..ee0e06a91 100755 --- a/include/dba/dba_driver.php +++ b/include/dba/dba_driver.php @@ -173,14 +173,14 @@ abstract class dba_driver { return false; } - if(strlen($server) && ($server !== 'localhost') && ($server !== '127.0.0.1') && (! strpbrk($server,':;'))) { - if(! z_dns_check($server)) { - $this->error = sprintf( t('Cannot locate DNS info for database server \'%s\''), $server); - $this->connected = false; - $this->db = null; - return false; - } - } + // if(strlen($server) && ($server !== 'localhost') && ($server !== '127.0.0.1') && (! strpbrk($server,':;'))) { + // if(! z_dns_check($server)) { + // $this->error = sprintf( t('Cannot locate DNS info for database server \'%s\''), $server); + // $this->connected = false; + // $this->db = null; + // return false; + // } + // } return true; } @@ -468,7 +468,7 @@ function db_columns($table) { if(ACTIVE_DBTYPE === DBTYPE_POSTGRES) { $r = q("SELECT column_name as field FROM information_schema.columns WHERE table_schema = 'public' AND table_name = '%s'", dbesc($table) - ); + ); if($r) { return ids_to_array($r,'field'); } -- cgit v1.2.3 From d34423fce9c581bab03b7fa42721b84805d7be24 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Sat, 10 Nov 2018 11:53:49 +0100 Subject: Fixed wrong value assign on compare with 0 --- include/photo/photo_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index a4866bb60..cced7bf03 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -637,7 +637,7 @@ function import_xchan_photo($photo,$xchan,$thing = false,$force = false) { if(is_null($type)) $photo_failure = true; } - elseif($result['return_code'] = 304) { + elseif($result['return_code'] === 304) { $photo = z_root() . '/photo/' . $hash . '-4'; $thumb = z_root() . '/photo/' . $hash . '-5'; $micro = z_root() . '/photo/' . $hash . '-6'; -- cgit v1.2.3 From a49cfa81425b24c4c2b52eec67dd82649cd1bf61 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Sat, 10 Nov 2018 20:45:20 +0100 Subject: Update photo_driver.php --- include/photo/photo_driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index cced7bf03..4173d727e 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -637,7 +637,7 @@ function import_xchan_photo($photo,$xchan,$thing = false,$force = false) { if(is_null($type)) $photo_failure = true; } - elseif($result['return_code'] === 304) { + elseif($result['return_code'] == 304) { $photo = z_root() . '/photo/' . $hash . '-4'; $thumb = z_root() . '/photo/' . $hash . '-5'; $micro = z_root() . '/photo/' . $hash . '-6'; -- cgit v1.2.3