Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
simple_sitemap
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
3
Merge Requests
3
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
simple_sitemap
Commits
8caa994d
Commit
8caa994d
authored
Feb 23, 2016
by
Pawel G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing reports/status page to display the correct sitemap status.
parent
1ea54b1d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/Form/SimplesitemapSettingsForm.php
src/Form/SimplesitemapSettingsForm.php
+2
-2
src/Simplesitemap.php
src/Simplesitemap.php
+2
-2
No files found.
src/Form/SimplesitemapSettingsForm.php
View file @
8caa994d
...
...
@@ -104,13 +104,13 @@ class SimplesitemapSettingsForm extends ConfigFormBase {
$max_links
=
$form_state
->
getValue
(
'max_links'
);
if
(
$max_links
!=
''
)
{
if
(
!
is_numeric
(
$max_links
)
||
$max_links
<
1
||
$max_links
!=
round
(
$max_links
))
{
$form_state
->
setErrorByName
(
''
,
t
(
"The value of the max links field must be a positive integer greater than
1
."
));
$form_state
->
setErrorByName
(
''
,
t
(
"The value of the max links field must be a positive integer greater than
0
."
));
}
}
$batch_process_limit
=
$form_state
->
getValue
(
'batch_process_limit'
);
if
(
!
is_numeric
(
$batch_process_limit
)
||
$batch_process_limit
<
1
||
$batch_process_limit
!=
round
(
$batch_process_limit
))
{
$form_state
->
setErrorByName
(
''
,
t
(
"The value of the batch refresh rate field must be a positive integer greater than
1
."
));
$form_state
->
setErrorByName
(
''
,
t
(
"The value of the batch refresh rate field must be a positive integer greater than
0
."
));
}
}
...
...
src/Simplesitemap.php
View file @
8caa994d
...
...
@@ -233,9 +233,9 @@ class Simplesitemap {
* Formatted timestamp of last sitemap generation, otherwise FALSE.
*/
public
function
get_generated_ago
()
{
if
(
isset
(
$this
->
sitemap
[
0
]
->
sitemap_created
))
{
if
(
isset
(
$this
->
sitemap
[
1
]
->
sitemap_created
))
{
return
\
Drupal
::
service
(
'date.formatter'
)
->
formatInterval
(
REQUEST_TIME
-
$this
->
sitemap
[
0
]
->
sitemap_created
);
->
formatInterval
(
REQUEST_TIME
-
$this
->
sitemap
[
1
]
->
sitemap_created
);
}
return
FALSE
;
}
...
...
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