New revs

Nao

  • Dadman with a boy
  • Posts: 15,969
Re: New revs
« Reply #2850,  »
[Commit revision de8a0d3]
Author: C3realGuy
Date: Mon, 06 Feb 2017 22:47:59 +0100
Stats: 1 file changed; +4 (insertions), -2 (deletions)

  • Prevent race condition in loadSource by writing to a temporary file

[Commit revision 57f28d6]
Author: Nao
Date: Tue, 07 Feb 2017 00:33:45 +0100
Stats: 1 file changed; +4 (insertions), -2 (deletions)

  • Merge pull request #53 from C3realGuy/fix_rc_loadsource
  • Prevent race conditions by flocking files on loadSource(). A likely fix to one of the oldest unimportant Wedge bugs ;)
Re: New revs
« Reply #2851,  »
[Commit revision d47934c]
Author: Nao
Date: Tue, 07 Feb 2017 00:52:01 +0100
Stats: 2 files changed; +4 (insertions), -10 (deletions)

  • Spacinazi + I think we should allow for bigger random numbers, even if it's unlikely we'll get a collision. But hey it's free. (Subs-CachePHP.php)
  • I guess we don't need that ugly debug code anymore then. I was considering keeping the index fallback, but then I figured webmasters wouldn't even be able to determine one of their files is screwed up. (index.php)
Re: New revs
« Reply #2852,  »
[Commit revision 58af872]
Author: Nao
Date: Tue, 07 Feb 2017 01:06:39 +0100
Stats: 1 file changed; +3 (insertions), -2 (deletions)

  • Saving a few bytes of code. Okay, really I'm fixing a crash. Never commit at bedtime. (index.php)
Re: New revs
« Reply #2853,  »
[Commit revision 4584563]
Author: Nao
Date: Sat, 11 Feb 2017 15:57:59 +0100
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • A monstruous GROUP BY to fix the now dreaded MySQL strict mode error, this time when viewing thoughts. Yes, ouch. There's no way to get around it, except by disabling that flag, and I don't know if it would be acceptable. (I already have some code for that...) (Thoughts.php)

[Commit revision 213537f]
Author: Nao
Date: Sat, 11 Feb 2017 16:00:27 +0100
Stats: 1 file changed; +2 (insertions), -2 (deletions)

  • A departure from SMF-based forums: redirectexit() will no longer add the session variable to the URL if it's already in a cookie. I'll be honest with you, I never noticed that variable before, but it's started showing up everywhere in my new server. If you know why, feel free to share! Other than that, this update is very logical, so for those like me who have the problem, there you go. (Subs.php)
Re: New revs
« Reply #2854,  »
[Commit revision fe4f2b8]
Author: Nao
Date: Sat, 11 Feb 2017 16:06:04 +0100
Stats: 3 files changed; +10 (insertions), -14 (deletions)

  • I think I also need to update the language files in the main repo... (Help.english.php)
  • Colornazi. Some text was not readable enough. (index.css)
  • Reverted a previous login page fix, and just kept (and tweaked) the mobile version. Apparently works just fine. (sections.css)
Re: New revs
« Reply #2855,  »
Quote from Nao on February 11th, 04:00 PM
A departure from SMF-based forums: redirectexit() will no longer add the session variable to the URL if it's already in a cookie. I'll be honest with you, I never noticed that variable before, but it's started showing up everywhere in my new server. If you know why, feel free to share! Other than that, this update is very logical, so for those like me who have the problem, there you go. (Subs.php)
Okay, I may have found out why this happened...
https://bugs.php.net/bug.php?id=72940
Apparently, there was a bug between PHP 7.0 and 7.0.10 where the SID constant was defined even when a session cookie was set.
I'm using PHP 7.0.8, so that could be the reason.
At least I wasn't mad... :^^;:
I'm likely to keep that code in place, it's not like it's gonna cause issues after PHP 7.0.10.
Re: New revs
« Reply #2856,  »
[Commit revision 82b795f]
Author: Nao
Date: Sun, 19 Feb 2017 14:55:20 +0100
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • Quick fix for 'out of bounds' file browsing error in the error log, due to files having UTF8 characters. (ManageErrors.php)
Re: New revs
« Reply #2857,  »
[Commit revision 871993e]
Author: Nao
Date: Sun, 19 Feb 2017 16:34:41 +0100
Stats: 1 file changed; +3 (insertions), -3 (deletions)

  • Okay, okay... I botched my testing after refactoring the minification code. Let's not talk about it again, okay? (Subs-CachePHP.php)
