/** * function deleteAllTree() * Delete all items in tree, all folders, all records! * @return bool TRUE if success, FALSE otherwise **/ function deleteAllTree() { // loop on all items require_once $GLOBALS['where_lms'] . '/lib/lib.param.php'; require_once $GLOBALS['where_lms'] . '/class.module/track.object.php'; $nullVal = NULL; $coll = $this->getFoldersCollection($nullVal); while ($folder = $coll->getNext()) { if ($folder->otherValues[REPOFIELDIDRESOURCE] != 0) { $lo = createLO($folder->otherValues[REPOFIELDOBJECTTYPE]); $this->deleteAllAccessUG($folder->id); delAllLOParam($folder->otherValues[ORGFIELDIDPARAM]); Track_Object::delIdTrackFromCommon($folder->id); if ($lo->del($folder->otherValues[REPOFIELDIDRESOURCE]) === FALSE) { return FALSE; } } } // remove all records from repo TreeDb::deleteAllTree(); return TRUE; }
/** * function deleteAllTree() * Delete all items in tree, all folders, all records! **/ function deleteAllTree() { // loop on all items $nullVal = NULL; $coll = $this->getFoldersCollection($nullVal); while ($folder = $coll->getNext()) { if ($folder->otherValues[REPOFIELDIDRESOURCE] != 0) { $lo = createLO($folder->otherValues[REPOFIELDOBJECTTYPE]); $lo->del($folder->otherValues[REPOFIELDIDRESOURCE]); } } // remove all records from repo parent::deleteAllTree(); }
/** * function deleteAllTree() * Delete all items in tree, all folders, all records! **/ function deleteAllTree() { // loop on all items $nullVal = NULL; $coll = $this->getFoldersCollection($nullVal); while ($folder = $coll->getNext()) { if ($folder->otherValues[REPOFIELDIDRESOURCE] != 0) { $lo = createLO($folder->otherValues[REPOFIELDOBJECTTYPE]); // delete categorized resource require_once _lms_ . '/lib/lib.kbres.php'; $kbres = new KbRes(); $kbres->deleteResourceFromItem($folder->otherValues[REPOFIELDIDRESOURCE], $folder->otherValues[REPOFIELDOBJECTTYPE], 'course_lo'); // --------------------------- $ok = $lo->del($folder->otherValues[REPOFIELDIDRESOURCE]); } } // remove all records from repo parent::deleteAllTree(); }