cc-3936: added warning for metadata attributes that are not defined in constants.php
This commit is contained in:
parent
c14af747b0
commit
dea764b8fd
2 changed files with 4 additions and 1 deletions
|
@ -125,6 +125,9 @@ class Application_Model_StoredFile
|
|||
foreach ($p_md as $mdConst => $mdValue) {
|
||||
if (defined($mdConst)) {
|
||||
$dbMd[constant($mdConst)] = $mdValue;
|
||||
} else {
|
||||
Logging::info("Warning: using metadata that is not defined.
|
||||
[$mdConst] => [$mdValue]");
|
||||
}
|
||||
}
|
||||
$this->setDbColMetadata($dbMd);
|
||||
|
@ -153,7 +156,6 @@ class Application_Model_StoredFile
|
|||
if (!array_key_exists('MDATA_KEY_OWNER_ID', $p_md)) {
|
||||
//$admins = Application_Model_User::getUsers(array('A'));
|
||||
$admins = Application_Model_User::getUsersOfType('A');
|
||||
//$admins = array();
|
||||
if (count($admins) > 0) { // found admin => pick first one
|
||||
$owner = $admins[0];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue