Commit 8acb0576 authored by alexpott's avatar alexpott

Issue #2383015 by AjitS, jacob.embree: Revert back is redundant

parent 21644b42
......@@ -30,7 +30,7 @@ interface AccountSwitcherInterface {
public function switchTo(AccountInterface $account);
/**
* Reverts back to a previous account after switching.
* Reverts to a previous account after switching.
*
* @return \Drupal\Core\Session\AccountSwitcherInterface
* $this.
......
......@@ -302,7 +302,7 @@ function testTwoPagers() {
// Change default pager to 2.
$this->drupalPostForm(NULL, array('fields[comment][settings_edit_form][settings][pager_id]' => 2), t('Save'));
$this->assertText(t('Pager ID: @id', array('@id' => 2)));
// Revert the changes back.
// Revert the changes.
$this->drupalPostAjaxForm(NULL, array(), 'comment_settings_edit');
$this->drupalPostForm(NULL, array('fields[comment][settings_edit_form][settings][pager_id]' => 0), t('Save'));
$this->assertNoText(t('Pager ID: @id', array('@id' => 0)), 'No summary for standard pager');
......
......@@ -634,7 +634,7 @@ function _filter_url($text, $filter) {
}
$text = implode($chunks);
// Revert back to the original comment contents
// Revert to the original comment contents
_filter_url_escape_comments('', FALSE);
$text = preg_replace_callback('`<!--(.*?)-->`', '_filter_url_escape_comments', $text);
}
......
......@@ -113,7 +113,7 @@ function node_help($route_name, RouteMatchInterface $route_match) {
'<p>' . t('Here, you can define which fields are shown and hidden when %type content is displayed in each view mode, and define how the fields are displayed in each view mode.', array('%type' => $type->label())) . '</p>';
case 'entity.node.version_history':
return '<p>' . t('Revisions allow you to track differences between multiple versions of your content, and revert back to older versions.') . '</p>';
return '<p>' . t('Revisions allow you to track differences between multiple versions of your content, and revert to older versions.') . '</p>';
case 'entity.node.edit_form':
$node = $route_match->getParameter('node');
......
......@@ -114,7 +114,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
$this->revision->save();
$this->logger('content')->notice('@type: reverted %title revision %revision.', array('@type' => $this->revision->bundle(), '%title' => $this->revision->label(), '%revision' => $this->revision->getRevisionId()));
drupal_set_message(t('@type %title has been reverted back to the revision from %revision-date.', array('@type' => node_get_type_label($this->revision), '%title' => $this->revision->label(), '%revision-date' => format_date($original_revision_timestamp))));
drupal_set_message(t('@type %title has been reverted to the revision from %revision-date.', array('@type' => node_get_type_label($this->revision), '%title' => $this->revision->label(), '%revision-date' => format_date($original_revision_timestamp))));
$form_state->setRedirect(
'entity.node.version_history',
array('node' => $this->revision->id())
......
......@@ -107,7 +107,7 @@ function testRevisions() {
// Confirm that revisions revert properly.
$this->drupalPostForm("node/" . $node->id() . "/revisions/" . $nodes[1]->getRevisionId() . "/revert", array(), t('Revert'));
$this->assertRaw(t('@type %title has been reverted back to the revision from %revision-date.',
$this->assertRaw(t('@type %title has been reverted to the revision from %revision-date.',
array(
'@type' => 'Basic page',
'%title' => $nodes[1]->getTitle(),
......@@ -145,7 +145,7 @@ function testRevisions() {
))
->execute();
$this->drupalPostForm("node/" . $node->id() . "/revisions/" . $nodes[2]->getRevisionId() . "/revert", array(), t('Revert'));
$this->assertRaw(t('@type %title has been reverted back to the revision from %revision-date.', array(
$this->assertRaw(t('@type %title has been reverted to the revision from %revision-date.', array(
'@type' => 'Basic page',
'%title' => $nodes[2]->getTitle(),
'%revision-date' => format_date($old_revision_date),
......
......@@ -95,7 +95,7 @@ function testRevisions() {
// Confirm that revisions revert properly.
$this->drupalPostForm("node/" . $node->id() . "/revisions/" . $nodes[1]->getRevisionid() . "/revert", array(), t('Revert'));
$this->assertRaw(t('@type %title has been reverted back to the revision from %revision-date.',
$this->assertRaw(t('@type %title has been reverted to the revision from %revision-date.',
array('@type' => 'Basic page', '%title' => $nodes[1]->label(),
'%revision-date' => format_date($nodes[1]->getRevisionCreationTime()))), 'Revision reverted.');
$node_storage->resetCache(array($node->id()));
......@@ -123,7 +123,7 @@ function testRevisions() {
))
->execute();
$this->drupalPostForm("node/" . $node->id() . "/revisions/" . $nodes[2]->getRevisionId() . "/revert", array(), t('Revert'));
$this->assertRaw(t('@type %title has been reverted back to the revision from %revision-date.', array(
$this->assertRaw(t('@type %title has been reverted to the revision from %revision-date.', array(
'@type' => 'Basic page',
'%title' => $nodes[2]->label(),
'%revision-date' => format_date($old_revision_date),
......
......@@ -163,8 +163,7 @@
},
/**
* Reverts the modified value back to the original value (before editing
* started).
* Reverts the modified value to the original, before editing started.
*/
revert: function () {
// A no-op by default; each editor should implement reverting itself.
......
......@@ -42,7 +42,7 @@ public function testAccountSwitching() {
// Since we are still in the account from the first switch, session handling
// still needs to be disabled.
$this->assertEqual($user->id(), 2, 'Reverted back to user 2.');
$this->assertEqual($user->id(), 2, 'Reverted to user 2.');
$this->assertFalse($session_handler->isSessionWritable(), 'Session saving still disabled.');
// Revert to the original account which was active before the first switch.
......
......@@ -182,8 +182,8 @@ function testRevertAllDisplays() {
$view['block[title]'] = $this->randomMachineName(16);
$this->drupalPostForm('admin/structure/views/add', $view, t('Save and edit'));
// Revert the title of the block back to the default ones, but submit some
// new values to be sure that the new value is not stored.
// Revert the title of the block to the default ones, but submit some new
// values to be sure that the new value is not stored.
$edit = array();
$edit['title'] = $new_block_title = $this->randomMachineName();
$edit['override[dropdown]'] = 'default_revert';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment