Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

mix_filename()

Description

Utility function to scramble a filename

Parameters

ColumnTypeDefaultDescription
$string string - filename to scramble

Return

string

Location

include/migration_functions.php lines 463 to 486

Definition

 
function mix_filename($string)
    {
    global 
$mixcache;
    if(
trim($string) == "")
        {
        return 
"";
        }
    if(isset(
$mixcache[md5($string)]))
        {
        return 
$mixcache[md5($string)];
        }

    
debug("filename: " $string);
    if(
strpos($string,".") === false)
        {
        return 
mix_text($stringfalse);
        }

    
$fileparts pathinfo($string);
    
$newfilename mix_text($fileparts["filename"], false) . "." $fileparts["extension"];

    
debug("New filename: " $newfilename);
    return 
$newfilename;
    }

This article was last updated 19th March 2024 09:35 Europe/London time based on the source file dated 26th February 2024 11:00 Europe/London time.