Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
diff-3312401
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
diff-3312401
Commits
6f11c0e7
Commit
6f11c0e7
authored
16 years ago
by
Moshe Weitzman
Browse files
Options
Downloads
Patches
Plain Diff
#239056
- Fixed path to the latest diff (current and previous versions)
parent
8654600d
No related branches found
Branches containing commit
Tags
8.x-3.0-alpha4
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
diff.module
+17
-0
17 additions, 0 deletions
diff.module
with
17 additions
and
0 deletions
diff.module
+
17
−
0
View file @
6f11c0e7
...
...
@@ -52,12 +52,29 @@ function diff_menu($may_cache) {
'weight'
=>
4
,
'type'
=>
MENU_LOCAL_TASK
,
);
$items
[]
=
array
(
'path'
=>
'node/'
.
arg
(
1
)
.
'/revisions/view/latest'
,
'title'
=>
t
(
'Revisions'
),
'callback'
=>
'diff_latest'
,
'callback arguments'
=>
array
(
arg
(
1
)),
'access'
=>
$revisions_access
,
'type'
=>
MENU_CALLBACK
,
);
}
}
}
return
$items
;
}
// Menu callback - show latest revision for a given node.
function
diff_latest
(
$nid
)
{
$nid
=
(
int
)
$nid
;
$revisions
=
node_revision_list
(
node_load
(
$nid
));
$new
=
array_shift
(
$revisions
);
$old
=
array_shift
(
$revisions
);
drupal_goto
(
"node/
$nid
/revisions/view/
$old->vid
/
$new->vid
"
);
}
/**
* Adjust the module weights for diff to load after node module.
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment