New revs

MultiformeIngegno

  • Posts: 1,337

Nao

  • Dadman with a boy
  • Posts: 16,080
Re: New revs
« Reply #241, on October 12th, 2010, 02:55 PM »
rev 204
+ Added :edit: smiley. (install_2-0.sql, Install.english.php, Class-Editor.php, Subs.php)
* htmlspecialchars leftover. (ManageSettings.php)

PS: reproduced footnote error in Wedge... Hmpf. This will never end... I'll take a break or something.
Quote from Arantor on October 12th, 2010, 02:36 PM
Get a better browser then; Chrome's had it built in for ages. :P
Yeah, I remember that... Damn you, Google fanboys! :ph34r:
I'll stay with my lousy browser. It just added Web Sockets support. Yeah, I know, you've had it for a year, blah blah blah... But your tab UI has sucked from day one :niark:
Quote
Well... UTF-8 is one form of Unicode. The whole concept is a total mess anyway -sigh-. Anyway, the idea is that it should always be valid UTF-8 (and by proxy valid Unicode) except that in some cases it isn't, but I have no idea why that might be. It's been there since 1.1, and it may not be relevant any more - doubly so since it never seemed to be called before.
Yeah... Which is why I reported the issue to the SMF devs. Maybe they'll figure it out... We have much work on our hands, too.
Quote
What was happening is that there was an extra output buffer existing that shouldn't have existed, which was causing content not to be flushed properly - and even if it did get flushed, the result would be corrupted because it would be gzipped content when the header implied otherwise. (I haven't checked the browser-specific stuff yet, that's next up)
Okay... ob_clean is supposed to empty the buffer without deleting the hooks. So I guess what happened is: originally, there was one less buffer called, and the dev added that remark. Then, someone added an extra buffer that should NOT be used in attachments, and forgot (or wisely decided) not to use it in the code we're talking about, so that their buffer wasn't re-created after ob_get_clean(). But forgot to delete the mention about ob_clean().
Quote
Quote
unset($GLOBALS['cachedir'], $GLOBALS['db_character_set']);
I wonder why SMF never did that.
They can probably explain that using isset() saves 0.07 microseconds off execution time.
Of course, the foreach with a custom array will definitely eat that...

Let's just say they didn't know unset() could be called with multiple parameters.
Or that unset() on an undefined variable didn't generate any warnings or errors (except on an undefinex index in an undefined array, in PHP4 only.)
Maybe the foreach() was there because they planned to add more vars to it later...
Just like in Subs-Members.php... I see no other reason to use THAT, and even the comment spells it out. 'Characters'. (Feel free to delete it.)

Code: [Select]
// Characters we just shouldn't allow, regardless.
foreach (array('*') as $char)
if (strpos($checkName, $char) !== false)
if ($fatal)
fatal_lang_error('username_reserved', 'password', array($char));
else
return true;

IIRC, I already fixed a similar code block long ago. Was probably in Aeva Media... Something Dragooon had copied from SMF, I'd venture.
Quote
It still breaks though, vomiting raw JS onto the page :/
Okay, I see what you mean... The var is modified after that. Uh. That's what happens when you're busy fixing 12 things at the same time.
Well, I'll fix that back...
Quote
Not only that but we've made some very large changes to the codebase, and it's unlikely we'd have totally caught every one first time simply because they are very large changes with lots of consequences.
Not only that, but you have no idea how fun it's going to be when I get to update to the latest SMF SVN...
Basically, I now have to do all of the templates manually because they always change stuff around a .catbg class (which no longer exists), now I'll have to edit source files manually every time they make a change around a UTF call... ;)
Re: New revs
« Reply #242, on October 12th, 2010, 02:58 PM »
rev 205
! Fixing the settings_post_javascript fix. Today's the fixing game. (ManageSettings.php, Admin.template.php)

