Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
b7a0a744
Commit
b7a0a744
authored
May 31, 2003
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Committed Al's rollback fixes and the title improvements. Thanks again.
parent
c5637a0a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
31 deletions
+46
-31
modules/node.module
modules/node.module
+22
-15
modules/node/node.module
modules/node/node.module
+22
-15
modules/title.module
modules/title.module
+2
-1
No files found.
modules/node.module
View file @
b7a0a744
...
...
@@ -373,16 +373,20 @@ function node_view($node, $main = 0) {
}
}
function
node_show
(
$nid
,
$cid
)
{
global
$revision
;
function
node_get_node_from_nid
(
$nid
)
{
$revision
=
$_GET
[
"revision"
];
$node
=
node_load
(
array
(
"status"
=>
1
,
"nid"
=>
$nid
));
if
(
isset
(
$revision
))
{
$node
=
$node
->
revisions
[
$revision
][
"node"
];
}
return
$node
;
}
function
node_show
(
$node
,
$cid
)
{
if
(
node_access
(
"view"
,
$node
))
{
if
(
isset
(
$revision
))
{
$node
=
$node
->
revisions
[
$revision
][
"node"
];
}
node_view
(
$node
);
...
...
@@ -795,7 +799,6 @@ function node_admin() {
/*
** Compile a list of the administrative links:
*/
switch
(
$op
)
{
case
"search"
:
print
search_type
(
"node"
,
url
(
"admin/node/search"
));
...
...
@@ -806,13 +809,13 @@ function node_admin() {
case
"delete"
:
print
node_delete
(
array
(
"nid"
=>
arg
(
3
)));
break
;
case
"rollback
+
revision"
:
print
node_revision_rollback
(
node_load
(
array
(
"nid"
=>
arg
(
3
))),
arg
(
5
));
print
node_admin_edit
(
arg
(
4
));
case
"rollback
revision"
:
print
node_revision_rollback
(
node_load
(
array
(
"nid"
=>
arg
(
3
))),
arg
(
4
));
print
node_admin_edit
(
arg
(
3
));
break
;
case
"delete
+
revision"
:
print
node_revision_delete
(
node_load
(
array
(
"nid"
=>
arg
(
3
))),
arg
(
5
));
print
node_admin_edit
(
arg
(
4
));
case
"delete
revision"
:
print
node_revision_delete
(
node_load
(
array
(
"nid"
=>
arg
(
3
))),
arg
(
4
));
print
node_admin_edit
(
arg
(
3
));
break
;
case
t
(
"Preview"
)
:
$edit
=
node_validate
(
$edit
,
$error
);
...
...
@@ -1399,7 +1402,11 @@ function node_page() {
return
;
}
theme
(
"header"
);
if
(
$op
==
"view"
)
{
$node
=
node_get_node_from_nid
(
arg
(
2
));
}
theme
(
"header"
,
$node
->
title
);
$name
=
module_invoke
(
arg
(
2
),
"node"
,
"name"
);
...
...
@@ -1411,7 +1418,7 @@ function node_page() {
theme
(
"box"
,
t
(
"Edit
$name
"
),
node_edit
(
arg
(
2
)));
break
;
case
"view"
:
print
node_show
(
arg
(
2
)
,
arg
(
3
));
print
node_show
(
$node
,
arg
(
3
));
break
;
case
t
(
"Preview"
)
:
$edit
=
node_validate
(
$edit
,
$error
);
...
...
modules/node/node.module
View file @
b7a0a744
...
...
@@ -373,16 +373,20 @@ function node_view($node, $main = 0) {
}
}
function
node_show
(
$nid
,
$cid
)
{
global
$revision
;
function
node_get_node_from_nid
(
$nid
)
{
$revision
=
$_GET
[
"revision"
];
$node
=
node_load
(
array
(
"status"
=>
1
,
"nid"
=>
$nid
));
if
(
isset
(
$revision
))
{
$node
=
$node
->
revisions
[
$revision
][
"node"
];
}
return
$node
;
}
function
node_show
(
$node
,
$cid
)
{
if
(
node_access
(
"view"
,
$node
))
{
if
(
isset
(
$revision
))
{
$node
=
$node
->
revisions
[
$revision
][
"node"
];
}
node_view
(
$node
);
...
...
@@ -795,7 +799,6 @@ function node_admin() {
/*
** Compile a list of the administrative links:
*/
switch
(
$op
)
{
case
"search"
:
print
search_type
(
"node"
,
url
(
"admin/node/search"
));
...
...
@@ -806,13 +809,13 @@ function node_admin() {
case
"delete"
:
print
node_delete
(
array
(
"nid"
=>
arg
(
3
)));
break
;
case
"rollback
+
revision"
:
print
node_revision_rollback
(
node_load
(
array
(
"nid"
=>
arg
(
3
))),
arg
(
5
));
print
node_admin_edit
(
arg
(
4
));
case
"rollback
revision"
:
print
node_revision_rollback
(
node_load
(
array
(
"nid"
=>
arg
(
3
))),
arg
(
4
));
print
node_admin_edit
(
arg
(
3
));
break
;
case
"delete
+
revision"
:
print
node_revision_delete
(
node_load
(
array
(
"nid"
=>
arg
(
3
))),
arg
(
5
));
print
node_admin_edit
(
arg
(
4
));
case
"delete
revision"
:
print
node_revision_delete
(
node_load
(
array
(
"nid"
=>
arg
(
3
))),
arg
(
4
));
print
node_admin_edit
(
arg
(
3
));
break
;
case
t
(
"Preview"
)
:
$edit
=
node_validate
(
$edit
,
$error
);
...
...
@@ -1399,7 +1402,11 @@ function node_page() {
return
;
}
theme
(
"header"
);
if
(
$op
==
"view"
)
{
$node
=
node_get_node_from_nid
(
arg
(
2
));
}
theme
(
"header"
,
$node
->
title
);
$name
=
module_invoke
(
arg
(
2
),
"node"
,
"name"
);
...
...
@@ -1411,7 +1418,7 @@ function node_page() {
theme
(
"box"
,
t
(
"Edit
$name
"
),
node_edit
(
arg
(
2
)));
break
;
case
"view"
:
print
node_show
(
arg
(
2
)
,
arg
(
3
));
print
node_show
(
$node
,
arg
(
3
));
break
;
case
t
(
"Preview"
)
:
$edit
=
node_validate
(
$edit
,
$error
);
...
...
modules/title.module
View file @
b7a0a744
...
...
@@ -22,8 +22,9 @@ function title_page() {
else
if
(
db_num_rows
(
$result
)
==
1
)
{
$node
=
db_fetch_object
(
$result
);
$node
=
get_node_from_nid
(
$node
->
nid
);
theme
(
"header"
);
print
node_show
(
$node
->
nid
,
NULL
);
print
node_show
(
$node
,
NULL
);
theme
(
"footer"
);
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment