updated elysia_cron, elfinder, metatag, libraries, email_registration, migrate, nodeform_cols
This commit is contained in:
@@ -312,7 +312,8 @@ class _DiffEngine {
|
||||
}
|
||||
$matches = $ymatches[$line];
|
||||
reset($matches);
|
||||
while (list ($junk, $y) = each($matches)) {
|
||||
while ($y = current($matches)) {
|
||||
next($matches);
|
||||
if (empty($this->in_seq[$y])) {
|
||||
$k = $this->_lcs_pos($y);
|
||||
USE_ASSERTS && assert($k > 0);
|
||||
@@ -320,7 +321,8 @@ class _DiffEngine {
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (list ($junk, $y) = each($matches)) {
|
||||
while ($y = current($matches)) {
|
||||
next($matches);
|
||||
if ($y > $this->seq[$k-1]) {
|
||||
USE_ASSERTS && assert($y < $this->seq[$k]);
|
||||
// Optimization: this is a common case:
|
||||
@@ -454,7 +456,7 @@ class _DiffEngine {
|
||||
$i = 0;
|
||||
$j = 0;
|
||||
|
||||
USE_ASSERTS && assert('sizeof($lines) == sizeof($changed)');
|
||||
USE_ASSERTS && assert(sizeof($lines) == sizeof($changed));
|
||||
$len = sizeof($lines);
|
||||
$other_len = sizeof($other_changed);
|
||||
|
||||
@@ -474,7 +476,7 @@ class _DiffEngine {
|
||||
$j++;
|
||||
}
|
||||
while ($i < $len && ! $changed[$i]) {
|
||||
USE_ASSERTS && assert('$j < $other_len && ! $other_changed[$j]');
|
||||
USE_ASSERTS && assert($j < $other_len && ! $other_changed[$j]);
|
||||
$i++;
|
||||
$j++;
|
||||
while ($j < $other_len && $other_changed[$j]) {
|
||||
@@ -510,11 +512,11 @@ class _DiffEngine {
|
||||
while ($start > 0 && $changed[$start - 1]) {
|
||||
$start--;
|
||||
}
|
||||
USE_ASSERTS && assert('$j > 0');
|
||||
USE_ASSERTS && assert($j > 0);
|
||||
while ($other_changed[--$j]) {
|
||||
continue;
|
||||
}
|
||||
USE_ASSERTS && assert('$j >= 0 && !$other_changed[$j]');
|
||||
USE_ASSERTS && assert($j >= 0 && !$other_changed[$j]);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -537,7 +539,7 @@ class _DiffEngine {
|
||||
while ($i < $len && $changed[$i]) {
|
||||
$i++;
|
||||
}
|
||||
USE_ASSERTS && assert('$j < $other_len && ! $other_changed[$j]');
|
||||
USE_ASSERTS && assert($j < $other_len && ! $other_changed[$j]);
|
||||
$j++;
|
||||
if ($j < $other_len && $other_changed[$j]) {
|
||||
$corresponding = $i;
|
||||
@@ -555,11 +557,11 @@ class _DiffEngine {
|
||||
while ($corresponding < $i) {
|
||||
$changed[--$start] = 1;
|
||||
$changed[--$i] = 0;
|
||||
USE_ASSERTS && assert('$j > 0');
|
||||
USE_ASSERTS && assert($j > 0);
|
||||
while ($other_changed[--$j]) {
|
||||
continue;
|
||||
}
|
||||
USE_ASSERTS && assert('$j >= 0 && !$other_changed[$j]');
|
||||
USE_ASSERTS && assert($j >= 0 && !$other_changed[$j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -742,8 +744,8 @@ class MappedDiff extends Diff {
|
||||
* have the same number of elements as $to_lines.
|
||||
*/
|
||||
function __construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) {
|
||||
assert(sizeof($from_lines) == sizeof($mapped_from_lines));
|
||||
assert(sizeof($to_lines) == sizeof($mapped_to_lines));
|
||||
USE_ASSERTS && assert(sizeof($from_lines) == sizeof($mapped_from_lines));
|
||||
USE_ASSERTS && assert(sizeof($to_lines) == sizeof($mapped_to_lines));
|
||||
|
||||
parent::__construct($mapped_from_lines, $mapped_to_lines);
|
||||
|
||||
@@ -1000,7 +1002,7 @@ class _HWLDF_WordAccumulator {
|
||||
$this->_flushLine($tag);
|
||||
$word = drupal_substr($word, 1);
|
||||
}
|
||||
assert(!strstr($word, "\n"));
|
||||
USE_ASSERTS && assert(!strstr($word, "\n"));
|
||||
$this->_group .= $word;
|
||||
}
|
||||
}
|
||||
|
@@ -112,7 +112,12 @@ function diff_admin_field_overview() {
|
||||
'#markup' => '<p>' . t('This table provides a summary of the field type support found on the system. It is recommended that you use global settings whenever possible to configure field comparison settings.') . '</p>',
|
||||
);
|
||||
|
||||
$header = array(t('Type'), t('Module'), t('Operations'));
|
||||
$header = array(
|
||||
t('Type'),
|
||||
t('Machine name'),
|
||||
t('Module'),
|
||||
t('Operations'),
|
||||
);
|
||||
$rows = array();
|
||||
|
||||
// Skip field types which have no widget types.
|
||||
@@ -129,10 +134,8 @@ function diff_admin_field_overview() {
|
||||
foreach ($field_types as $field_name => $field_type) {
|
||||
if (!empty($widgets[$field_name])) {
|
||||
$row = array();
|
||||
$row[] = t('@field_label (%field_type)', array(
|
||||
'@field_label' => $field_type['label'],
|
||||
'%field_type' => $field_name,
|
||||
));
|
||||
$row[] = $field_type['label'];
|
||||
$row[] = $field_name;
|
||||
$row[] = $field_type['module'];
|
||||
$row[] = l(t('Global settings'), 'admin/config/content/diff/fields/' . $field_name);
|
||||
$rows[] = $row;
|
||||
|
@@ -108,6 +108,22 @@ function hook_entity_diff($old_entity, $new_entity, $context) {
|
||||
* @see hook_entity_diff()
|
||||
*/
|
||||
function hook_entity_diff_alter(&$entity_diffs, $context) {
|
||||
if ($context['entity_type'] == 'node') {
|
||||
$old_entity = $context['old_entity'];
|
||||
$new_entity = $context['new_entity'];
|
||||
$entity_diffs['custom_vid'] = array(
|
||||
'#name' => t('Second VID'),
|
||||
'#old' => array($old_entity->vid),
|
||||
'#new' => array($new_entity->vid),
|
||||
'#weight' => 5,
|
||||
);
|
||||
$entity_diffs['custom_log'] = array(
|
||||
'#name' => t('Second log'),
|
||||
'#old' => array($old_entity->log),
|
||||
'#new' => array($new_entity->log),
|
||||
'#weight' => 6,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -5,9 +5,8 @@ configure = admin/config/content/diff
|
||||
|
||||
files[] = DiffEngine.php
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-12-20
|
||||
version = "7.x-3.3"
|
||||
; Information added by Drupal.org packaging script on 2018-11-05
|
||||
version = "7.x-3.4"
|
||||
core = "7.x"
|
||||
project = "diff"
|
||||
datestamp = "1482211686"
|
||||
|
||||
datestamp = "1541401388"
|
||||
|
@@ -133,9 +133,14 @@ function diff_update_7306() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Grants access to the Diff "View Changes" button permission to all users.
|
||||
* Grants access to the Diff "View Changes" button permission to all users
|
||||
* if the Diff module is enabled. You need to manually update the permissions
|
||||
* if the module is currently disabled.
|
||||
*/
|
||||
function diff_update_7307() {
|
||||
user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('diff view changes'));
|
||||
user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('diff view changes'));
|
||||
// The update hooks run even if disabled, and this throws an error.
|
||||
if (module_exists('diff')) {
|
||||
user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('diff view changes'));
|
||||
user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('diff view changes'));
|
||||
}
|
||||
}
|
||||
|
@@ -475,7 +475,8 @@ function diff_node_form_build_preview_changes($form, &$form_state) {
|
||||
$node = node_form_submit_build_node($form, $form_state);
|
||||
|
||||
// Create diff of old node and edited node.
|
||||
$rows = _diff_body_rows($old_node, $node);
|
||||
$state = variable_get('diff_default_state_node', 'raw');
|
||||
$rows = _diff_body_rows($old_node, $node, $state);
|
||||
|
||||
$header = _diff_default_header(t('Original'), t('Changes'));
|
||||
$changes = theme('table__diff__preview', array(
|
||||
|
Reference in New Issue
Block a user