This commit is contained in:
afornerot 2020-04-15 10:51:11 +02:00
parent 9f0915789b
commit 0105a44141
2 changed files with 27 additions and 24 deletions

View File

@ -2222,9 +2222,12 @@ class PagewidgetController extends Controller
$em->getRepository("CadolesPortalBundle:Page")->getPermission($this->getUser(),$page,$cansee,$canupdate);
if(!$cansee) throw $this->createNotFoundException('Permission denied');
}
$onlyservice = $this->container->get('cadoles.portal.service.only');
$files=$onlyservice->getDocument($group, $folders, $firstfolder, $tasks);
$grp=$em->getRepository("CadolesCoreBundle:Group")->find($group);
$grp=null;
if($group) $grp=$em->getRepository("CadolesCoreBundle:Group")->find($group);
if($grp) $idonly= $grp->getIdOnlyoffice();
else $idonly=0;

View File

@ -41,7 +41,7 @@ class onlyService
$folders=[];
$tasks=[];
dump($idgroup);
if(!is_null($idgroup)) {
$group=$this->em->getRepository("CadolesCoreBundle:Group")->find($idgroup);
if($group&&$group->getIdonlyoffice()) {
if($this->only_activate) {
@ -64,13 +64,13 @@ class onlyService
}
$response = \Unirest\Request::get($this->only_url.'/project/'.$group->getIdonlyoffice().'/task/open',$this->headers);
error_log($this->only_url.'/project/'.$group->getIdonlyoffice().'/tasks/open');
if(!$this->koresponse($response)) $tasks=$response->body->response;
}
}
}
}
}
}
return $files;
}