Re: New revs
« Reply #2858,  »
[Commit revision d926432]
Author: Nao
Date: Mon, 20 Feb 2017 09:35:36 +0100
Stats: 2 files changed; +2 (insertions), -4 (deletions)

  • Changing font style only for presentation elements, as intended, in the skin selector. (Themes.php, mana.css)

[Commit revision 2bcbf20]
Author: Nao
Date: Mon, 20 Feb 2017 18:47:42 +0100
Stats: 4 files changed; +6 (insertions), -20 (deletions)

  • Fixed a couple of disgracious horizontal scrollbars showing up in IE and mobile. (index.css)
  • Removing some CSS leftovers from years ago that didn't catch my attention. (extra.ie6.css, extra.rtl.css, index.css)
  • Commenazi. Gee, haven't turned on that iPod in years... Might as well update that comment. (common.css)

[Commit revision 12bbb33]
Author: Nao
Date: Mon, 20 Feb 2017 18:52:10 +0100
Stats: 2 files changed; +1 (insertion), -3 (deletions)

  • Fixed a possible race condition when caching source files. And I'm afraid I still get errors related to those things, but that's because I've actually had users online at the same time for once. So it probably needs some more work. (index.php)
  • Removed two table fields that cause crashes when modifying boards in PHP 7. I would have fixed them, but I don't actually use them in Wedge so we might as well save the space. If you're having the problem, I suggest just launching phpMyAdmin and removing check_members_date and most_updated manually.

[Commit revision 342308c]
Author: Nao
Date: Mon, 20 Feb 2017 18:53:18 +0100
Stats: 1 file changed; +18 (insertions), -20 (deletions)

  • Auto-suggest is now better built to support other suggestion types than just members. Seriously, it's weird that this system was built exclusively for member search and then given a generic name..?! (suggest.js)

[Commit revision 30f1c99]
Author: Nao
Date: Mon, 20 Feb 2017 18:53:56 +0100
Stats: 1 file changed; +2 (insertions), -2 (deletions)

  • If PMs are disabled, why the heck would you show a PM info box at all..?! (InfoCenter.template.php)

[Commit revision 0f35c9a]
Author: Nao
Date: Mon, 20 Feb 2017 18:54:53 +0100
Stats: 1 file changed; +3 (insertions), -0 (deletion)

  • Minor fix for the pixelicon 'badge' position next to user names in Wilde. I forgot to commit it at the same time as the rest of my CSS-oriented commit. (Wilde/extra.css)

[Commit revision 2f6ef2a]
Author: Nao
Date: Mon, 20 Feb 2017 18:55:46 +0100
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • Try not to show the full path to the current PHP file in public error messages. It's just a matter of privacy. (Errors.php)

[Commit revision 82c2ba5]
Author: Nao
Date: Mon, 20 Feb 2017 18:57:26 +0100
Stats: 1 file changed; +9 (insertions), -4 (deletions)

  • Important fixes for the domain-name/action-name/ URL scheme. Gosh, no one ever enabled that one, did they..? (QueryString.php)

[Commit revision 13ec5ff]
Author: Nao
Date: Mon, 20 Feb 2017 18:58:02 +0100
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • Fixed crash on Unread Replies when using MySQL 5.7+ with default settings. (UnreadReplies.php)

[Commit revision a70a7cf]
Author: Nao
Date: Mon, 20 Feb 2017 18:58:56 +0100
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • Weirdly, some spam bots (exploits?) also try to send huge protocol strings. Let's take care of those. (Security.php)
Re: New revs
« Reply #2859,  »
[Commit revision 46195a1]
Author: Nao
Date: Tue, 21 Feb 2017 07:12:29 +0100
Stats: 1 file changed; +9 (insertions), -3 (deletions)

  • Added a workaround to choosing another smiley set that doesn't have the same filenames as the default's. They will now fall back to the default set, but of course it's best to think of updating your files... (Subs-Cache.php)
  • Removed 3 unused bytes in every single page. Will it actually save 3 bytes of bandwidth? Does it matter? (Subs-Cache.php)
Re: New revs
« Reply #2860,  »
[Commit revision 7720979]
Author: Nao
Date: Tue, 21 Feb 2017 10:32:32 +0100
Stats: 10 files changed; +13 (insertions), -30 (deletions)

  • unset() is very lenient with non-existing variables. There's no point in calling isset() before it. In fact it can even slow down the process by a few cycles, as seen in ManageSmileys. (Dlattach.php, ManageMemberOptions.php, ManageSearchEngines.php, ManageSmileys, Aeva-Gallery2.php, Profile-Modify.php, Register.php, Subs-Auth.php, Subs-BBC.php, Subs-Login.php)
  • Regrouped multiple unset() calls into one. Yes, it's supported. (Aeva-Gallery2.php, Subs-Auth.php, Subs-BBC.php)
