Permalink
Browse files

Share info panel : fix copy bytton style.

Share: avoid using null repoId.
Server catchError: do not use error code as request status !
  • Loading branch information...
1 parent 9a6a777 commit 228f7d83dca5fd540c9669947c762d902bc5bcfe @cdujeu cdujeu committed Sep 22, 2016
@@ -239,9 +239,10 @@ public function catchError($code, $message, $fichier, $ligne, $context)
$req = $this->getRequest();
$resp = new Response();
$x = new SerializableResponseStream();
- $resp = $resp
- ->withStatus($code)
- ->withBody($x);
+ if($code > 100 && $code < 599){
+ $resp = $resp->withStatus($code);
+ }
+ $resp = $resp->withBody($x);
$x->addChunk(new UserMessage($message, LOG_LEVEL_ERROR));
$this->topMiddleware->emitResponse($req, $resp);
@@ -422,7 +422,8 @@ div#ajxp_shared_info_panel .copy-button {
cursor: pointer;
background-color: rgba(255, 255, 255, 0.87);
padding: 7px;
- font-size: 14px;
+ font-size: 13px;
+ height: 12px;
border-radius: 0 2px 2px 0;
}
div#ajxp_shared_info_panel .copy-message {
@@ -446,7 +446,8 @@ div#ajxp_shared_info_panel{
cursor: pointer;
background-color: rgba(255, 255, 255, 0.87);
padding: 7px;
- font-size: 14px;
+ font-size: 13px;
+ height: 12px;
border-radius: 0 2px 2px 0;
}
.copy-message{
@@ -440,7 +440,7 @@ public function deleteShare($type, $element, $keepRepository = false, $ignoreRep
$owner = $repo->getOwner();
$this->testUserCanEditShare($repo->getOwner(), $repo->options);
}
- if(!$keepRepository){
+ if($repoId !== null && !$keepRepository){
$res = RepositoryService::deleteRepository($repoId);
if ($res == -1) {
throw new \Exception($mess[427]);

0 comments on commit 228f7d8

Please sign in to comment.