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

Commit c653dd7

Browse files
committed
Merge branch 'develop' of https://github.com/pydio/pydio-core into develop
* '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.
2 parents 9410964 + 1c046f1 commit c653dd7

File tree

6 files changed

+32
-9
lines changed

6 files changed

+32
-9
lines changed

core/src/plugins/action.share/class.ShareCenter.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1587,8 +1587,18 @@ public function shareNode($ajxpNode, $httpVars, &$update){
15871587
if($shareObject instanceof \Pydio\OCS\Model\TargettedLink){
15881588
$invitation = $shareObject->getPendingInvitation();
15891589
if(!empty($invitation)){
1590+
try{
1591+
$ocsClient->sendInvitation($invitation);
1592+
}catch (Exception $e){
1593+
$this->getShareStore()->deleteShare("minisite", $shareObject->getHash(), true);
1594+
$shareUserId = $shareObject->getUniqueUser();
1595+
unset($users[$shareUserId]);
1596+
if(!count($users) && !count($groups)){
1597+
$this->getShareStore()->deleteShare("repository", $newRepo->getId());
1598+
}
1599+
throw $e;
1600+
}
15901601
$ocsStore->storeInvitation($invitation);
1591-
$ocsClient->sendInvitation($invitation);
15921602
}
15931603
}else{
15941604
$this->getPublicAccessManager()->initFolder();

core/src/plugins/boot.conf/htaccess.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ RewriteCond %{REQUEST_FILENAME} !-f
1010
RewriteCond %{REQUEST_FILENAME} !-d
1111
RewriteRule ^shares ./dav.php [L]
1212
RewriteRule ^api ./rest.php [L]
13-
RewriteRule ^ocs/ ./ocs.php [L]
14-
RewriteRule ^ocs-provider/ ./ocs.php [L]
13+
RewriteRule ^ocs/ ./opencollab.php [L]
14+
RewriteRule ^ocs-provider/ ./opencollab.php [L]
1515
RewriteRule ^user ./index.php?get_action=user_access_point [L]
1616
RewriteCond %{REQUEST_URI} !^${APPLICATION_ROOT}/index
1717
RewriteCond %{REQUEST_URI} !^${APPLICATION_ROOT}/plugins

core/src/plugins/boot.conf/htaccess.tpl.linux

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ RewriteCond %{REQUEST_FILENAME} !-f
1010
RewriteCond %{REQUEST_FILENAME} !-d
1111
RewriteRule ^shares ./dav.php [L]
1212
RewriteRule ^api ./rest.php [L]
13-
RewriteRule ^ocs/ ./ocs.php [L]
14-
RewriteRule ^ocs-provider/ ./ocs.php [L]
13+
RewriteRule ^ocs/ ./opencollab.php [L]
14+
RewriteRule ^ocs-provider/ ./opencollab.php [L]
1515
RewriteRule ^user ./index.php?get_action=user_access_point [L]
1616
RewriteCond %{REQUEST_URI} !^/pydio/index
1717
RewriteCond %{REQUEST_URI} !^/pydio/plugins

core/src/plugins/gui.ajax/res/js/ui/reactjs/jsx/LeftNavigation.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,19 +459,29 @@
459459
this.wrapper.remove();
460460
},
461461

462+
handleRemoveTplBasedWorkspace: function(event){
463+
event.stopPropagation();
464+
if(!global.confirm(this.props.pydio.MessageHash['424'])){
465+
return;
466+
}
467+
PydioApi.getClient().request({get_action:'user_delete_repository', repository_id:this.props.workspace.getId()}, function(transport){
468+
PydioApi.getClient().parseXmlMessage(transport.responseXML);
469+
});
470+
},
471+
462472
onClick:function() {
463473
this.props.pydio.triggerRepositoryChange(this.props.workspace.getId());
464474
},
465475

466476
render:function(){
467-
var current = this.props.pydio.user.getActiveRepository(),
477+
var current = (this.props.pydio.user.getActiveRepository() == this.props.workspace.getId()),
468478
currentClass="workspace-entry",
469479
messages = this.props.pydio.MessageHash,
470480
onHover, onOut, onClick,
471481
additionalAction,
472482
badge, badgeNum, newWorkspace;
473483

474-
if (current == this.props.workspace.getId()) {
484+
if (current) {
475485
currentClass +=" workspace-current";
476486
}
477487

@@ -512,14 +522,15 @@
512522

513523
if (this.props.workspace.getOwner() && !this.props.workspace.getAccessStatus() && !this.props.workspace.getLastConnection()) {
514524
newWorkspace = <span className="workspace-new">NEW</span>;
515-
516525
// Dialog for remote shares
517526
if (this.props.workspace.getRepositoryType() == "remote") {
518527
onClick = this.handleOpenAlert.bind(this, 'new_share');
519528
}
520-
}else if(this.props.workspace.getRepositoryType() == "remote"){
529+
}else if(this.props.workspace.getRepositoryType() == "remote" && !current){
521530
// Remote share but already accepted, add delete
522531
additionalAction = <span className="workspace-additional-action mdi mdi-close" onClick={this.handleOpenAlert.bind(this, 'reject_accepted')} title={messages['550']}/>;
532+
}else if(this.props.workspace.userEditable && !current){
533+
additionalAction = <span className="workspace-additional-action mdi mdi-close" onClick={this.handleRemoveTplBasedWorkspace} title={messages['423']}/>;
523534
}
524535

525536
return (

core/src/plugins/gui.ajax/res/themes/orbit/css/pydio.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4853,6 +4853,7 @@ div#external_download > div input {
48534853
div.dialogBox.form-originalUploadForm #modalCloseBtn,
48544854
div.dialogBox.form-jumploader_form #modalCloseBtn,
48554855
div.dialogBox.form-external_download #modalCloseBtn,
4856+
div.dialogBox.form-smplayer_editor #modalCloseBtn,
48564857
div.dialogBox.form-plupload_form #modalCloseBtn {
48574858
display: block;
48584859
color: rgba(0, 0, 0, 0.53);

core/src/plugins/gui.ajax/res/themes/orbit/css/theme/dialogs.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ div#external_download{
8585
div.dialogBox.form-originalUploadForm,
8686
div.dialogBox.form-jumploader_form,
8787
div.dialogBox.form-external_download,
88+
div.dialogBox.form-smplayer_editor,
8889
div.dialogBox.form-plupload_form
8990
{
9091
#modalCloseBtn{

0 commit comments

Comments
 (0)