From: Steve Sutton Date: Mon, 24 Apr 2017 17:36:44 +0000 (-0400) Subject: Update script X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=516c6c4e5f44808b4ec8f911b708af85fe617fff;p=prog%2FPhotoExporter.git Update script Putting the dsn as define at top of file so it is easier to find and edit. --- 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, );