Advertisement:

Author Topic: [4825] Firefox 8 beta bug  (Read 47597 times)

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 51,013
Re: [4825] Firefox 8 beta bug
« Reply #100 on: December 22, 2011, 03:20:25 PM »
But for all intensive purpose, you can downgrade without restoring to old data.

and if there are database changes it may cause conflicts with the old files.

Offline IchBin™

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,115
  • Gender: Male
  • I don't speak German.
Re: [4825] Firefox 8 beta bug
« Reply #101 on: December 22, 2011, 03:21:52 PM »
Sorry meant to say "can't" downgrade. Restoring to old data would mean wiping out any database changes.
IchBin™        TinyPortal
Coding Guidelines       

Offline tfs

  • Full Member
  • ***
  • Posts: 442
  • Gender: Male
Re: [4825] Firefox 8 beta bug
« Reply #102 on: January 23, 2014, 08:35:45 PM »
Back in reply #62 of this thread I did a find/replace to fix an issue with Firefox that was happening with file attachments that had spaces in the name.  This was causing the patch for SMF 2.07 to break three times on Display.php.  I reversed the Find/Replace shown in my quote below, and then the 2.07 update was able to run without errors.

Find in Display.php:
Code: [Select]
if ($context['browser']['is_firefox'])
header('Content-Disposition: ' . $disposition . '; filename*="UTF-8\'\'' . preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name) . '"');

elseif ($context['browser']['is_opera'])
header('Content-Disposition: ' . $disposition . '; filename="' . preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name) . '"');

elseif ($context['browser']['is_ie'])
header('Content-Disposition: ' . $disposition . '; filename="' . urlencode(preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name)) . '"');

else
header('Content-Disposition: ' . $disposition . '; filename="' . $utf8name . '"');

Replace:
Code: [Select]
if ($context['browser']['is_ie8'] || $context['browser']['is_ie7'] || $context['browser']['is_ie6'])
header('Content-Disposition: ' . $disposition . '; filename="' . urlencode(preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $real_filename)) . '"');

else
header('Content-Disposition: ' . $disposition . '; filename*=UTF-8\'\'' . rawurlencode(preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $real_filename)));

A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,224
    • StoryBB/StoryBB on GitHub
Re: [4825] Firefox 8 beta bug
« Reply #103 on: January 23, 2014, 09:06:45 PM »
Funny you should mention this, we had to deal with this too on here ;)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline tfs

  • Full Member
  • ***
  • Posts: 442
  • Gender: Male
Re: [4825] Firefox 8 beta bug
« Reply #104 on: January 24, 2014, 12:34:36 AM »
I had a feeling it was going to bite a few people.  I'd have never had the guts to get past it without remembering (and finding) this old post with the find/replace itemized.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,224
    • StoryBB/StoryBB on GitHub
Re: [4825] Firefox 8 beta bug
« Reply #105 on: January 24, 2014, 12:35:47 AM »
Yeah, it bit us while doing the upgrade. But if you'd shouted, we could have pointed you in the right direction ;)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.