Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - CerealGuy
61
Archived fixes / Re: Low flood/spam limits are ignored
« on October 24th, 2016, 10:50 PM »
Looks fine and works how it should. Thanks :)
62
Archived fixes / Re: Low flood/spam limits are ignored
« on October 21st, 2016, 05:42 PM »
@Nao please have a look at https://github.com/Wedge/wedge/pull/41 don't want to open a new bug report.
63
Archived fixes / Low flood/spam limits are ignored
« on October 16th, 2016, 12:40 PM »
spamProtection does not handle low limits correctly.

Example #1: If $settings['search_floodcontrol_time'] is 0 (disabled, not null/undefined) this setting will be ignored and a limit of 1 will be used instead.

Example #2: If user has moderator permissions, every limit will be overridden by 2. This does trouble if the set limit is lower than 2 (for example disabled).

PR: https://github.com/Wedge/wedge/pull/40

EDIT: Merged
64
Support / Re: Some Errors
« on October 7th, 2016, 05:06 PM »
The error is from your mysql server. There is a limit of max connections set for this user. Rise this limit and this error should vanish.
65
Support / Re: Class-DB changes?
« on October 5th, 2016, 01:36 PM »
Yeah definetly possible. Didn't look into the wedge update mechanism, but does it force clean the cache? :hmm:
66
Support / Re: Class-DB changes?
« on October 3rd, 2016, 10:15 AM »
Got it on every ?topic request.

EDIT: Can't reproduce it with the last commit.
67
Support / Re: Class-DB changes?
« on October 2nd, 2016, 07:56 PM »
Quote from Nao on October 2nd, 2016, 03:53 PM
Did you enable everything in the admin area, debugging section?
Have to check that, could be the problem. Too many wedge installs :D
68
Support / Re: Class-DB changes?
« on October 2nd, 2016, 11:36 AM »
I'm on it but it needs some time. The sql stuff is not throwing an error but echoing it. So no line which is doing bad stuff. But I guess something with the assoc stuff is doing that.
69
Support / Re: Class-DB changes?
« on October 1st, 2016, 02:15 PM »
Quote from Freñiçh on October 1st, 2016, 12:06 PM
Well i'm done with it,deleted the last revs and get back to a working forum before the new revs.....even media gallery give's me all kind of errors and troubles.

I'm sorry but I can not afford to have a malfunctioning forum.
Argument order was also wrong.

https://github.com/Wedge/wedge/pull/39/commits/58da2c6abf56a9db1d0147c69506449e0637978a

But still, it's some changes which aren't really tested yet. So i'm sure there are some more things to fix, but all changes @Nao made are definetly worth it. It just needs some time and commits :lol:.

I'm now getting `The database value you're trying to insert does not exist: current_topic` :eheh:
70
Support / Re: Class-DB changes?
« on September 29th, 2016, 02:20 PM »
Didn't try it yet, but something like this should work.
Code: [Select]
public static function escape_string_replacement($str, $connection = null)
{
                $connection = $connection === null ? self::$_db_con : $connection;
return mysqli_real_escape_string($connection, $str);
}
71
Support / Re: Class-DB changes?
« on September 28th, 2016, 09:22 AM »
Quote from Nao on September 28th, 2016, 12:43 AM
Well, MySQL added support for 4-byte UTF8, which is used mostly by new smileys. If you try to insert such a character into a regular UTF8 database, it'll be inserted as a ? (question mark). Which isn't great. Of course, it's only for those smileys.
There are two ways to fix that:
- Either catch all utf8mb4 characters at MySQL insert time, and turn them into HTML entities (which is what Elk does, so that's emanuelle's recommended solution),
- Or ensure that the database uses utf8mb4 from the start, if supported. That way, the character will only take 4 bytes in the database, rather than the length of an entity... Which, okay, is barely twice that number.

I'm not a big fan of parsing all messages for character recognition. I don't know if the array_split followed with an ord() call on all array items would be really fast. (Probably faster than a regexp, but still...)
Thanks for clarification, got it. How about deciding once if the sql server supports (and is using uft8mb8 as charset on the important tables) and if so use the faster first approach, if not second?
On the other hand, utf8mb4 was introduced in 2010, so legacy support is not really needed.
Anyone who still uses a pre ut8mb4 mysql version should have other problems as character encoding.
Quote from Nao on September 28th, 2016, 12:46 AM
Regarding Firefox, I'm on the fence. You're using hardcoded values (min-width: 49em, another one like that, and a final 'padding: 0 15px' that wasn't in the original css), it's usually bad practice for future browser versions & screen resolutions.
I'd need to test and see if I can find something better, but I'm having so many problems with Firefox in general, I'm not in a hurry.
I'm totally fine with this. It's not a fix, it's more of a hack. Don't use firefox (except for tor browser) on my own, but people on our forum do and they reported this issue. So I tried, and fixed it, even if it's not the proper way. So totally fine with not merging it. People who have this problem can wait for a good fix or use this hack. I have nearly no idea of CSS, it's always playing around with browsers dev tools :whistle:.
72
Support / Re: Class-DB changes?
« on September 27th, 2016, 02:40 PM »
Quote
Fixed untested utf8mb4 placeholder code. Note, this still doesn't support 4-byte UTF8... I still don't know exactly what I should do with those. (Class-DB.php)
@Nao, Can you explain what's the problem with 4-byte UTF8?
73
Support / Re: Class-DB changes?
« on September 27th, 2016, 01:57 PM »
Firefox fix for Overflow bug:
http://wedge.org/pub/bugs/8819/overflow-bug/msg297352/#msg297352

Don't ask me why this got committed too, normally I seperate all changes in different branches and let the master branch untouched. Maybe i committed this stuff once to the master branch, i don't know. Can reset my master, create a new branch and do a new pull request if you want, or you just change those two things on your own :D
74
Support / Re: Class-DB changes?
« on September 27th, 2016, 12:51 PM »
Just applied latest commit to my test install ::)
Code: [Select]
Parse error: syntax error, unexpected 'handle_utf8mb4' (T_STRING), expecting variable (T_VARIABLE) in /usr/share/nginx/www/wedge/gz/app/Class-DB.php on line 621

EDIT: Going to fix it step by step:
Line 567:
Code: [Select]
return sprintf('\'%1$s\'', handle_utf8mb4(mysqli_real_escape_string($connection, $replacement)));
should be
Code: [Select]
return sprintf('\'%1$s\'', self::handle_utf8mb4(mysqli_real_escape_string($connection, $replacement)));
Line 621:
Code: [Select]
public static handle_utf8mb4($str)
should be
Code: [Select]
public static function handle_utf8mb4($str)

PR: https://github.com/Wedge/wedge/pull/38
75
Support / Re: Class-DB changes?
« on September 25th, 2016, 09:54 AM »
What version(s) of php are you using?