Skip to content

Commit

Permalink
getFileをgetCoverImageに書き換え
Browse files Browse the repository at this point in the history
  • Loading branch information
mogi committed Dec 14, 2009
1 parent a88779e commit de2a9d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/pc_frontend/modules/album/templates/listSuccess.php
Expand Up @@ -7,7 +7,7 @@
<div class="block">
<?php foreach ($pager->getResults() as $album): ?>
<div class="ditem"><div class="item"><table><tbody><tr>
<td rowspan="4" class="photo"><a href="<?php echo url_for('album_show', $album) ?>"><?php echo image_tag_sf_image($album->getFile(), array('size' => '76x76')) ?></a></td>
<td rowspan="4" class="photo"><a href="<?php echo url_for('album_show', $album) ?>"><?php echo image_tag_sf_image($album->getCoverImage(), array('size' => '76x76')) ?></a></td>
<th><?php echo __('%Nickname%') ?></th><td><?php echo $album->getMember()->getName() ?></td>
</tr><tr>
<th><?php echo __('Title') ?></th><td><?php echo op_album_get_title_and_count($album) ?></td>
Expand Down
2 changes: 1 addition & 1 deletion lib/form/doctrine/PluginAlbumForm.class.php
Expand Up @@ -75,7 +75,7 @@ public function updateObject($values = null)
{
if (!$this->isNew() && !empty($values['file_id_delete']))
{
$old = $this->getObject()->getFile();
$old = $this->getObject()->getCoverImage();
$this->getObject()->setFile(null);
$this->getObject()->save();

Expand Down
6 changes: 3 additions & 3 deletions lib/model/doctrine/PluginAlbum.class.php
Expand Up @@ -41,14 +41,14 @@ public function getNext($myMemberId = null)
return $this->next;
}

public function getFile()
public function getCoverImage()
{
$file = $this->get('File');
$file = $this->getFile();

if ($file->id)
{
return $file;
}

return null;
}

Expand Down

0 comments on commit de2a9d9

Please sign in to comment.