The hash, file extension and dimensions are determined by the `UserAvatarImporter` anyway and do not need to be given as a parameter.
$source .= $row['avatar_location'];
}
- $avatarExtension = \pathinfo($avatarName, \PATHINFO_EXTENSION);
-
$data = [
'avatarName' => $avatarName,
- 'avatarExtension' => $avatarExtension,
'userID' => $row['pp_member_id'],
];
while ($row = $statement->fetchArray()) {
$avatarName = \basename($row['pp_main_photo']);
$source = $this->fileSystemPath . 'uploads/' . $row['pp_main_photo'];
- $avatarExtension = \pathinfo($avatarName, \PATHINFO_EXTENSION);
$data = [
'avatarName' => $avatarName,
- 'avatarExtension' => $avatarExtension,
'userID' => $row['member_id'],
];
$data = [
'avatarName' => \basename($filepath),
- 'avatarExtension' => \pathinfo($filepath, \PATHINFO_EXTENSION),
'userID' => $row['userid'],
];
while ($row = $statement->fetchArray()) {
$path = Url::parse($row['avatar']);
- [$width, $height] = \explode('|', $row['avatardimensions']);
$data = [
'avatarName' => \basename($path['path']),
- 'avatarExtension' => \pathinfo($path['path'], \PATHINFO_EXTENSION),
- 'width' => $width,
- 'height' => $height,
'userID' => $row['uid'],
];
$data = [
'avatarName' => \basename($row['user_avatar']),
- 'avatarExtension' => $extension,
'userID' => $row['user_id'],
];
$data = [
'avatarName' => \basename($row['user_avatar']),
- 'avatarExtension' => $extension,
'userID' => $row['user_id'],
];
$data = [
'avatarName' => \basename($row['avatarName']),
- 'avatarExtension' => \pathinfo($row['avatarName'], \PATHINFO_EXTENSION),
'userID' => $row['id_member'],
];
$data = [
'avatarName' => StringUtil::decodeHTML($row['filename']),
- 'avatarExtension' => \pathinfo($row['filename'], \PATHINFO_EXTENSION),
- 'width' => $row['width'],
- 'height' => $row['height'],
'userID' => $row['userid'],
];
$data = [
'avatarName' => $row['filename'],
- 'avatarExtension' => \pathinfo($row['filename'], \PATHINFO_EXTENSION),
- 'width' => $row['width'],
- 'height' => $row['height'],
'userID' => $row['userid'],
];
$data = [
'avatarName' => $row['avatarname'],
- 'avatarExtension' => $row['avatarextension'],
- 'width' => $row['width'],
- 'height' => $row['height'],
'userID' => $row['userid'],
];
$data = [
'avatarName' => $row['avatarName'],
- 'avatarExtension' => $row['avatarExtension'],
- 'width' => $row['width'],
- 'height' => $row['height'],
'userID' => $row['userID'],
];
$data = [
'avatarName' => $row['avatarName'],
- 'avatarExtension' => $row['avatarExtension'],
- 'width' => $row['width'],
- 'height' => $row['height'],
'userID' => $row['userID'],
- 'fileHash' => $row['fileHash'],
];
ImportHandler::getInstance()
$config = $this->getConfig();
$location = $this->fileSystemPath . $config['externalDataPath'] . '/avatars/l/' . \floor($row['user_id'] / 1000) . '/' . $row['user_id'] . '.jpg';
- if (!$imageSize = @\getimagesize($location)) {
- continue;
- }
-
- switch ($imageSize[2]) {
- case \IMAGETYPE_JPEG:
- $extension = 'jpg';
- break;
- case \IMAGETYPE_PNG:
- $extension = 'png';
- break;
- case \IMAGETYPE_GIF:
- $extension = 'gif';
- }
-
- /** @noinspection PhpUndefinedVariableInspection */
$data = [
'avatarName' => '',
- 'avatarExtension' => $extension,
'userID' => $row['user_id'],
];
0,
$data,
[
- 'labelIDs' => $row['is_starred'] ? [$row['user_id']] : [], ]
+ 'labelIDs' => $row['is_starred'] ? [$row['user_id']] : [],
+ ]
);
}
}
$config = $this->getConfig();
$location = $this->fileSystemPath . $config['externalDataPath'] . '/avatars/l/' . \floor($row['user_id'] / 1000) . '/' . $row['user_id'] . '.jpg';
- if (!$imageSize = @\getimagesize($location)) {
- continue;
- }
-
- switch ($imageSize[2]) {
- case \IMAGETYPE_JPEG:
- $extension = 'jpg';
- break;
- case \IMAGETYPE_PNG:
- $extension = 'png';
- break;
- case \IMAGETYPE_GIF:
- $extension = 'gif';
- }
-
- /** @noinspection PhpUndefinedVariableInspection */
$data = [
'avatarName' => '',
- 'avatarExtension' => $extension,
'userID' => $row['user_id'],
];
0,
$data,
[
- 'labelIDs' => $row['is_starred'] ? [$row['user_id']] : [], ]
+ 'labelIDs' => $row['is_starred'] ? [$row['user_id']] : [],
+ ]
);
}
}