Exemplo n.º 1
0
 function getAllFiles($sort = true)
 {
     $this->sbr->getDocs(null, $this->sbr->isAdmin() ? null : false, false, $this->id, $this->sbr->isAdmin() ? true : false);
     $attach = $this->_new_getAttach();
     if (is_array($this->sbr->docs) && is_array($attach)) {
         $result = array_merge($attach, $this->sbr->docs);
         foreach ($result as $k => $val) {
             $files[$val['id']] = $val;
         }
     } elseif (is_array($this->sbr->docs)) {
         $files = $this->sbr->docs;
     } else {
         $files = $attach;
     }
     $this->sbr->all_docs = $files;
     if ($sort) {
         $this->sbr->sortFiles();
     }
 }