Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
e278e46f
Commit
e278e46f
authored
Jul 26, 2003
by
Dries
Browse files
- Applied Moshe's 007 patch: "read more" and author optimizations.
parent
cbbc3e80
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/node.module
View file @
e278e46f
...
...
@@ -530,8 +530,10 @@ function node_link($type, $node = 0, $main = 0) {
$links
=
$node
->
links
;
}
if
(
$main
==
1
&&
$node
->
teaser
&&
$node
->
teaser
!=
$node
->
body
)
{
$links
[]
=
l
(
t
(
"read more"
),
node_url
(
$node
),
array
(
"title"
=>
t
(
"Read the rest of this posting."
)));
if
(
$main
==
1
&&
$node
->
teaser
&&
strlen
(
$node
->
teaser
)
!=
strlen
(
$node
->
body
))
{
$links
[]
=
l
(
t
(
"read more"
),
"node/view/
$node->nid
"
,
array
(
"title"
=>
t
(
"Read
the rest of this posting."
),
"class"
=>
"read-more"
));
}
if
(
user_access
(
"administer nodes"
))
{
...
...
@@ -980,7 +982,7 @@ function node_validate($node, &$error) {
** Validate the "authored by"-field:
*/
if
(
empty
(
$node
->
name
)
)
{
if
(
empty
(
$node
->
name
)
||
empty
(
$node
->
uid
))
{
/*
** The use of empty() is mandatory in the context of usernames
** as the empty string denotes the anonymous user. In case we
...
...
modules/node/node.module
View file @
e278e46f
...
...
@@ -530,8 +530,10 @@ function node_link($type, $node = 0, $main = 0) {
$links
=
$node
->
links
;
}
if
(
$main
==
1
&&
$node
->
teaser
&&
$node
->
teaser
!=
$node
->
body
)
{
$links
[]
=
l
(
t
(
"read more"
),
node_url
(
$node
),
array
(
"title"
=>
t
(
"Read the rest of this posting."
)));
if
(
$main
==
1
&&
$node
->
teaser
&&
strlen
(
$node
->
teaser
)
!=
strlen
(
$node
->
body
))
{
$links
[]
=
l
(
t
(
"read more"
),
"node/view/
$node->nid
"
,
array
(
"title"
=>
t
(
"Read
the rest of this posting."
),
"class"
=>
"read-more"
));
}
if
(
user_access
(
"administer nodes"
))
{
...
...
@@ -980,7 +982,7 @@ function node_validate($node, &$error) {
** Validate the "authored by"-field:
*/
if
(
empty
(
$node
->
name
)
)
{
if
(
empty
(
$node
->
name
)
||
empty
(
$node
->
uid
))
{
/*
** The use of empty() is mandatory in the context of usernames
** as the empty string denotes the anonymous user. In case we
...
...
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