getPath() works propperly even if root id is not 1

getPath doesn't return any folders above the root id even if they
exist
This commit is contained in:
Uwe Steinmann 2013-09-05 07:33:17 +02:00
parent 5e17cf150f
commit 44164ebf40

View File

@ -437,7 +437,7 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
* @return array Array of parents
*/
function getPath() { /* {{{ */
if (!isset($this->_parentID) || ($this->_parentID == "") || ($this->_parentID == 0)) {
if (!isset($this->_parentID) || ($this->_parentID == "") || ($this->_parentID == 0) || ($this->_id == $this->_dms->rootFolderID)) {
return array($this);
}
else {