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

parse_dashtile_link()

Parameters

ColumnTypeDefaultDescription
$link

Location

include/dash_functions.php lines 1375 to 1404

Definition

 
function parse_dashtile_link($link)
    {
    global 
$userref$upload_then_edit;
    
$link str_replace("[userref]"$userref$link);

    
//For upload tiles respect the upload then edit preference
    
if((strpos($link'uploader=') !== false) && $upload_then_edit)
        {
        global 
$baseurl;

        
$query parse_url($linkPHP_URL_QUERY);
        if(
$query === false || is_null($query))
            {
            
$query "";
            }

        
/**
        * @var path is the real ResourceSpace path (regardless if RS is installed under web root or in a subfolder)
        * Example:
        * For http://localhost/trunk/pages/edit.php?ref=-[userref]&uploader=batch the real path is pages/edit.php as 
        * RS handles this via its baseurl when generating absolute paths.
        */
        
$path str_replace("{$baseurl}/"""$link);
        
$path str_replace("?{$query}"""$path);

        
$link str_replace($path"pages/upload_batch.php"$link);
        }

    return 
$link;
    }

This article was last updated 19th March 2024 02:05 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.