Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
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
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
page_title.admin.inc
page_title.admin.inc
+5
-0
page_title.module
page_title.module
+4
-2
No files found.
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
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