Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Update code to reflect changes in silverstripe/cms #1356

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions code/Model/Recipient/EmailRecipient.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,7 @@ protected function getFormParent()
$formClass = $this->FormClass;
return $formClass::get()->byID($this->FormID);
}

// Revert to checking for a form from the session
// LeftAndMain::sessionNamespace is protected.
$sessionNamespace = $this->config()->get('session_namespace') ?: CMSMain::class;

$formID = Controller::curr()->getRequest()->getSession()->get($sessionNamespace . '.currentPage');
if ($formID) {
return UserDefinedForm::get()->byID($formID);
}
Comment on lines -233 to -240
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Storing the current record ID in the session was deprecated, and is being removed in silverstripe/silverstripe-admin#1867

From what I can tell, the relation is always set anyway so we shouldn't ever get to this.

return null;
}

public function getTitle()
Expand Down
2 changes: 1 addition & 1 deletion code/Model/UserDefinedForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class UserDefinedForm extends Page
* @var string
* @deprecated 6.4.0 Will be renamed to cms_icon_class
*/
private static $icon_class = 'font-icon-p-list';
private static $cms_icon_class = 'font-icon-p-list';

private static $class_description = 'Adds a customizable form.';

Expand Down
Loading