Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit a5ce6e5

Browse files
author
Michael Grauer
committed
BUG: refs #0380. Added comments to getDefaultAssetstore().
1 parent 36a0e1b commit a5ce6e5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/models/base/AssetstoreModelBase.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ public function getDefault()
170170

171171
if($defaultAssetstoreId == null || $defaultAssetstore == false)
172172
{
173+
// since we don't have a default_assetstore, save one here in settings
174+
// first try one named Default
173175
$found = $this->findBy('name', 'Default');
174176
if(empty($found))
175177
{
@@ -179,6 +181,7 @@ public function getDefault()
179181
throw new Zend_Exception("No assetstore found in the database");
180182
}
181183
}
184+
// otherwise take the first
182185
$defaultAssetstore = $found[0];
183186
// explicit cast to string, as the setConfig method expects a string
184187
$defaultAssetstoreId = (string)$defaultAssetstore->getKey();

0 commit comments

Comments
 (0)