Skip to content

Commit 33d9091

Browse files
Merge branch '6.2' into 6
2 parents 0261e75 + 3065023 commit 33d9091

File tree

13 files changed

+24
-23
lines changed

13 files changed

+24
-23
lines changed

client/src/legacy/CMSMain.EditForm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ $.entwine('ss', function($){
7070
*
7171
* Update the related fields if appropriate
7272
* (String) title The new title
73-
* (Stirng) origTitle The original title
73+
* (String) origTitle The original title
7474
*/
7575
updateRelatedFields: function(title, origTitle) {
7676
// Update these fields only if their value was originally the same as the title

code/Controllers/CMSMain.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,7 @@ public function getRecordTreeMarkup(DataObject $record): string
12091209
$record->invokeWithExtensions('updateTreeIconClasses', $iconClasses);
12101210
$titleText = $record->getTreeTitle();
12111211
// Hierarchy::getTreeTitle() will call Convert::raw2xml(), though this may have been
1212-
// overriden by another method that doesn't call this
1212+
// overridden by another method that doesn't call this
12131213
// Check to see if it was converted first by calling the xml2raw() to before calling
12141214
// raw2xml() to ensure we don't double convert and end up with "&"
12151215
$wasChanged = Convert::xml2raw($titleText) !== $titleText;
@@ -1419,7 +1419,7 @@ public function getEditForm($id = null, $fields = null): Form
14191419

14201420
$this->extend('updateEditForm', $form);
14211421

1422-
// Use custom reqest handler for LeftAndMain requests;
1422+
// Use custom request handler for LeftAndMain requests;
14231423
// CMS Forms cannot be identified solely by name, but also need ID (and sometimes OtherID)
14241424
$form->setRequestHandler(
14251425
LeftAndMainFormRequestHandler::create($form, [$id])

code/Controllers/CMSSiteTreeFilter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
use SilverStripe\ORM\DataList;
88

99
/**
10-
* Base class for filtering againt SiteTree for certain statuses (e.g. archived or draft only).
10+
* Base class for filtering against SiteTree for certain statuses (e.g. archived or draft only).
1111
*/
1212
abstract class CMSSiteTreeFilter
1313
{
1414
use Injectable;
1515

1616
/**
17-
* Returns a sorted array of all implementators of CMSSiteTreeFilter, suitable for use in a dropdown.
17+
* Returns a sorted array of all implementers of CMSSiteTreeFilter, suitable for use in a dropdown.
1818
*
1919
* @return array<string, CMSSiteTreeFilter>
2020
*/

code/Controllers/CMSSiteTreeFilter_Search.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static function title(): string
1313
}
1414

1515
/**
16-
* Retun an array of maps containing the keys, 'ID' and 'ParentID' for each page to be displayed
16+
* Returns an array of maps containing the keys, 'ID' and 'ParentID' for each page to be displayed
1717
* in the search.
1818
*/
1919
public function getFilteredPages(DataList $list): DataList

code/Controllers/ContentController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,12 +318,13 @@ public function SilverStripeNavigator()
318318
if ($member) {
319319
$firstname = Convert::raw2xml($member->FirstName);
320320
$surname = Convert::raw2xml($member->Surname);
321-
$logInMessage = _t(__CLASS__ . '.LOGGEDINAS', 'Logged in as') . " {$firstname} {$surname} - <a href=\"Security/logout\">" . _t(__CLASS__ . '.LOGOUT', 'Log out') . "</a>";
321+
$logoutUrl = Convert::raw2att(Security::logout_url());
322+
$logInMessage = _t(__CLASS__ . '.LOGGEDINAS', 'Logged in as') . " {$firstname} {$surname} - <a href=\"{$logoutUrl}\">" . _t(__CLASS__ . '.LOGOUT', 'Log out') . "</a>";
322323
} else {
323324
$logInMessage = sprintf(
324325
'%s - <a href="%s">%s</a>',
325326
_t(__CLASS__ . '.NOTLOGGEDIN', 'Not logged in'),
326-
Security::config()->login_url,
327+
Convert::raw2att(Security::login_url()),
327328
_t(__CLASS__ . '.LOGIN', 'Login') . "</a>"
328329
);
329330
}

code/Model/SiteTree.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ public function getParent()
894894
* Return a string of the form "parent - page" or "grandparent - parent - page" using page titles
895895
*
896896
* @param int $level The maximum amount of levels to traverse.
897-
* @param string $separator Seperating string
897+
* @param string $separator Separating string
898898
* @return string The resulting string
899899
*/
900900
public function NestedTitle($level = 2, $separator = " - ")
@@ -1705,7 +1705,7 @@ public function generateURLSegment($title)
17051705
$filter = URLSegmentFilter::create();
17061706
$filteredTitle = $filter->filter($title);
17071707

1708-
// Fallback to generic page name if path is empty (= no valid, convertable characters)
1708+
// Fallback to generic page name if path is empty (= no valid, convertible characters)
17091709
if (!$filteredTitle || $filteredTitle == '-' || $filteredTitle == '-1') {
17101710
$filteredTitle = "page-$this->ID";
17111711
}
@@ -1789,7 +1789,7 @@ public function BackLinkTracking()
17891789
/**
17901790
* Returns the pages that depend on this page. This includes virtual pages, pages that link to it, etc.
17911791
*
1792-
* @param bool $includeVirtuals Set to false to exlcude virtual pages.
1792+
* @param bool $includeVirtuals Set to false to exclude virtual pages.
17931793
* @return ArrayList<SiteTree>
17941794
*/
17951795
public function DependentPages($includeVirtuals = true)
@@ -2413,7 +2413,7 @@ protected function onAfterPublish()
24132413
}
24142414

24152415
/**
2416-
* Update draft dependant pages
2416+
* Update draft dependent pages
24172417
*/
24182418
protected function onAfterRevertToLive()
24192419
{
@@ -2605,7 +2605,7 @@ public function getPageLevel()
26052605

26062606
/**
26072607
* Find the controller name by our convention of {$ModelClass}Controller
2608-
* Can be overriden by config variable
2608+
* Can be overridden by config variable
26092609
*
26102610
* @return string
26112611
*/
@@ -2665,7 +2665,7 @@ public function updateCMSTreeClasses(string &$classes): void
26652665

26662666
/**
26672667
* Stops extendCMSFields() being called on getCMSFields(). This is useful when you need access to fields added by
2668-
* subclasses of SiteTree in a extension. Call before calling parent::getCMSFields(), and reenable afterwards.
2668+
* subclasses of SiteTree in a extension. Call before calling parent::getCMSFields(), and re-enable afterwards.
26692669
*/
26702670
public static function disableCMSFieldsExtensions()
26712671
{
@@ -2787,7 +2787,7 @@ public static function flush()
27872787
}
27882788

27892789
/**
2790-
* Update dependant pages
2790+
* Update dependent pages
27912791
*/
27922792
protected function updateDependentPages()
27932793
{

code/Model/SiteTreeLinkTracking.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ protected function onAfterDelete()
154154
}
155155

156156
/**
157-
* Scrape the content of a field to detect anly links to local SiteTree pages or files
157+
* Scrape the content of a field to detect any links to local SiteTree pages or files
158158
*
159159
* @param string $fieldName The name of the field on {@link @owner} to scrape
160160
* @param bool &$anyBroken Will be flagged to true (by reference) if a link is broken.

code/Model/VirtualPage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
/**
2020
* Virtual Page creates an instance of a page, with the same fields that the original page had, but readonly.
21-
* This allows you can have a page in mulitple places in the site structure, with different children without
21+
* This allows you can have a page in multiple places in the site structure, with different children without
2222
* duplicating the content.
2323
*
2424
* Note: This Only duplicates $db fields and not the $has_one etc..

tests/behat/src/LoginContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function pagesShouldBeEditableBy($negative, $permCode)
2828
$member = $this->generateMemberWithPermission($email, $password, $permCode);
2929
$canEdit = strstr($negative ?? '', 'not') ? false : true;
3030
// Flush the SiteConfig cache so that siteconfig behat tests that update a
31-
// SiteConfig DataObject will not be referring to a stale verion of itself
31+
// SiteConfig DataObject will not be referring to a stale version of itself
3232
// which can happen because SiteConfig::current_site_config() uses a cached query
3333
SiteConfig::current_site_config()->flushCache();
3434
if ($canEdit) {

tests/behat/src/ThemeContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ protected function requireDir($dirname)
8787
public function cleanThemesAfterScenario()
8888
{
8989
// Restore any created/modified files.
90-
// - If modified, revert then to original contnet
90+
// - If modified, revert then to original content
9191
// - If created, delete them
9292
if ($this->restoreFiles) {
9393
foreach ($this->restoreFiles as $file => $origContent) {

0 commit comments

Comments
 (0)