SproutCMS

This is the code documentation for the SproutCMS project

function lookupReplacementUrl()

Checks the database for an updated URL path for a file.
I.e. a file which has been replaced by the admin 'replace file' tool.

Usage

string File::lookupReplacementUrl ( string $filename );

Arguments

  1. string $filename
    Name of file, with no path, e.g. 123_image.jpg

Exceptions thrown

  • RowMissingException
    If no updated path was found
  • InvalidArgumentException
    If linkspec in DB invalid

Return value

  • string
    Updated URL (relative to root), e.g. 'files/123_new_image.png' or 'file/download/123'