Ejemplo n.º 1
0
 /**
  * upgrade all child elements of an item
  *
  * @param int $id
  * @param bool $mode
  */
 function upgradeChilds($id, $mode = Scanner::SCAN_RECURSIVE)
 {
     $children = $this->legacy->getChildren($id);
     foreach ($children as $child) {
         $childData = $this->getNewData($child);
         \OC_Hook::emit('\\OC\\Files\\Cache\\Upgrade', 'migrate_path', $child['path']);
         if ($childData) {
             $this->insert($childData);
             if ($mode == Scanner::SCAN_RECURSIVE) {
                 $this->upgradeChilds($child['id']);
             }
         }
     }
 }