Changing various function names to be more obvious and consistent. Get rid of unneeded data copying ( = = someFunction()).

This commit is contained in:
paul 2006-11-23 06:57:22 +00:00
parent 7425aa0654
commit cb921c1b02

View file

@ -311,7 +311,7 @@ class StoredFile {
if (PEAR::isError($ac)) { if (PEAR::isError($ac)) {
return $ac; return $ac;
} }
$ac->md->replace($src->md->getMetaData(), 'string'); $ac->md->replace($src->md->getMetadata(), 'string');
return $ac; return $ac;
} }
@ -450,19 +450,19 @@ class StoredFile {
function replaceMetaData($metadata, $mdataLoc='file', $format=NULL) function replaceMetaData($metadata, $mdataLoc='file', $format=NULL)
{ {
$this->dbc->query("BEGIN"); $this->dbc->query("BEGIN");
$res = $r = $this->md->replace($metadata, $mdataLoc, $format); $res = $this->md->replace($metadata, $mdataLoc, $format);
if (PEAR::isError($r)) { if (PEAR::isError($res)) {
$this->dbc->query("ROLLBACK"); $this->dbc->query("ROLLBACK");
return $r; return $res;
} }
$r = $this->md->regenerateXmlFile(); $r = $this->md->regenerateXmlFile();
if (PEAR::isError($r)) { if (PEAR::isError($r)) {
$this->dbc->query("ROLLBACK"); $this->dbc->query("ROLLBACK");
return $r; return $r;
} }
$res = $r = $this->dbc->query("COMMIT"); $res = $this->dbc->query("COMMIT");
if (PEAR::isError($r)) { if (PEAR::isError($res)) {
return $r; return $res;
} }
return TRUE; return TRUE;
} }
@ -474,9 +474,9 @@ class StoredFile {
* @return XML string * @return XML string
* @see MetaData * @see MetaData
*/ */
function getMetaData() function getMetadata()
{ {
return $this->md->getMetaData(); return $this->md->getMetadata();
} }