From 516c6c4e5f44808b4ec8f911b708af85fe617fff Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 24 Apr 2017 13:36:44 -0400 Subject: [PATCH] Update script Putting the dsn as define at top of file so it is easier to find and edit. --- photoGallery.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/photoGallery.php b/photoGallery.php index 794641c..0d882ea 100644 --- a/photoGallery.php +++ b/photoGallery.php @@ -2,8 +2,9 @@ $oldMask = umask(0); mkdir('images', 0770); -define('IMG_BASE_URL', 'http://is0.gaslightmedia.com/staffords/pgs1/'); -define('PHOTO_SCHEMA', 'photos'); +define('IMG_BASE_URL', 'http://is0.gaslightmedia.com/harborpointgolfclub/pgs1/'); +define('PG_DSN', 'pgsql: host=ds4 dbname=harborpointgolfclub user=postgres'); +define('PHOTO_SCHEMA', 'public'); define('PHOTO_CATEGORY', false); function grabImage($url, $saveTo) @@ -64,7 +65,7 @@ function wp_unique_filename( $dir, $filename ) { return $filename; } try { - $dsn = 'pgsql: host=ds4 dbname=staffords user=postgres'; + $dsn = PG_DSN; $driverOptions = array( PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, ); -- 2.17.1