/[drupal]/contributions/modules/xmlsitemap/xmlsitemap.inc
ViewVC logotype

Diff of /contributions/modules/xmlsitemap/xmlsitemap.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.32, Sat Oct 3 22:35:12 2009 UTC revision 1.1.2.33, Sun Nov 1 16:11:34 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: xmlsitemap.inc,v 1.1.2.31 2009/09/26 00:09:22 davereid Exp $  // $Id: xmlsitemap.inc,v 1.1.2.32 2009/10/03 22:35:12 davereid Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 507  function _xmlsitemap_get_version() { Line 507  function _xmlsitemap_get_version() {
507    drupal_alter('system_info', $info, $file);    drupal_alter('system_info', $info, $file);
508    return (isset($info['version']) ? $info['version'] : '');    return (isset($info['version']) ? $info['version'] : '');
509  }  }
   
 /**  
  * Check the status of all hook_requirements() from xmlsitemap modules.  
  *  
  * @param $return_only  
  *   If TRUE, will return the result, otherwise it will show a message.  
  * @return  
  *   TRUE if there is a warning or error requirement, or FALSE otherwise.  
  */  
 function xmlsitemap_check_status($return_only = FALSE) {  
   // Load .install files  
   include_once './includes/install.inc';  
   drupal_load_updates();  
   $warnings = FALSE;  
   
   foreach (module_implements('requirements') as $module) {  
     if (strpos($module, 'xmlsitemap') !== FALSE) {  
       $requirements = module_invoke($module, 'requirements', 'runtime');  
       if (drupal_requirements_severity($requirements) >= REQUIREMENT_WARNING) {  
         $warnings = TRUE;  
         break;  
       }  
     }  
   }  
   
   if ($warnings && !$return_only && user_access('administer site configuration')) {  
     drupal_set_message(t('One or more problems were detected with your sitemap configuration. Please check the <a href="@status-report">status report</a> for more information.', array('@status-report' => url('admin/reports/status'))), 'warning', FALSE);  
   }  
   
   return $warnings;  
 }  

Legend:
Removed from v.1.1.2.32  
changed lines
  Added in v.1.1.2.33

  ViewVC Help
Powered by ViewVC 1.1.2