Skip to content

Commit

Permalink
Merge branch '3.0' into 3
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Sep 1, 2024
2 parents 3377ce7 + 437b7de commit 9c5484c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 20 deletions.
7 changes: 0 additions & 7 deletions _config/extensions.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
---
Name: cwpcoreextensions
---
# @todo Disable the feature. LoginAttempt seems to be broken on bridging solution - logs every
# request instead of logins!
# Follow up issue: https://github.com/silverstripe/cwp-core/issues/41
# SilverStripe\Admin\LeftAndMain:
# extensions:
# - CWP\Core\Extension\LoginAttemptNotifications

SilverStripe\ORM\FieldType\DBField:
extensions:
Expand All @@ -16,7 +10,6 @@ SilverStripe\Security\Group:
extensions:
- CWP\Core\Extension\CwpHtmlEditorConfig

# @todo investigate replacement for this
HtmlEditorField_Toolbar:
extensions:
- CWP\Core\Extension\CustomHtmlEditorFieldToolbar
3 changes: 0 additions & 3 deletions src/Extension/CustomHtmlEditorField.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
use SilverStripe\View\Requirements;

/**
* @todo rename file to match class name
* @todo investigate updated HTMLEditorField_Toolbar changes, and find new implementation
*
* @extends Extension<\HtmlEditorField_Toolbar>
*/
class CustomHtmlEditorFieldToolbar extends Extension
Expand Down
8 changes: 2 additions & 6 deletions src/Extension/LoginAttemptNotifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
use SilverStripe\View\Requirements;

/**
* TODO: describe.
* TODO: bug when using default admin - always shows the message...
* Requires Security::login_recording config to be set to true.
*
* @extends Extension<LeftAndMain>
Expand Down Expand Up @@ -66,14 +64,12 @@ public function init()

$message .= "The attempts were from " . implode(', ', $IPs) . '. ';

// TODO: add this call to action in a way that doesn't break out of the availabel space. Fix CSS?
// $message .= "If you suspect somebody else might be trying to access
// . "your account, please contact support.";
$message .= "If you suspect somebody else might be trying to access "
. "your account, please contact support.";
}
}
} else {
// New session - show last login attempt.
// TODO: this currently does NOT surface to the frontend in any way.
$lastLoginAttempt = LoginAttempt::get()->filter([
'MemberID' => $member->ID
])->sort('Created DESC')->First();
Expand Down
1 change: 0 additions & 1 deletion src/Feed/CwpAtomFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* CwpAtomFeed class
*
* This class is used to create an Atom feed.
* @todo Improve documentation
* @package cwp-core
*/
use SilverStripe\Control\Controller;
Expand Down
6 changes: 3 additions & 3 deletions tests/AtomFeedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ protected function setUp(): void
{
parent::setUp();
Config::modify()->set(Director::class, 'alternate_base_url', '/');
if (!self::$original_host) {
self::$original_host = $_SERVER['HTTP_HOST'];
if (!AtomFeedTest::$original_host) {
AtomFeedTest::$original_host = $_SERVER['HTTP_HOST'];
}
$_SERVER['HTTP_HOST'] = 'www.example.org';
}
Expand All @@ -75,6 +75,6 @@ protected function tearDown(): void
{
parent::tearDown();
Config::modify()->set(Director::class, 'alternate_base_url', null);
$_SERVER['HTTP_HOST'] = self::$original_host;
$_SERVER['HTTP_HOST'] = AtomFeedTest::$original_host;
}
}

0 comments on commit 9c5484c

Please sign in to comment.