(Just to get this off my hands...)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #243, on October 12th, 2010, 04:13 PM »
Quote
Yeah, I remember that... Damn you, Google fanboys!
I thought I remembered seeing Opera have a resizeable textarea a year or more ago? Then again that would have been during my Star Pirates/Greasemonkey days where I was fudging GM to work on Firefox, Opera, Safari with SIMBL support (thanks to Asgard), so I sorta lost track of what did what.
Quote
Let's just say they didn't know unset() could be called with multiple parameters.
Works for me ;)
Quote
Just like in Subs-Members.php... I see no other reason to use THAT, and even the comment spells it out. 'Characters'. (Feel free to delete it.)
I bet once upon a time there were more characters in that list, or should have been.
Quote
Not only that, but you have no idea how fun it's going to be when I get to update to the latest SMF SVN...
As I keep trying to tell Antechinus, spending time farting around with stupid little changes in the source that doesn't benefit anyone just slows down actually fixing real issues.
Posted: October 12th, 2010, 03:00 PM

Revision: 206
Author: arantor
Date: 15:13:11, 12 October 2010
Message:
! Removed random support for Firefox and Opera in downloads, they work just fine with the default, even with filenames with UTF-8 in them. (Download.php)
! Another silly bugfix from the UTF-8 stuff. (Subs-Post.php)
----
Modified : /trunk/Sources/Download.php
Modified : /trunk/Sources/Subs-Post.php
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,080
Re: New revs
« Reply #244, on October 12th, 2010, 05:52 PM »
Quote from Arantor on October 12th, 2010, 04:13 PM
Quote
Yeah, I remember that... Damn you, Google fanboys!
I thought I remembered seeing Opera have a resizeable textarea a year or more ago?
Nope... None I can think of.
Quote
Then again that would have been during my Star Pirates/Greasemonkey days where I was fudging GM to work on Firefox, Opera, Safari with SIMBL support (thanks to Asgard), so I sorta lost track of what did what.
Opera has UserJS and indeed it probably can 'fix' that. It has dozens of hacks like that for every possible use.
I'm not using any, though. Vanilla Opera is just right for me. (Usually.)
Quote
I bet once upon a time there were more characters in that list, or should have been.
Actually, not... Was added in SMF2 RC3.
Quote
As I keep trying to tell Antechinus, spending time farting around with stupid little changes in the source that doesn't benefit anyone just slows down actually fixing real issues.
Hmm, some of these stupid little changes are interesting for the future... And we do discuss mostly little changes, too ;) So I wouldn't criticize him on that.
Look (if need be, since you're also following these) at what they're discussing these days: (last pages of these topics, obviously.)
http://www.simplemachines.org/community/index.php?topic=403149.0 --> Fustrate and splitting monolithic files into many files.
http://www.simplemachines.org/community/index.php?topic=404100.40 --> Ante adding jQuery to SMF 2.1
http://www.simplemachines.org/community/index.php?topic=400219.msg2815429#msg2815429 --> Norv and his "joke" (?!) about splitting the members table into several relational tables...


Speaking of Ante, I just found this amusing post from him...
Look at the date.
http://portamx.com/topic_1480.msg8657.html#msg8657
Now that he's a dev... Well, let's just say he's had a change of heart. ::)
(And Fel is again referring to self as "the PortaMx corp." :lol:) <PRV>

Also, Ante is a veteran coder, as can be seen here:
http://portamx.com/topic_535.msg5728.html#msg5728
Quote
! Removed random support for Firefox and Opera in downloads, they work just fine with the default, even with filenames with UTF-8 in them. (Download.php)
Yay, I knew it :) That's what you get when code stays static for years!
Did you test with older but still supported versions of Opera and FF? I can test with Opera 9 if you ask me.
Re: New revs
« Reply #245, on October 12th, 2010, 05:57 PM »
Quote from Arantor on October 12th, 2010, 04:13 PM
! Another silly bugfix from the UTF-8 stuff. (Subs-Post.php)
Can't we just remove the first parameter? It'll always be set to UTF-8 anyway...
list($charset, ...) =
There's plenty of $charset happiness to crush heartlessly.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #246, on October 12th, 2010, 08:19 PM »
Quote
That's what you get when code stays static for years!
Did you test with older but still supported versions of Opera and FF? I can test with Opera 9 if you ask me.
I didn't test with older stuff particularly; Chrome 7, FF 3.6.9 or 3.6.10, Opera 10.60 (I think) and IE 8. But as a general rule users on non IE platforms are much better about staying up to date, and really I think they've all moved on a long way since 2006. Except IE that still needs its hand holding otherwise it tries so hard to be clever and fails so dismally. No, IE, I am not using Windows-1252 for this!
Quote
Can't we just remove the first parameter? It'll always be set to UTF-8 anyway...
I just wanted it to work without spewing errors for registrations so I could sign up test accounts for attachment testing.

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
Re: New revs
« Reply #247, on October 12th, 2010, 09:25 PM »
Quote from Arantor on October 12th, 2010, 02:36 PM
Quote
Okay, I'll switch to the post editor... Quick Reply is cool when you're not replying to a long post. There's no handle to increase its size... (Idea for later.)
Get a better browser then; Chrome's had it built in for ages. :P
Firefox is fine, but it doesn't have resizeable text boxes that those... webkit browsers
A confident man keeps quiet.whereas a frightened man keeps talking, hiding his fear.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #248, on October 12th, 2010, 09:26 PM »
C'mon, you LURVE those Webkit browsers :D

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
Re: New revs
« Reply #249, on October 12th, 2010, 09:32 PM »
TROLL :P lol

