You are here

function _boost_kill_file_extension in Boost 6

Removes file extension from filename.

Parameters

$filename: filename

3 calls to _boost_kill_file_extension()
_boost_change_extension in ./boost.module
Change a file extension in the database.
_boost_copy_css_files in ./boost.module
Extract css filenames from html and copy them & their children.
_boost_copy_js_files in ./boost.module
Extract javascript filenames from html and copy them & their children.

File

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

Code

function _boost_kill_file_extension($filename) {
  $basename = basename($filename);
  $basename = substr($basename, 0, strrpos($basename, '.'));
  if (count(explode('/', $filename)) > 1) {
    return dirname($filename) . '/' . $basename;
  }
  else {
    return $basename;
  }
}