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
282a1869
Commit
282a1869
authored
May 08, 2012
by
Nicholas Thompson
Browse files
Fixing Coder issues - fixing some minor issues.
parent
d727c5af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
page_title.module
page_title.module
+3
-3
No files found.
page_title.module
View file @
282a1869
...
@@ -365,7 +365,7 @@ function page_title_node_load($nodes) {
...
@@ -365,7 +365,7 @@ function page_title_node_load($nodes) {
// Get a list of node nids to fetch page_title's later
// Get a list of node nids to fetch page_title's later
foreach
(
$nodes
AS
$node
)
{
foreach
(
$nodes
AS
$node
)
{
// Check the node type has the 'Show Field' enabled, otherwise there is no point querying for the data
// Check the node type has the 'Show Field' enabled, otherwise there is no point querying for the data
if
(
isset
(
$settings
[
'page_title_type_'
.
$node
->
type
])
&&
$settings
[
'page_title_type_'
.
$node
->
type
][
'show field'
])
{
if
(
isset
(
$settings
[
'page_title_type_'
.
$node
->
type
])
&&
$settings
[
'page_title_type_'
.
$node
->
type
][
'show field'
])
{
$nids
[]
=
$node
->
nid
;
$nids
[]
=
$node
->
nid
;
}
}
// Otherwise, set a blank value on the node
// Otherwise, set a blank value on the node
...
@@ -393,7 +393,7 @@ function page_title_node_load($nodes) {
...
@@ -393,7 +393,7 @@ function page_title_node_load($nodes) {
*/
*/
function
page_title_node_insert
(
$node
)
{
function
page_title_node_insert
(
$node
)
{
if
(
user_access
(
'set page title'
)
&&
isset
(
$node
->
page_title
)
&&
drupal_strlen
(
trim
(
$node
->
page_title
))
>
0
)
{
if
(
user_access
(
'set page title'
)
&&
isset
(
$node
->
page_title
)
&&
drupal_strlen
(
trim
(
$node
->
page_title
))
>
0
)
{
db_insert
(
'page_title'
)
->
fields
(
array
(
'type'
=>
'node'
,
'id'
=>
$node
->
nid
,
'page_title'
=>
$node
->
page_title
))
->
execute
();
db_insert
(
'page_title'
)
->
fields
(
array
(
'type'
=>
'node'
,
'id'
=>
$node
->
nid
,
'page_title'
=>
$node
->
page_title
))
->
execute
();
}
}
}
}
...
@@ -761,7 +761,7 @@ function page_title_views_plugins() {
...
@@ -761,7 +761,7 @@ function page_title_views_plugins() {
/**
/**
* Implements hook_entity_uuid_save()
* Implements hook_entity_uuid_save()
.
*/
*/
function
page_title_uuid_entity_uuid_save
(
&
$entity
,
$entity_type
)
{
function
page_title_uuid_entity_uuid_save
(
&
$entity
,
$entity_type
)
{
if
(
!
empty
(
$entity
->
page_title
))
{
if
(
!
empty
(
$entity
->
page_title
))
{
...
...
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