You are here

function boost_set_base_dir_in_array in Boost 6

Sets the base_dir array key based on settings.

Parameters

array &$data: array that might want to have the base_dir key added to it.

4 calls to boost_set_base_dir_in_array()
boost_block_form_flush_submit in ./boost.module
boost_cache_expire_by_db in ./boost.module
Expires the static file cache for the given paths via database.
boost_nodeapi in ./boost.module
Implementation of hook_nodeapi(). Acts on nodes defined by other modules.
boost_user in ./boost.module
Implementation of hook_user(). Acts on user account actions.

File

./boost.module, line 1062
Provides static file caching for Drupal text output. Pages, Feeds, ect...

Code

function boost_set_base_dir_in_array(&$data) {
  if ($data) {
    foreach ($data as $key => $value) {
      if (!array_key_exists('base_dir', $data[$key]) && !BOOST_FLUSH_ALL_MULTISITE) {
        $data[$key]['base_dir'] = BOOST_FILE_PATH;
      }
      if (array_key_exists('base_dir', $data[$key]) && BOOST_FLUSH_ALL_MULTISITE) {
        unset($data[$key]['base_dir']);
      }
    }
  }
}