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

mix_url()

Description

Utility function to scramble a URL

Parameters

ColumnTypeDefaultDescription
$string string - URL to scramble

Return

string

Location

include/migration_functions.php lines 432 to 454

Definition

 
function mix_url($string)
    {
    global 
$mixcache$baseurl;
    if(
trim($string) == "")
        {
        return 
"";
        }
    if(isset(
$mixcache[md5($string)]))
        {
        return 
$mixcache[md5($string)];
        }
    if(
strpos($string"pages") === || strpos($string"/pages") === || strpos($string,$baseurl) === 0)
        {
        
// URL is a relative path within the system, don't scramble
        
return $string;
        }
    if(
strpos($string"://") !== false )
        {
        
$urlparts explode("://"$string);
        return 
$urlparts[0] . "://" mix_text($urlparts[1], false);
        } 
    return 
mix_text($string); 
    }

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