Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
page_title
Commits
c1fa6578
Commit
c1fa6578
authored
Dec 16, 2008
by
Nicholas Thompson
Browse files
Added CVS $ marker to admin inc and fixed issue with with permissions found in #330253
parent
28b1d530
Changes
2
Hide whitespace changes
Inline
Side-by-side
page_title.admin.inc
View file @
c1fa6578
<?php
// $Id$
/**
* @file
* Admin include file.
*/
/**
* Displays the form for the standard settings tab.
...
...
page_title.module
View file @
c1fa6578
...
...
@@ -173,10 +173,12 @@ function page_title_form_alter(&$form, $form_state, $form_id) {
function
page_title_nodeapi
(
&
$node
,
$op
,
$teaser
=
NULL
,
$page
=
NULL
)
{
switch
(
$op
)
{
case
'update'
:
db_query
(
"DELETE FROM
{
page_title
}
WHERE nid = %d"
,
$node
->
nid
);
if
(
user_access
(
'set page title'
))
{
db_query
(
"DELETE FROM
{
page_title
}
WHERE nid = %d"
,
$node
->
nid
);
}
// fallthrough to insert intentional!
case
'insert'
:
if
(
isset
(
$node
->
page_title
)
&&
drupal_strlen
(
trim
(
$node
->
page_title
))
>
0
)
{
if
(
isset
(
$node
->
page_title
)
&&
drupal_strlen
(
trim
(
$node
->
page_title
))
>
0
&&
user_access
(
'set page title'
)
)
{
db_query
(
"INSERT INTO
{
page_title
}
VALUES (%d, '%s')"
,
$node
->
nid
,
$node
->
page_title
);
}
break
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment