[Commit revision 81d0842]
Author: Nao
Date: Mon, 03 Apr 2017 22:30:42 +0200
Stats: 1 file changed; +49 (insertions), -36 (deletions)- Renamed wesql::$_db_con to wesql::$link (more in line with php.net docs), and made it public, because, well, I've found several occasions where it made life easier. (Class-DB.php)
- For some reason (and why didn't I see that before?), SQL queries can only use single quotes, no double quotes, when quoting a string. The query checker would bother me with that. Rewrote parser to account for both situations. (Class-DB.php)
- Optimized query check speed. Previously it would strip strings and whitespace, then test for a few specific strings. From now on it will first test for those strings, and THEN, if it finds something something, it will strip strings and whitespaces, and double-check those strings. Meaning it's now slower for actual problematic queries (which you would normally be fixing immediately!), and faster when there's nothing to be worried about. (Class-DB.php)
- wesql::get() will now double-check the kind of data it's returning. It should either be a mysqli_result object (normally what we're expecting), or a boolean (in case we called that method by mistake and actually meant for a ::query call, but what do you know...) (Class-DB.php)
[Commit revision 823b176]
Author: Nao
Date: Mon, 03 Apr 2017 22:32:17 +0200
Stats: 3 files changed; +36 (insertions), -40 (deletions)- Your avatar in the sidebar now links to your profile page. Some people told me it made more sense. I'm always willing to listen to people who don't know a thing about forum software conventions. (index.template.php)
- If an avatar was resized in notification popups, its height wouldn't be. Ewww. (index.css)
- Arraynazi. (Class-Notification.php)
[Commit revision 931e43e]
Author: Nao
Date: Mon, 03 Apr 2017 22:34:48 +0200
Stats: 2 files changed; +2 (insertions), -2 (deletions)- PHP 5.4+ already includes E_STRICT by default in E_ALL. (index.php)
- notify_period has a maximum value of 127, so it should ensure we don't try to set it above that. (Notifications.php)
[Commit revision 5a9a005]
Author: Nao
Date: Mon, 03 Apr 2017 22:37:57 +0200
Stats: 1 file changed; +10 (insertions), -15 (deletions)- It would seem that there's a possibility PHP already destroyed all static objects before calling some session detructors, thus making it impossible to use wesql in them. So I'm changing those functions to use mysqli directly. It's not like I'm planning to add support for other DB systems, eh. (Load.php)
- If visiting pages that generate many errors, admins could be locked out of them due to the debug queries being too long. (Load.php)
[Commit revision 137e34e]
Author: Nao
Date: Mon, 03 Apr 2017 22:39:26 +0200
Stats: 4 files changed; +8 (insertions), -4 (deletions)- Some more protections for output buffer handling. I've tested those for a few days now and haven't seen any errors pop up. (Subs-Sound.php, Security.php, Dlattach.php, Errors.php)
[Commit revision 3fd433f]
Author: Nao
Date: Mon, 03 Apr 2017 22:40:54 +0200
Stats: 1 file changed; +2 (insertions), -0 (deletion)- JSMin didn't correctly minify additions where the second member was quick cast as an integer, e.g. "a + +b". (Class-JSMin.php)
[Commit revision e6200f6]
Author: Nao
Date: Mon, 03 Apr 2017 22:42:58 +0200
Stats: 1 file changed; +10 (insertions), -27 (deletions)- Well, this one's a thing of beauty... In the auto-suggest JS code, handleSubmit would go to great lengths to return a boolean value, which... was never used in the end. I checked, and it's the same in all versions of SMF. Looks like someone didn't do their cleanup properly! Removing these tests saves a good 300 bytes! (suggest.js)
[Commit revision 14558bd]
Author: Nao
Date: Mon, 03 Apr 2017 22:45:21 +0200
Stats: 2 files changed; +5 (insertions), -7 (deletions)- I'll go out on a limb and say that when an admin disables execution time debug data, it's because they don't want anyone to see it. It's always good to keep an eye on your page loading performance, all right? (Subs-Template.php)
- A cool bit-based trick that saves at least a millionth of a millisecond. I'm sure. I should use it everywhere... No? (Profile-View.php)