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:
parent
0c4f8277e6
commit
4a95ca280d
42 changed files with 43 additions and 218 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue