You are here

function advagg_system_info_alter in Advanced CSS/JS Aggregation 7.2

Implements hook_system_info_alter().

File

./advagg.module, line 769
Advanced CSS/JS aggregation module.

Code

function advagg_system_info_alter(&$info, $file, $type) {
  $config_path =& drupal_static(__FUNCTION__);

  // Get advagg config path.
  if (empty($config_path)) {
    $config_path = advagg_admin_config_root_path();
  }

  // Replace advagg path.
  if (!empty($info['configure']) && strpos($info['configure'], '/advagg') !== FALSE && (!empty($info['dependencies']) && is_array($info['dependencies']) && in_array('advagg', $info['dependencies']) || $file->name === 'advagg')) {
    $pos = strpos($info['configure'], '/advagg') + 7;
    $substr = substr($info['configure'], 0, $pos);
    $info['configure'] = str_replace($substr, $config_path . '/advagg', $info['configure']);
  }
}