- changed implementation of getDir() to support multi level content dirs

This commit is contained in:
steinm 2011-12-08 19:30:27 +00:00
parent 1b779360a5
commit bb47e2b412

View File

@ -158,7 +158,12 @@ class LetoDMS_Core_Document { /* {{{ */
* @return string directory of document
*/
function getDir() { /* {{{ */
return $this->_id."/";
if($this->_document->_dms->maxDirID) {
$dirid = (int) (($this->_id-1) / $this->_document->_dms->maxDirID) + 1;
return $dirid."/".$this->_id."/";
} else {
return $this->_id."/";
}
} /* }}} */
/*