Re: New revs
« Reply #2861,  »
[Commit revision 5e742b0]
Author: Nao
Date: Tue, 21 Feb 2017 10:35:25 +0100
Stats: 1 file changed; +1 (insertion), -2 (deletions)

  • Forgot one. (Subs-Login.php)

[Commit revision 78b0f70]
Author: Nao
Date: Tue, 21 Feb 2017 11:24:01 +0100
Stats: 4 files changed; +14 (insertions), -24 (deletions)

  • Dropped smileys support for IE6 and IE7. (Subs-BBC.php, Class-Editor.php, Subs-Cache.php)
  • Smiley cache emptying code didn't actually force reloading the smiley CSS file. I'm not kidding you. This really happened. In my code, of all places. (ManageSmileys.php)
  • Note that you can safely remove all smiley-cache-* variables from your settings table (note: dashes, not underscores). This was just too confusing.
  • Yes, IE6/7 support sounded acceptable back in 2012, but we're in 2017 and this legacy code shouldn't be here any more. It wastes CPU cycles for 0.5% of browser market share that, let's just say it, is mostly spam bots with fake user agents or people who enjoy their computers with viruses everywhere. I'm not gonna encourage that. Plus I think I already started removing support for IE6/7 compatibility in other places a couple years ago, so this is just the start.
Re: New revs
« Reply #2862,  »
[Commit revision 9080368]
Author: Nao
Date: Wed, 22 Feb 2017 23:43:08 +0100
Stats: 2 files changed; +1 (insertion), -4 (deletions)

  • Removed some IE6-7 compat CSS that wouldn't be used on them, as they don't support pseudo-selectors in the first place... Yeah, man. Yeah, man. (common.css)
  • Fixed Warm's skin.xml 'tutorial' to clearly indicate that parent skins should be provided as a folder name, rather than the parent skin's name as declared in the XML file. (Warm/skin.xml)
Re: New revs
« Reply #2863,  »
[Commit revision a449ef5]
Author: Nao
Date: Wed, 22 Feb 2017 23:48:29 +0100
Stats: 1 file changed; +2 (insertions), -2 (deletions)

  • Fixed integer casting error. (Subs.php)
  • Better westr::safe than sorry. Inspired by my Internet browsing. (Subs.php)
Re: New revs
« Reply #2864,  »
[Commit revision 005abec]
Author: Nao
Date: Mon, 27 Feb 2017 00:01:02 +0100
Stats: 1 file changed; +12 (insertions), -10 (deletions)

  • Updated CSS parser to support more recent versions of browsers dropping some browser extensions. (Class-CSS.php)

[Commit revision dc13cf0]
Author: Nao
Date: Mon, 27 Feb 2017 00:01:53 +0100
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • Random user error that didn't need logging. (Mailer.php)

[Commit revision 47060c5]
Author: Nao
Date: Mon, 27 Feb 2017 00:02:28 +0100
Stats: 1 file changed; +6 (insertions), -8 (deletions)

  • Avoiding a useless else() call. (Subs-CachePHP.php)

[Commit revision 9affd1f]
Author: Nao
Date: Mon, 27 Feb 2017 00:10:24 +0100
Stats: 1 file changed; +11 (insertions), -0 (deletion)

  • Fixed... Maybe... Maybe... Finally fixed race conditions in PHP file caching. Needs testing, but at least I'm no longer able to reproduce the problem. (Subs.php)
  • Imagine you're uploading a modified file to your server, and it has several visitors, and one of them is loading a page at the same time. The cacher will look for a cached version, will find it's outdated, and rebuild it. Now, here's the trick: if this happens DURING the upload, the file won't be complete, but it'll still be used for caching. The trick here, since we don't know the final expected filesize, is to instead check the file date. If it's very recent (0, 1 or 2 seconds old), we'll wait for one more second and check again, until the file is old enough. This isn't perfect, but should handle 99% of all possible race conditions.

[Commit revision c2bee20]
Author: Nao
Date: Mon, 27 Feb 2017 00:12:08 +0100
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • Mobile browsers are unable to follow links in the main menu's top-level items, which is mostly a problem with the first menu column, so I'm adding an 'exception' to account for that. (Subs.php)