Skip to content

Commit

Permalink
Merge pull request Internet2#62 from ioigoume/CO-1988_provisioning_pl…
Browse files Browse the repository at this point in the history
…ugin_delete_bug_CO-1982_custom_themes_ui_bug

CO-1988_provisioning_plugin_delete_bug_CO-1982_custom_themes_ui_bug
  • Loading branch information
NicolasLiampotis authored Jul 28, 2020
2 parents 23be0cf + e9eeb51 commit 7a44d32
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,5 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fix wrong progress calculation during Enrollment
- Fix UI Themes do not apply for Invitation Views
- Members of Closed Group could not access the View Page of the Group
- Fix custom UI Themes should not apply to COPetition View page
- Fix fatal error when deleting Provisioning Plugins
5 changes: 3 additions & 2 deletions app/Controller/AppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -804,8 +804,9 @@ protected function getTheme() {

if(!empty($this->cur_co['Co']['id'])) {
// First see if we're in an enrollment flow
if($this->name === 'CoPetitions'
|| $this->name === 'CoInvites') {
if(($this->name === 'CoPetitions'
&& $this->view !== 'view')
|| $this->name === 'CoInvites') {
$efId = $this->enrollmentFlowID();

if($efId > -1) {
Expand Down
6 changes: 5 additions & 1 deletion app/Controller/CoProvisioningTargetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function beforeRender() {
* @param Array Current data
* @return boolean true if dependency checks succeed, false otherwise.
*/

function checkDeleteDependencies($curdata) {
// Annoyingly, the read() call in standardController resets the associations made
// by the bindModel() call in beforeFilter(), above. Beyond that, deep down in
Expand All @@ -111,6 +111,10 @@ function checkDeleteDependencies($curdata) {
$model = "Co" . $plugin . "Target";

if(!empty($curdata[$model]['id'])) {
// Remove the plugin object from the instance and enforce a new one
if(!empty(ClassRegistry::getObject($model))) {
ClassRegistry::removeObject($model);
}
$this->loadModel($plugin . "." . $model);
$this->$model->delete($curdata[$model]['id']);
}
Expand Down

0 comments on commit 7a44d32

Please sign in to comment.