Implements hook_system_info_alter().

File

./advagg.module, line 770

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']);
    }
}