Author: mj
Date: Wed Nov 2 10:07:00 2011
New Revision: 10243
Log:
Closes #2112, fix isEmptyDir() return value.
Modified:
trunk/apps/qubit/modules/informationobject/actions/deleteAction.class.php
trunk/lib/model/QubitDigitalObject.php
Modified:
trunk/apps/qubit/modules/informationobject/actions/deleteAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/deleteAction.class.php
Tue Nov 1 17:00:35 2011 (r10242)
+++ trunk/apps/qubit/modules/informationobject/actions/deleteAction.class.php
Wed Nov 2 10:07:00 2011 (r10243)
@@ -46,6 +46,7 @@
// Delete related digitalObjects
foreach ($item->digitalObjects as $digitalObject)
{
+ $digitalObject->informationObjectId = null;
$digitalObject->delete();
}
Modified: trunk/lib/model/QubitDigitalObject.php
==============================================================================
--- trunk/lib/model/QubitDigitalObject.php Tue Nov 1 17:00:35 2011
(r10242)
+++ trunk/lib/model/QubitDigitalObject.php Wed Nov 2 10:07:00 2011
(r10243)
@@ -398,13 +398,14 @@
$item->delete();
}
- // Delete self
- parent::delete($connection);
-
- if ($this->getInformationObject() !== null)
+ // Update search index before deleting self
+ if (!empty($this->informationObjectId))
{
QubitSearch::updateInformationObject($this->getInformationObject());
}
+
+ // Delete self
+ parent::delete($connection);
}
/**
@@ -1959,7 +1960,7 @@
{
$files = scandir($dir);
- return (2 <= count($files)); // Always have "." and ".." dirs
+ return (2 >= count($files)); // Always have "." and ".." dirs
}
}
}
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.