Changeset 18297


Ignore:
Timestamp:
Sep 27, 2012, 3:36:28 PM (8 years ago)
Author:
plg
Message:

force the use of i.php?/upload instead of _data/i/upload because you never know when the cache will be flushed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/piwishack/include/class.inc.php

    r16639 r18297  
    104104    if (!empty($list))
    105105    {
    106 
    107106      set_make_full_url();
    108107
     
    640639  function loc_end_page_header()
    641640  {
    642     global $template;
     641    global $template, $conf;
     642
     643    // force $conf['derivative_url_style'] to 2 (script) to make sure
     644    // exported HTML/BBCode will use i.php?/upload and not _data/i/upload
     645    // because you don't know when the cache will be flushed
     646    $previous_derivative_url_style = $conf['derivative_url_style'];
     647    $conf['derivative_url_style'] = 2;
    643648
    644649    if ($this->opened or $this->to_close)
     
    679684      $template->append('head_elements', $js);
    680685    }
     686
     687    // restore configuration setting
     688    $conf['derivative_url_style'] = $previous_derivative_url_style;
    681689  }
    682690
Note: See TracChangeset for help on using the changeset viewer.