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
353c05d0
Commit
353c05d0
authored
Jul 04, 2004
by
Dries
Browse files
- Made it possible to edit blog posts and made the blog module use tabs.
parent
f3aa8712
Changes
4
Hide whitespace changes
Inline
Side-by-side
modules/blog.module
View file @
353c05d0
...
...
@@ -254,10 +254,7 @@ function blog_link($type, $node = 0, $main) {
}
if
(
$type
==
'node'
&&
$node
->
type
==
'blog'
)
{
if
(
blog_access
(
'update'
,
$node
))
{
$links
[]
=
l
(
t
(
'edit this blog entry'
),
"node/
$node->nid
/edit"
,
array
(
'title'
=>
t
(
'Edit this blog entry.'
)));
}
elseif
(
arg
(
0
)
!=
'blog'
&&
arg
(
1
)
!=
$node
->
uid
)
{
if
(
arg
(
0
)
!=
'blog'
&&
arg
(
1
)
!=
$node
->
uid
)
{
$links
[]
=
l
(
t
(
"%username's blog"
,
array
(
'%username'
=>
$node
->
name
)),
"blog/
$node->uid
"
,
array
(
'title'
=>
t
(
"Read %username's latest blog entries."
,
array
(
'%username'
=>
$node
->
name
))));
}
}
...
...
modules/blog/blog.module
View file @
353c05d0
...
...
@@ -254,10 +254,7 @@ function blog_link($type, $node = 0, $main) {
}
if
(
$type
==
'node'
&&
$node
->
type
==
'blog'
)
{
if
(
blog_access
(
'update'
,
$node
))
{
$links
[]
=
l
(
t
(
'edit this blog entry'
),
"node/
$node->nid
/edit"
,
array
(
'title'
=>
t
(
'Edit this blog entry.'
)));
}
elseif
(
arg
(
0
)
!=
'blog'
&&
arg
(
1
)
!=
$node
->
uid
)
{
if
(
arg
(
0
)
!=
'blog'
&&
arg
(
1
)
!=
$node
->
uid
)
{
$links
[]
=
l
(
t
(
"%username's blog"
,
array
(
'%username'
=>
$node
->
name
)),
"blog/
$node->uid
"
,
array
(
'title'
=>
t
(
"Read %username's latest blog entries."
,
array
(
'%username'
=>
$node
->
name
))));
}
}
...
...
modules/node.module
View file @
353c05d0
...
...
@@ -679,13 +679,15 @@ function node_menu() {
'weight'
=>
1
);
if
(
arg
(
0
)
==
'node'
&&
is_numeric
(
arg
(
1
)))
{
$node
=
node_load
(
array
(
'nid'
=>
arg
(
1
)));
$items
[]
=
array
(
'path'
=>
'node/'
.
arg
(
1
),
'title'
=>
t
(
'view'
),
'callback'
=>
'node_page'
,
'access'
=>
user_access
(
'access content'
),
'type'
=>
MENU_CALLBACK
);
$items
[]
=
array
(
'path'
=>
'node/'
.
arg
(
1
)
.
'/edit'
,
'title'
=>
t
(
'edit'
),
'callback'
=>
'node_page'
,
'access'
=>
user
_access
(
'
administer
node
s'
),
'access'
=>
node
_access
(
'
update'
,
$
node
),
'type'
=>
MENU_LOCAL_TASK
);
}
...
...
modules/node/node.module
View file @
353c05d0
...
...
@@ -679,13 +679,15 @@ function node_menu() {
'weight'
=>
1
);
if
(
arg
(
0
)
==
'node'
&&
is_numeric
(
arg
(
1
)))
{
$node
=
node_load
(
array
(
'nid'
=>
arg
(
1
)));
$items
[]
=
array
(
'path'
=>
'node/'
.
arg
(
1
),
'title'
=>
t
(
'view'
),
'callback'
=>
'node_page'
,
'access'
=>
user_access
(
'access content'
),
'type'
=>
MENU_CALLBACK
);
$items
[]
=
array
(
'path'
=>
'node/'
.
arg
(
1
)
.
'/edit'
,
'title'
=>
t
(
'edit'
),
'callback'
=>
'node_page'
,
'access'
=>
user
_access
(
'
administer
node
s'
),
'access'
=>
node
_access
(
'
update'
,
$
node
),
'type'
=>
MENU_LOCAL_TASK
);
}
...
...
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