Remove unused code
- Remove commented code - Remove unused/immediately overwritten variables - Remove extraneous parameters - Remove unreachable code - Remove duplicate array keys
This commit is contained in:
@@ -172,7 +172,6 @@ class Photo extends BaseObject
|
||||
*/
|
||||
public static function getImageForPhoto(array $photo)
|
||||
{
|
||||
$data = "";
|
||||
if ($photo["backend-class"] == "") {
|
||||
// legacy data storage in "data" column
|
||||
$i = self::selectFirst(["data"], ["id" => $photo["id"]]);
|
||||
@@ -268,7 +267,6 @@ class Photo extends BaseObject
|
||||
// if is an existing photo, reuse same backend
|
||||
$data = "";
|
||||
$backend_ref = "";
|
||||
$backend_class = "";
|
||||
|
||||
if (DBA::isResult($existing_photo)) {
|
||||
$backend_ref = (string)$existing_photo["backend-ref"];
|
||||
@@ -276,6 +274,7 @@ class Photo extends BaseObject
|
||||
} else {
|
||||
$backend_class = StorageManager::getBackend();
|
||||
}
|
||||
|
||||
if ($backend_class === "") {
|
||||
$data = $Image->asString();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user