Commit 03722a412b854029b0dc2f8010d348d1569bd2c9

Authored by nbm
1 parent 620e1f5a

Don't fiddle with attributes on a foreign object - use the accessors.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5280 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/foldermanagement/Folder.inc
@@ -321,7 +321,7 @@ class Folder extends KTEntity { @@ -321,7 +321,7 @@ class Folder extends KTEntity {
321 function getFolderPath($iFolderID) { 321 function getFolderPath($iFolderID) {
322 global $default; 322 global $default;
323 $oFolder = Folder::get($iFolderID); 323 $oFolder = Folder::get($iFolderID);
324 - $sPath = $default->documentRoot . "/" . $oFolder->sFullPath . "/" . $oFolder->getName() . "/"; 324 + $sPath = $default->documentRoot . "/" . $oFolder->getFullPath() . "/" . $oFolder->getName() . "/";
325 return $sPath; 325 return $sPath;
326 } 326 }
327 327
@@ -338,11 +338,11 @@ class Folder extends KTEntity { @@ -338,11 +338,11 @@ class Folder extends KTEntity {
338 $oFolder = Folder::get($iFolderID); 338 $oFolder = Folder::get($iFolderID);
339 $aPathArray = array(); 339 $aPathArray = array();
340 if ($oFolder) { 340 if ($oFolder) {
341 - if (strlen($oFolder->sFullPath) > 0) {  
342 - if (strlen($oFolder->sFullPath) > 1) {  
343 - $aPathArray = explode("/",$oFolder->sFullPath); 341 + if (strlen($oFolder->getFullPath()) > 0) {
  342 + if (strlen($oFolder->getFullPath()) > 1) {
  343 + $aPathArray = explode("/",$oFolder->getFullPath());
344 } else { 344 } else {
345 - $aPathArray = array($oFolder->sFullPath); 345 + $aPathArray = array($oFolder->getFullPath());
346 } 346 }
347 $aPathArray[count($aPathArray)] = $oFolder->getName(); 347 $aPathArray[count($aPathArray)] = $oFolder->getName();
348 } else { 348 } else {
@@ -372,13 +372,13 @@ class Folder extends KTEntity { @@ -372,13 +372,13 @@ class Folder extends KTEntity {
372 if ($oFolder === false) { 372 if ($oFolder === false) {
373 return false; 373 return false;
374 } 374 }
375 - if (strlen($oFolder->sParentFolderIDs) > 0) { 375 + if (strlen($oFolder->getParentFolderIDs()) > 0) {
376 if ($oFolder->iParentID == 0) { 376 if ($oFolder->iParentID == 0) {
377 $aPathArray = array(); 377 $aPathArray = array();
378 - } else if (strlen($oFolder->sParentFolderIDs) > 1) {  
379 - $aPathArray = explode(",",$oFolder->sParentFolderIDs); 378 + } else if (strlen($oFolder->getParentFolderIDs()) > 1) {
  379 + $aPathArray = explode(",",$oFolder->getParentFolderIDs());
380 } else { 380 } else {
381 - $aPathArray = array($oFolder->sParentFolderIDs); 381 + $aPathArray = array($oFolder->getParentFolderIDs());
382 } 382 }
383 $aPathArray[count($aPathArray)] = $oFolder->getID(); 383 $aPathArray[count($aPathArray)] = $oFolder->getID();
384 } else { 384 } else {