1
0
Fork 0

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:
Hypolite Petovan 2019-01-07 12:09:10 -05:00
commit 4a95ca280d
42 changed files with 43 additions and 218 deletions

View file

@ -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 {