Commit eeecb6cd authored by Darren Oh's avatar Darren Oh
Browse files

Replaced value with constant for readability.

parent 7e9f7648
......@@ -46,7 +46,7 @@ function xmlsitemap_enable() {
$js_length = strpos($xsl, '"></script>') - $js_start;
$xsl = substr_replace($xsl, $base_path . drupal_get_path('module', 'xmlsitemap') .'/gss/gss.js', $js_start, $js_length);
if (file_check_directory(($path = file_directory_path() .'/xmlsitemap'), TRUE)) {
if (file_check_directory(($path = file_directory_path() .'/xmlsitemap'), FILE_CREATE_DIRECTORY)) {
file_save_data($xsl, "$path/gss.xsl", FILE_EXISTS_REPLACE);
}
}
......
......@@ -330,7 +330,7 @@ function _xmlsitemap_output($chunk = NULL) {
drupal_set_header('Content-type: text/xml; charset=utf-8');
global $user;
$dest = file_directory_path() .'/xmlsitemap';
file_check_directory($dest, TRUE);
file_check_directory($dest, FILE_CREATE_DIRECTORY);
if (isset($chunk)) {
$dest .= "/sitemap$chunk.xml.gz";
$type = t('Site map @chunk', array('@chunk' => $chunk));
......@@ -388,7 +388,7 @@ function _xmlsitemap_update_cache($page = NULL) {
$current_user = $user;
$user = user_load(array('uid' => 0));
$path = file_directory_path() .'/xmlsitemap';
file_check_directory($path, TRUE);
file_check_directory($path, FILE_CREATE_DIRECTORY);
$node_count = db_result(db_query("SELECT COUNT(*) FROM {node}"));
$dest = $path .'/sitemap.xml.gz';
$link_count = _xmlsitemap_link_count();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment