Version 5.0.0 beta 10
This commit is contained in:
1 parent
56979f8ee8
commit
264eeb97e0
325 files changed
+6442
-1849
No files matched your search
@@ -584,10 +584,19 @@ abstract class ActiveRecord
|
||||
$photo = new CoverPhoto;
|
||||
if( $file = $this->coverPhotoFile() )
|
||||
{
|
||||
$photoOffset = static::$databaseColumnMap[ 'cover_photo_offset' ];
|
||||
$photo->file = $file;
|
||||
$photo->offset = $this->$photoOffset ?: 0;
|
||||
|
||||
if( isset( static::$databaseColumnMap[ 'cover_photo_offset' ] ) )
|
||||
{
|
||||
$photoOffset = static::$databaseColumnMap[ 'cover_photo_offset' ];
|
||||
$photo->offset = $this->$photoOffset ?: 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$photo->offset = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$photo->editable = $this->canEdit();
|
||||
$photo->object = $this;
|
||||
return $photo;
|
||||
|
||||
Reference in new issue
Block a user