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
xmlsitemap
Commits
6f467ae4
Commit
6f467ae4
authored
Sep 24, 2010
by
Dave Reid
Browse files
#921644
by Dave Reid: Fixed object/array with xmlsitemap_sitemap_edit_form_validate().
parent
d2b58e56
Changes
1
Hide whitespace changes
Inline
Side-by-side
xmlsitemap.admin.inc
View file @
6f467ae4
...
...
@@ -156,7 +156,7 @@ function xmlsitemap_sitemap_list_form_submit($form, &$form_state) {
}
}
function
xmlsitemap_sitemap_edit_form
(
$form
,
&
$form_state
,
stdClass
$sitemap
=
NULL
)
{
function
xmlsitemap_sitemap_edit_form
(
array
$form
,
array
&
$form_state
,
stdClass
$sitemap
=
NULL
)
{
_xmlsitemap_set_breadcrumb
();
if
(
!
isset
(
$sitemap
))
{
...
...
@@ -211,7 +211,7 @@ function xmlsitemap_sitemap_edit_form_validate($form, &$form_state) {
// disappears.
$form_state
[
'values'
]
+=
array
(
'context'
=>
array
());
$existing
=
xmlsitemap_sitemap_load_by_context
(
$form_state
[
'values'
][
'context'
]);
if
(
$existing
&&
$existing
[
'
smid
'
]
!=
$form_state
[
'values'
][
'smid'
])
{
if
(
$existing
&&
$existing
->
smid
!=
$form_state
[
'values'
][
'smid'
])
{
form_set_error
(
'context'
,
t
(
'A sitemap with the same context already exists.'
));
}
}
...
...
@@ -224,7 +224,7 @@ function xmlsitemap_sitemap_edit_form_submit($form, &$form_state) {
// @todo If context was changed, needs to be regenerated.
}
function
xmlsitemap_sitemap_delete_form
(
$form
,
&
$form_state
,
stdClass
$sitemap
)
{
function
xmlsitemap_sitemap_delete_form
(
array
$form
,
array
&
$form_state
,
stdClass
$sitemap
)
{
_xmlsitemap_set_breadcrumb
();
$count
=
(
int
)
db_query
(
"SELECT COUNT(smid) FROM
{
xmlsitemap_sitemap
}
"
)
->
fetchField
();
...
...
Write
Preview
Supports
Markdown
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