diff --git a/php/modules/Photo.php b/php/modules/Photo.php index bc745dd..5f34ccb 100755 --- a/php/modules/Photo.php +++ b/php/modules/Photo.php @@ -18,6 +18,7 @@ class Photo extends Module { IMAGETYPE_GIF, IMAGETYPE_PNG ); + public static $validExtensions = array( '.jpg', '.jpeg', @@ -125,7 +126,7 @@ class Photo extends Module { # Verify extension $extension = getExtension($file['name']); - if (!in_array(strtolower($extension), Photo::$validExtensions, true)) { + if (!in_array(strtolower($extension), self::$validExtensions, true)) { Log::error($this->database, __METHOD__, __LINE__, 'Photo format not supported'); if ($returnOnError===true) return false; exit('Error: Photo format not supported!'); @@ -133,7 +134,7 @@ class Photo extends Module { # Verify image $type = @exif_imagetype($file['tmp_name']); - if (!in_array($type, Photo::$validTypes, true)) { + if (!in_array($type, self::$validTypes, true)) { Log::error($this->database, __METHOD__, __LINE__, 'Photo type not supported'); if ($returnOnError===true) return false; exit('Error: Photo type not supported!'); diff --git a/php/modules/Session.php b/php/modules/Session.php index 16916c9..461110e 100755 --- a/php/modules/Session.php +++ b/php/modules/Session.php @@ -40,6 +40,9 @@ class Session extends Module { # Return settings $return['config'] = $this->settings; + # Path to Lychee for the server-import dialog + $return['config']['location'] = LYCHEE; + # Remove username and password from response unset($return['config']['username']); unset($return['config']['password']); @@ -47,9 +50,6 @@ class Session extends Module { # Remove identifier from response unset($return['config']['identifier']); - # Path to Lychee for the server-import dialog - $return['config']['location'] = LYCHEE; - # Check if login credentials exist and login if they don't if ($this->noLogin()===true) { $public = false;