Browse Source

$medium should be a tinyint like defined in the database structure

Tobias Reich 9 years ago
parent
commit
b8caf48d7d
1 changed files with 3 additions and 3 deletions
  1. 3 3
      php/modules/Photo.php

+ 3 - 3
php/modules/Photo.php

@@ -123,7 +123,7 @@ class Photo extends Module {
 					$photo_name	= $exists['photo_name'];
 					$path		= $exists['path'];
 					$path_thumb	= $exists['path_thumb'];
-					$medium		= ($exists['medium']==='1' ? true : false);
+					$medium		= ($exists['medium']==='1' ? 1 : 0);
 					$exists		= true;
 				}
 
@@ -174,8 +174,8 @@ class Photo extends Module {
 				}
 
 				# Create Medium
-				if ($this->createMedium($path, $photo_name, $info['width'], $info['height'])) $medium = true;
-				else $medium = false;
+				if ($this->createMedium($path, $photo_name, $info['width'], $info['height'])) $medium = 1;
+				else $medium = 0;
 
 				# Set thumb url
 				$path_thumb = md5($id) . '.jpeg';