Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Merge branch 'develop' of https://github.com/pydio/pydio-core into de…
Browse files Browse the repository at this point in the history
…velop

* 'develop' of https://github.com/pydio/pydio-core:
  Rewire missing action for deleting user-created workspace.
  Fix htaccess tpl : replace ocs.php by opencollab.php
  Display close icon for mp3 player. Fix #1156
  Fix failed remote share: make sure to remove unnecessary data on failure.
  • Loading branch information
ghecquet committed Apr 8, 2016
2 parents 9410964 + 1c046f1 commit c653dd7
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 9 deletions.
12 changes: 11 additions & 1 deletion core/src/plugins/action.share/class.ShareCenter.php
Expand Up @@ -1587,8 +1587,18 @@ public function shareNode($ajxpNode, $httpVars, &$update){
if($shareObject instanceof \Pydio\OCS\Model\TargettedLink){
$invitation = $shareObject->getPendingInvitation();
if(!empty($invitation)){
try{
$ocsClient->sendInvitation($invitation);
}catch (Exception $e){
$this->getShareStore()->deleteShare("minisite", $shareObject->getHash(), true);
$shareUserId = $shareObject->getUniqueUser();
unset($users[$shareUserId]);
if(!count($users) && !count($groups)){
$this->getShareStore()->deleteShare("repository", $newRepo->getId());
}
throw $e;
}
$ocsStore->storeInvitation($invitation);
$ocsClient->sendInvitation($invitation);
}
}else{
$this->getPublicAccessManager()->initFolder();
Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/boot.conf/htaccess.tpl
Expand Up @@ -10,8 +10,8 @@ RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^shares ./dav.php [L]
RewriteRule ^api ./rest.php [L]
RewriteRule ^ocs/ ./ocs.php [L]
RewriteRule ^ocs-provider/ ./ocs.php [L]
RewriteRule ^ocs/ ./opencollab.php [L]
RewriteRule ^ocs-provider/ ./opencollab.php [L]
RewriteRule ^user ./index.php?get_action=user_access_point [L]
RewriteCond %{REQUEST_URI} !^${APPLICATION_ROOT}/index
RewriteCond %{REQUEST_URI} !^${APPLICATION_ROOT}/plugins
Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/boot.conf/htaccess.tpl.linux
Expand Up @@ -10,8 +10,8 @@ RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^shares ./dav.php [L]
RewriteRule ^api ./rest.php [L]
RewriteRule ^ocs/ ./ocs.php [L]
RewriteRule ^ocs-provider/ ./ocs.php [L]
RewriteRule ^ocs/ ./opencollab.php [L]
RewriteRule ^ocs-provider/ ./opencollab.php [L]
RewriteRule ^user ./index.php?get_action=user_access_point [L]
RewriteCond %{REQUEST_URI} !^/pydio/index
RewriteCond %{REQUEST_URI} !^/pydio/plugins
Expand Down
19 changes: 15 additions & 4 deletions core/src/plugins/gui.ajax/res/js/ui/reactjs/jsx/LeftNavigation.js
Expand Up @@ -459,19 +459,29 @@
this.wrapper.remove();
},

handleRemoveTplBasedWorkspace: function(event){
event.stopPropagation();
if(!global.confirm(this.props.pydio.MessageHash['424'])){
return;
}
PydioApi.getClient().request({get_action:'user_delete_repository', repository_id:this.props.workspace.getId()}, function(transport){
PydioApi.getClient().parseXmlMessage(transport.responseXML);
});
},

onClick:function() {
this.props.pydio.triggerRepositoryChange(this.props.workspace.getId());
},

render:function(){
var current = this.props.pydio.user.getActiveRepository(),
var current = (this.props.pydio.user.getActiveRepository() == this.props.workspace.getId()),
currentClass="workspace-entry",
messages = this.props.pydio.MessageHash,
onHover, onOut, onClick,
additionalAction,
badge, badgeNum, newWorkspace;

if (current == this.props.workspace.getId()) {
if (current) {
currentClass +=" workspace-current";
}

Expand Down Expand Up @@ -512,14 +522,15 @@

if (this.props.workspace.getOwner() && !this.props.workspace.getAccessStatus() && !this.props.workspace.getLastConnection()) {
newWorkspace = <span className="workspace-new">NEW</span>;

// Dialog for remote shares
if (this.props.workspace.getRepositoryType() == "remote") {
onClick = this.handleOpenAlert.bind(this, 'new_share');
}
}else if(this.props.workspace.getRepositoryType() == "remote"){
}else if(this.props.workspace.getRepositoryType() == "remote" && !current){
// Remote share but already accepted, add delete
additionalAction = <span className="workspace-additional-action mdi mdi-close" onClick={this.handleOpenAlert.bind(this, 'reject_accepted')} title={messages['550']}/>;
}else if(this.props.workspace.userEditable && !current){
additionalAction = <span className="workspace-additional-action mdi mdi-close" onClick={this.handleRemoveTplBasedWorkspace} title={messages['423']}/>;
}

return (
Expand Down
1 change: 1 addition & 0 deletions core/src/plugins/gui.ajax/res/themes/orbit/css/pydio.css
Expand Up @@ -4853,6 +4853,7 @@ div#external_download > div input {
div.dialogBox.form-originalUploadForm #modalCloseBtn,
div.dialogBox.form-jumploader_form #modalCloseBtn,
div.dialogBox.form-external_download #modalCloseBtn,
div.dialogBox.form-smplayer_editor #modalCloseBtn,
div.dialogBox.form-plupload_form #modalCloseBtn {
display: block;
color: rgba(0, 0, 0, 0.53);
Expand Down
Expand Up @@ -85,6 +85,7 @@ div#external_download{
div.dialogBox.form-originalUploadForm,
div.dialogBox.form-jumploader_form,
div.dialogBox.form-external_download,
div.dialogBox.form-smplayer_editor,
div.dialogBox.form-plupload_form
{
#modalCloseBtn{
Expand Down

0 comments on commit c653dd7

Please sign in to comment.