Skip to content

Commit

Permalink
Fixes #688 - show model if no asset name
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Mar 25, 2015
1 parent 8662382 commit 35bbea3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/config/version.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
return array (
'app_version' => 'v1.2.6.1-123',
'hash_version' => 'v1.2.6.1-123-g7f07f35',
'app_version' => 'v1.2.6.1-130',
'hash_version' => 'v1.2.6.1-130-gad1a939',
);
2 changes: 1 addition & 1 deletion app/controllers/admin/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ public function postCheckout($assetId)
$data['log_id'] = $logaction->id;
$data['eula'] = $asset->getEula();
$data['first_name'] = $user->first_name;
$data['item_name'] = $asset->name;
$data['item_name'] = $asset->assetNameForEula();
$data['require_acceptance'] = $asset->requireAcceptance();


Expand Down
12 changes: 12 additions & 0 deletions app/models/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,18 @@ public function assetstatus()
{
return $this->belongsTo('Statuslabel','status_id');
}

/**
* Get name for EULA
**/
public function assetNameForEula()
{
if ($this->name=='') {
return $this->model->name;
} else {
return $this->name;
}
}


public function warrantee_expires()
Expand Down

0 comments on commit 35bbea3

Please sign in to comment.