PHP code style adjustments
This commit is contained in:
parent
978caa90b3
commit
9e76acd9a8
@ -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!');
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user