New revs

Nao

  • Dadman with a boy
  • Posts: 16,080
Re: New revs
« Reply #2550, on March 31st, 2014, 10:24 PM »
[Commit revision 993d2f0]
Author: Nao
Date: Mon, 31 Mar 2014 22:08:26 +0200
Stats: 2 files changed; +10 (insertions), -19 (deletions)

  • Added an {empty} type for empty strings in query replacements. (Class-System.php)
  • Rewrote a bit of the database variable replacement code. (Class-DB.php)
  • - Renamed the function to just wesql::replace_value,
  • - Removed the 'identifier' type (never used, not even in SMF?!),
  • - Removed 'text' (an alias of 'string' that was never used...
  • - Removed all break instructions, because they were never executed anyway,
  • - And hopefully made the error message for replacement errors more helpful.
  • And if I were to rename string to text across all files, I'd rather rename it to 'str', which I won't do anyway.

[Commit revision 6b1a53d]
Author: Nao
Date: Mon, 31 Mar 2014 22:23:57 +0200
Stats: 2 files changed; +27 (insertions), -25 (deletions)

  • Removed query_see_topic test from loadBoard, as it was actually overkill (this isn't the place to test whether the topic is actually viewable...), and was the thing that broke topic privacy for moderators. (Load.php)
  • And thus, I can revert my revert, and push back query_see_topic creation to we::permissions. Phew... (Class-System.php)
Re: New revs
« Reply #2551, on April 1st, 2014, 08:04 PM »
[Commit revision b24e313]
Author: Nao
Date: Mon, 31 Mar 2014 22:57:52 +0200
Stats: 1 file changed; +31 (insertions), -22 (deletions)

  • Sped up the BadBehavior process by replacing stripos with strhas, and strtolowering the user agent once and for all at the beginning. (Security.php)
  • MJ's bot is up to version 1.4.4, I dunno why BadBehavior only takes 1.0.8 into account but it's still hammering my server with stupid requests, and I don't like bots that pretend to be for "SEO purposes" anyway. We don't need you. (Security.php)

[Commit revision 8989d5a]
Author: Nao
Date: Tue, 01 Apr 2014 15:46:00 +0200
Stats: 1 file changed; +5 (insertions), -5 (deletions)

  • Fixed fake Baidu blocking. Long time no see, Pete bugs! This one was actually a double negative that resulted in blocking only some valid Baidu requests. I have to say, though, apparently Baidu has way more IP blocks than indicated here, and I doubt it'll be very helpful in the end. (Security.php)

[Commit revision eda89f6]
Author: Nao
Date: Tue, 01 Apr 2014 15:57:23 +0200
Stats: 1 file changed; +12 (insertions), -12 (deletions)

  • As far as I know, search bots like Google will never log into your forum, ah ah... So we might as well block Google/Bing/Yahoo/Baidu if they're trying to use an account. (Security.php)
  • And, on the other hand, we could just as well let Opera/Safari/Konqueror/Lynx requests go if they don't have an Accept header BUT they're logged in. Because it may be caused by firewall software, or things like that. Also leaving IE alone if it's logged in. (Security.php)
  • Although being whitelisted as a member won't help if you're not logged in yet (duh), feedback told me that Accept header problems were caused by media requests. In this case, it should be helpful: user logs in, and no longer gets empty avatars. Yayz. (Security.php)

[Commit revision ca579ed]
Author: Nao
Date: Tue, 01 Apr 2014 18:48:38 +0200
Stats: 1 file changed; +7 (insertions), -3 (deletions)

  • Some fixes for SSI examples. (install/ssi_examples.php)

[Commit revision bceb12e]
Author: Nao
Date: Tue, 01 Apr 2014 19:47:13 +0200
Stats: 16 files changed; +82 (insertions), -257 (deletions)

  • Removed log_boards table. (index.php, SSI.php, Class-DBHelper.php, MoveTopic.php, Post2.php, Profile-Modify.php, RemoveTopic.php, RepairBoards.php, Subs-BoardIndex.php, Subs-Boards.php, Subs-Members.php, Upgrade.php, install.sql)
  • Note: this effectively removes 'New' icons from ssi_topBoards(). Not that this function's ever been any useful, but hey...

Posted: April 1st, 2014, 07:48 PM

[Commit revision 8cb1a75]
Author: Nao
Date: Tue, 01 Apr 2014 20:03:52 +0200
Stats: 1 file changed; +0 (insertion), -4 (deletions)

  • log_boards language cleanup.
Re: New revs
« Reply #2552, on April 2nd, 2014, 11:36 PM »
[Commit revision 3d8ce55]
Author: Nao
Date: Wed, 02 Apr 2014 12:10:33 +0200
Stats: 1 file changed; +7 (insertions), -2 (deletions)

  • Restored the double arrow glyph on redirection board status icons. This one only adds 31 gzipped bytes, which is way better than doing a 'proper' new icon. Also, the technique can be reused to add other glyphs to new classes, and it allows me to remove the color filter (-15 bytes), which I wasn't sure I was going to keep because it's not portable. Yes, the glyphs aren't portable either, but I think it's semantically better to reposition them, or hide them, than to play with filters which may still be relatively confusing to CSS users. (sections.css)

[Commit revision d0fba41]
Author: Nao
Date: Wed, 02 Apr 2014 14:16:29 +0200
Stats: 1 file changed; +6 (insertions), -4 (deletions)

  • Fixed template errors never being shown in context if the template file was loaded through weget. (ManageErrors.php)
  • Still in the same code block, fixed highlighted line not encompassing the entire line width on long lines. (ManageErrors.php)
Re: New revs
« Reply #2553, on April 2nd, 2014, 11:41 PM »
[Commit revision bf33fa8]
Author: Nao
Date: Wed, 02 Apr 2014 23:40:58 +0200
Stats: 1 file changed; +8 (insertions), -6 (deletions)

  • If someone's interested in trying to optimize this query... Here's my updated version of get_unread_numbers that supports board IDs (rather poorly.) (Subs.php)
Re: New revs
« Reply #2554, on April 3rd, 2014, 04:33 PM »
[Commit revision 3ad1ee1]
Author: Nao
Date: Thu, 03 Apr 2014 16:07:51 +0200
Stats: 2 files changed; +1 (insertion), -5 (deletions)

  • Removed new_posts/old_posts strings, as they're not used for now. (Well, not in my local install at least.) (Recent.template.php, index.english.php)

[Commit revision 32d8862]
Author: Nao
Date: Thu, 03 Apr 2014 16:10:04 +0200
Stats: 3 files changed; +37 (insertions), -25 (deletions)

  • Added per-board unread counts for board lists. Much slower than the good old SMF solution, but less buggy and still acceptable, at least until I get around to adding caching for that. (Subs-BoardIndex.php, Boards.template.php, MessageIndex.template.php)
Re: New revs
« Reply #2555, on April 4th, 2014, 08:54 PM »
[Commit revision 3b1c3ed]
Author: Nao
Date: Fri, 04 Apr 2014 19:52:16 +0200
Stats: 1 file changed; +2 (insertions), -2 (deletions)

  • Removing the 'Posterity' link on your thoughts if they're not public. This should prevent any accidental clicking that might reveal your thought's contents to everyone. (Thoughts.php)
Re: New revs
« Reply #2556, on April 4th, 2014, 11:45 PM »
[Commit revision ba2d42e]
Author: Nao
Date: Fri, 04 Apr 2014 22:54:26 +0200
Stats: 1 file changed; +2 (insertions), -2 (deletions)

  • IE 10 and IE 11 perfectly support CSS gradients, so they don't need the filter hack. Only IE9 does. (Subs-Cache.php)
Re: New revs
« Reply #2557, on April 5th, 2014, 10:45 PM »
[Commit revision 06b0b02]
Author: Nao
Date: Sat, 05 Apr 2014 16:36:29 +0200
Stats: 1 file changed; +11 (insertions), -6 (deletions)

  • The response prefix was being cached for only a finite amount of time, when there's really no need to recalculate it except when changing language settings (in which case the cache is invalidated anyway.) (Subs.php)
Re: New revs
« Reply #2558, on April 6th, 2014, 12:02 AM »
[Commit revision 03f7a7a]
Author: Nao
Date: Sat, 05 Apr 2014 23:15:31 +0200
Stats: 1 file changed; +11 (insertions), -11 (deletions)

  • get_preferred_language() didn't account for malformed Accept-Language headers. (Subs.php)

[Commit revision 02dd052]
Author: Nao
Date: Sat, 05 Apr 2014 23:52:02 +0200
Stats: 5 files changed; +28 (insertions), -45 (deletions)

  • Attempting to overhaul the .note class system. Everything is now subdued: .notevoid is removed, .note will do a similar job; while .note will be replaced by .notewarn (orange hue), and the original .notewarn disappears (too visible for my current taste). The .notenice class remains, but gets a more pastel tone. (Boards.template.php, MessageIndex.template.php, index.template.php, index.css, sections.css)
  • Note: I'm reserving the right to revert this commit entirely. It's ONLY there to test the pastel effect and determine whether it's worth it.

Posted: April 5th, 2014, 11:52 PM

[Commit revision 2c1d301]
Author: Nao
Date: Sat, 05 Apr 2014 23:56:49 +0200
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • Last-minute typo. (Subs.php)
Re: New revs
« Reply #2559, on April 8th, 2014, 01:04 PM »
[Commit revision 7126453]
Author: Nao
Date: Tue, 08 Apr 2014 13:03:41 +0200
Stats: 4 files changed; +32 (insertions), -15 (deletions)

  • Revert "* Attempting to overhaul the .note class system. Everything is now subdued: .notevoid is removed, .note will do a similar job; while .note will be replaced by .notewarn (orange hue), and the original .notewarn disappears (too visible for my current taste). The .notenice class remains, but gets a more pastel tone. (Boards.template.php, MessageIndex.template.php, index.template.php, index.css, sections.css)"
  • This reverts commit 02dd0528d5d9020eb6feefcdda0ebf90759b824d.
  • Note: leaving sections.css untouched, this one was okay. The rest was... Not particularly popular, and I did say I'd probably revert the commit.
Re: New revs
« Reply #2560, on April 8th, 2014, 08:53 PM »
[Commit revision bf05128]
Author: Nao
Date: Tue, 08 Apr 2014 13:10:24 +0200
Stats: 1 file changed; +1 (insertion), -0 (deletion)

  • Pretty URL settings page was broken by a missing include. (ManageSettings.php)

[Commit revision 82b70d0]
Author: Nao
Date: Tue, 08 Apr 2014 20:53:28 +0200
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • Pete bug: PNG header is "\x89PNG", not "\89PNG". This broke the max_image_width feature. (Subs.php)
Re: New revs
« Reply #2561, on April 9th, 2014, 12:12 PM »
[Commit revision ed0baed]
Author: Nao
Date: Wed, 09 Apr 2014 12:08:36 +0200
Stats: 1 file changed; +4 (insertions), -7 (deletions)

  • Fixed an SMF bug introduced by [Unknown] in his original implementation of the nobbc tag: they didn't work if they encompassed multiple lines. 10 years without anyone noticing..? I think that's well worth mentioning. (Subs-Post.php)

[Commit revision b3effe6]
Author: Nao
Date: Wed, 09 Apr 2014 12:12:42 +0200
Stats: 2 files changed; +10 (insertions), -7 (deletions)

  • Fixed long-lived bug where links posted inside nobbc tags were autolinked. This was due to two bugs: the SMF bug in the previous commit, and an Aeva bug where url tags were added before nobbc blocks were even protected. That preparsing code flow is such a mess, it might warrant a rewrite at some point. (Class-Editor.php, Post2.php)
Re: New revs
« Reply #2562, on April 12th, 2014, 12:17 AM »
[Commit revision 9bf4a22]
Author: Nao
Date: Thu, 10 Apr 2014 16:10:53 +0200
Stats: 18 files changed; +40 (insertions), -40 (deletions)

  • Spacinazi, more precisely, double spaces before new sentences. There were still a lot of these... (18 files, not listing them, doesn't matter if you don't update them.)

[Commit revision 0b9053c]
Author: Nao
Date: Thu, 10 Apr 2014 19:50:16 +0200
Stats: 3 files changed; +15 (insertions), -16 (deletions)

  • More spacinazi. (Class-Editor.php, Subs-Post.php)
  • Pixelnazi. (sections.css)

[Commit revision 51fe74e]
Author: Nao
Date: Sat, 12 Apr 2014 00:15:29 +0200
Stats: 6 files changed; +98 (insertions), -20 (deletions)

  • New feature: page replacements. Similar to the <replace> feature in skin definitions, this one is applied after skins are shown, so you can override anything, across any skin, plugin or whatever. (ManageSettings.php, Subs-Template.php, Admin.template.php, Admin.english.php)[1]
  • Rewrote relative paths in CSS url() functions. To be specific, I had to ensure that if you wanted to move /gz/css to another domain, absolute URLs were used in CSS files instead of relative ones. (Class-CSS.php, Subs-Cache.php)
 1. Accessed from the Pretty URLs settings page.
Re: New revs
« Reply #2563, on April 14th, 2014, 01:19 PM »
[Commit revision d33f13e]
Author: Nao
Date: Mon, 14 Apr 2014 13:12:40 +0200
Stats: 3 files changed; +66 (insertions), -50 (deletions)

  • Topic privacy was fixed a week ago, but it broke post approvals in the process. Here's the thing: Wedge loads users, then boards, then permissions, then board permissions. It needs to determine board permissions before the board data is loaded, but board permissions are retrieved through the current board's profile ID, which is only accessible with a board table query. Too long, didn't read? The snake was biting its own nail. I could either separate post approvals from topic privacy tests (boo!), or add an extra super-fast query at the right time, and only when needed, to deal with it (Class-System). Let's see how it goes... (Class-System.php, Display.php, Load.php)
  • Only increase a topic's view count if the user was actually able to read it. This topic privacy paradigm shift made everything more complicated for me. Also used the opportunity to redirect topic loading errors to rejectTopic(), that new handy function for hiding all topic details. (Display.php)
  • Should admins be able to access topics that are off-limits to them..? Believe me, I'd love to say 'yes' and enforce that. Still, it's hard to do it for now, and I'd rather we start a talk about that on wedge.org, rather than just keep my 'false' hack in place. (Class-System.php)

[Commit revision 4f9eed5]
Author: Nao
Date: Mon, 14 Apr 2014 13:16:19 +0200
Stats: 2 files changed; +9 (insertions), -13 (deletions)

  • Slightly simplifying a regex. (Subs-BBC.php)
  • Merged output buffer and page replacements into a single str_replace. (Subs-Template.php)
Re: New revs
« Reply #2564, on April 15th, 2014, 07:52 AM »
[Commit revision f2e5083]
Author: Nao
Date: Mon, 14 Apr 2014 15:37:03 +0200
Stats: 1 file changed; +0 (insertion), -3 (deletions)

  • The url tag bug wasn't fixed for quick edit. (QuickEdit.php)

[Commit revision c5cc16b]
Author: Nao
Date: Mon, 14 Apr 2014 15:50:31 +0200
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • Fixed www.something links being url'ed in nobbc tags. Nearly there!! Now, I only need to fix them in code tags... <sob> (Class-Editor.php)
  • I don't think colons are a problem in nobbc tags, so I'm limiting its transformation into entities to '://' occurrences, rather than just ':'. Feel free to 'Ha Ha!' me if this creates another needless bug. (Class-Editor.php)

[Commit revision 9a0acc7]
Author: Nao
Date: Tue, 15 Apr 2014 07:51:54 +0200
Stats: 1 file changed; +2 (insertions), -2 (deletions)

  • Custom fields at registration time were broken by the closure rewrite. Hopefully all the stuff in Profile-Modify still works... (Register.template.php)