Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
xmlsitemap
Commits
8f5d2d00
Commit
8f5d2d00
authored
Jul 18, 2014
by
andrei.dincu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2249723
by andrei.dincu: Replace module_exists() and drupal_alter() with D8 code
parent
97dc5c68
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
7 deletions
+5
-7
src/Tests/XmlSitemapRobotsTxtIntegrationTest.php
src/Tests/XmlSitemapRobotsTxtIntegrationTest.php
+0
-1
src/Tests/XmlSitemapTestBase.php
src/Tests/XmlSitemapTestBase.php
+1
-1
src/XmlSitemapLinkStorage.php
src/XmlSitemapLinkStorage.php
+1
-1
xmlsitemap.module
xmlsitemap.module
+2
-3
xmlsitemap_engines/xmlsitemap_engines.module
xmlsitemap_engines/xmlsitemap_engines.module
+1
-1
No files found.
src/Tests/XmlSitemapRobotsTxtIntegrationTest.php
View file @
8f5d2d00
...
...
@@ -34,7 +34,6 @@ class XmlSitemapRobotsTxtIntegrationTest extends XmlSitemapTestBase {
public
function
testRobotsTxt
()
{
// Request the un-clean robots.txt path so this will work in case there is
// still the robots.txt file in the root directory.
//$this->drupalGet('', array('query' => array('q' => 'robots.txt')));
$this
->
drupalGet
(
'/robots.txt'
);
$this
->
assertRaw
(
'Sitemap: '
.
url
(
'sitemap.xml'
,
array
(
'absolute'
=>
TRUE
)));
}
...
...
src/Tests/XmlSitemapTestBase.php
View file @
8f5d2d00
...
...
@@ -229,7 +229,7 @@ abstract class XmlSitemapTestBase extends WebTestBase {
protected
function
getWatchdogMessages
(
array
$conditions
=
array
(),
$reset
=
FALSE
)
{
static
$seen_ids
=
array
();
if
(
!
module_e
xists
(
'dblog'
)
||
$reset
)
{
if
(
!
\
Drupal
::
moduleHandler
()
->
moduleE
xists
(
'dblog'
)
||
$reset
)
{
$seen_ids
=
array
();
return
array
();
}
...
...
src/XmlSitemapLinkStorage.php
View file @
8f5d2d00
...
...
@@ -34,7 +34,7 @@ class XmlSitemapLinkStorage {
);
// Allow other modules to alter the link before saving.
d
rupal
_
alter
(
'xmlsitemap_link'
,
$link
);
\
D
rupal
::
moduleHandler
()
->
alter
(
'xmlsitemap_link'
,
$link
);
// Temporary validation checks.
// @todo Remove in final?
...
...
xmlsitemap.module
View file @
8f5d2d00
...
...
@@ -595,7 +595,7 @@ function xmlsitemap_link_save(array $link) {
);
// Allow other modules to alter the link before saving.
d
rupal
_
alter
(
'xmlsitemap_link'
,
$link
);
\
D
rupal
::
moduleHandler
()
->
alter
(
'xmlsitemap_link'
,
$link
);
// Temporary validation checks.
// @todo Remove in final?
...
...
@@ -980,7 +980,6 @@ function xmlsitemap_get_link_info($type = NULL, $reset = FALSE) {
$bundle_info
[
'xmlsitemap'
]
+=
xmlsitemap_link_bundle_load
(
$key
,
$bundle
,
FALSE
);
}
}
//drupal_alter('xmlsitemap_link_info', $link_info);
\
Drupal
::
moduleHandler
()
->
alter
(
'xmlsitemap_link_info'
,
$link_info
);
ksort
(
$link_info
);
// Cache by language since this info contains translated strings.
...
...
@@ -1632,7 +1631,7 @@ function xmlsitemap_get_current_context() {
if
(
!
isset
(
$context
))
{
$context
=
\
Drupal
::
moduleHandler
()
->
invokeAll
(
'xmlsitemap_context'
);
d
rupal
_
alter
(
'xmlsitemap_context'
,
$context
);
\
D
rupal
::
moduleHandler
()
->
alter
(
'xmlsitemap_context'
,
$context
);
asort
(
$context
);
}
...
...
xmlsitemap_engines/xmlsitemap_engines.module
View file @
8f5d2d00
...
...
@@ -193,7 +193,7 @@ function xmlsitemap_engines_get_engine_info($engine = NULL) {
// Fetch the results of all hook_xmlsitemap_engine_info() implementations.
$engines
=
\
Drupal
::
moduleHandler
()
->
invokeAll
(
'xmlsitemap_engine_info'
);
// Allow other modulse to alter the engine info.
d
rupal
_
alter
(
'xmlsitemap_engine_info'
,
$engines
);
\
D
rupal
::
moduleHandler
()
->
alter
(
'xmlsitemap_engine_info'
,
$engines
);
// Cache by language since engine names are translated.
\
Drupal
::
cache
()
->
set
(
'xmlsitemap:engines:'
.
$language
->
getId
(),
$engines
);
}
...
...
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