CC-4358: Calendar: Show Content: Undefined Index

-fixed
This commit is contained in:
denise 2012-09-05 16:07:40 -04:00
parent f86fa8f945
commit 8ec9ccedf3
3 changed files with 15 additions and 7 deletions

View File

@ -278,7 +278,7 @@ class AudiopreviewController extends Zend_Controller_Action
$elementMap = array(
'element_title' => isset($track['track_title']) ? $track['track_title'] : "",
'element_artist' => isset($track['artist_name']) ? $track['artist_name'] : "",
'element_artist' => isset($track['creator']) ? $track['creator'] : "",
'element_position' => $position,
'element_id' => ++$position,
);

View File

@ -655,6 +655,9 @@ FROM (
0::INTEGER as type ,
f.id AS item_id,
f.track_title,
f.album_title AS album,
f.genre AS genre,
f.length AS length,
f.artist_name AS creator,
f.file_exists AS EXISTS,
f.filepath AS filepath
@ -668,6 +671,9 @@ FROM (
1::INTEGER as type,
ws.id AS item_id,
(ws.name || ': ' || ws.url) AS title,
null AS album,
null AS genre,
ws.length AS length,
sub.login AS creator,
't'::boolean AS EXISTS,
ws.url AS filepath
@ -688,8 +694,10 @@ SQL;
$dt->setTimezone(new DateTimeZone(date_default_timezone_get()));
$row["starts"] = $dt->format("Y-m-d H:i:s");
$formatter = new LengthFormatter($row["clip_length"]);
$row["clip_length"] = $formatter->format();
if (isset($row['length'])) {
$formatter = new LengthFormatter($row["length"]);
$row["length"] = $formatter->format();
}
}

View File

@ -11,12 +11,12 @@
</tr>
<?php $i=0; ?>
<?php foreach($this->showContent as $row): ?>
<tr id="au_<?php echo $row["file_id"] ?>" class="<?php if($i&1){echo "even";}else{echo "odd";}?>">
<tr id="au_<?php echo $row["item_id"] ?>" class="<?php if($i&1){echo "even";}else{echo "odd";}?>">
<td><?php echo $row["starts"] ?></td>
<td><?php echo $row["track_title"] ?></td>
<td><?php echo $row["artist_name"] ?></td>
<td><?php echo $row["album_title"] ?></td>
<td class="library_length"><?php echo $row["clip_length"] ?></td>
<td><?php echo $row["creator"] ?></td>
<td><?php echo $row["album"] ?></td>
<td class="library_length"><?php echo $row["length"] ?></td>
<td><?php echo $row["genre"] ?></td>
</tr>
<?php $i=$i+1; ?>