Nao

  • Dadman with a boy
  • Posts: 16,080
Re: New revs
« Reply #250, on October 13th, 2010, 11:21 PM »
rev 207
+ Added French language translation -- hopefully up to date! (*.french.php)
+ Added flag icons for French and English languages -- a future feature. (Flag.english.png, Flag.french.png)
- Removed some core/babylon/classic theme leftovers. (upgrade_2-0.sql, Install.english.php)
* Temporarily renamed default theme to 'Wager'. (Install.english.php)
* Replaced logo with a cleaner version made by Bloc. (wedgelogo.png, index.template.php)
+ Added language strings for upcoming features: Ignore Topics, Merge double posts, Spoiler tag, Topic privacy, Blog system. (Errors.english.php, Help.english.php, index.english.php, ManageMembers.english.php, ManageSettings.english.php)
! Some permission names implied that *_any was for "other members", rather than "all members" (i.e. the *_own permission doesn't need to be enabled at the same time.) There may be some leftovers. (ManagePermissions.english.php)
Quote from Arantor on October 12th, 2010, 08:19 PM
I just wanted it to work without spewing errors for registrations so I could sign up test accounts for attachment testing.
Why would it give errors...? Oh, you mean it was a quick hack, somehow?

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #251, on October 13th, 2010, 11:52 PM »
I just had the account sign up regularly, which causes an email, and the email functions still had $charset in them without $charset being defined.

Nao

  • Dadman with a boy
  • Posts: 16,080
Re: New revs
« Reply #252, on October 13th, 2010, 11:57 PM »
rev 208
- Removed a few past dates from the calendar installer. Also deleted the next Thanksgiving because we won't be out by then. And we're British and French. Do you think we care about Thanksgiving? We can be bastards 365 days a year. That's cool. (install_2-0.sql)
* The unused UTF8 converter added a curious string to the database. Probably not worth looking into it as it'll be removed anyway. (ManageMaintenance.php)
- Removed a $context['utf8'] leftover. Used some escaping so I guess that's why Pete missed it. (Profile-Modify.php)
! Syntax error. (Admin.french.php)

---> Note to self: check why calendar seems to take more than 100% width.
Quote from Arantor on October 13th, 2010, 11:52 PM
I just had the account sign up regularly, which causes an email, and the email functions still had $charset in them without $charset being defined.
And no way to delete that?

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #253, on October 14th, 2010, 12:03 AM »
I didn't look into it that highly, I just wanted it to work without errors, I figured I'd worry about it being perfectly clean later.

Nao

  • Dadman with a boy
  • Posts: 16,080
Re: New revs
« Reply #254, on October 14th, 2010, 12:05 AM »
It just generated an error when saving one's profile account page.
(Happened after I changed my default language to French.)