You are here

function shrinktheweb_deleteThumbnail in ShrinkTheWeb 6

Same name and namespace in other branches
  1. 8 shrinktheweb.api.inc \shrinktheweb_deleteThumbnail()
  2. 7 shrinktheweb.api.inc \shrinktheweb_deleteThumbnail()

Delete thumbnail

1 call to shrinktheweb_deleteThumbnail()
shrinktheweb_refreshThumbnail in ./shrinktheweb.api.inc
refresh a thumbnail for a url with specified options first delete it and then do a new request and return the HTML for image loading !!! SLIGTHLY CHANGED FOR DRUPAL !!!

File

./shrinktheweb.api.inc, line 49

Code

function shrinktheweb_deleteThumbnail($sUrl, $aOptions = array()) {
  $aOptions = shrinktheweb_generateOptions($aOptions);
  $aArgs = shrinktheweb_generateRequestArgs($aOptions);
  $aArgs['stwurl'] = $sUrl;
  $sFilename = shrinktheweb_generateHash($aArgs) . '.jpg';
  $sFile = THUMBNAIL_DIR . $sFilename;
  if (file_exists($sFile)) {
    @unlink($sFile);
  }
}