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 - Nao
2221
Features / Re: New revs
« on November 24th, 2013, 12:59 AM »
rev 2332 -- phew -- here it is, the bigger part of the admin rewrite. There are still many things to commit, but the bulk is in here.
 27 files changed, 509 insertions(+), 687 deletions(-), 9.09 KiB[1]

* Admin overhaul. It's all in a day's job for... (Admin.php, ManageAttachments.php, ManageMail.php, ManageMemberOptions.php, ManagePlugins.php, ManageServer.php, ManageSettings.php, Admin.template.php, index.template.php, ManageMembers.template.php, Admin.language.php, ManageSettings.language.php, Profile.language.php, likes.png, contributors.txt)

  * Got rid of prepareServerSettingsContext, everything in the admin panel now uses the prepareDBSettingContext format.
  * Updated comment that serves as documentation for the DB setting format in ManageServer.
  * Moved Likes settings and generic Member settings to General Settings. Moved PM and Paid Subscriptions to the first menu. Moved Embeds back to Media (nostalgia!). Moved Search Engine options to Maintenance.
  * Various fixes/simplifications to internal search.
  - More unneeded globals.
  - Removed forum_width setting; it's easy enough to do in skins: create a custom.css anywhere, add a '#wedge' line, hit Return, Tab, then type 'max-width: 80%' for instance. Save. Upload via FTP. Done, and it doesn't add clutter to your HTML.
  + Added support for big icons in setting titles. Added icons for Member settings and Likes settings; replaced ugly Likes logo with a new one.
  * Member defaults page now develops all items from the start. I don't like the hover/click process, it's just too slow. Also emphasized Yes/No settings with color codes. Renamed that page from 'Member preferences' to 'Member options', although I'm also trying to stick the word 'defaults' into it, but, hmm...

* Simplified $db_show_debug handling. (Class-DB.php, Errors.php, Subs-Cache.php, Subs-Template.php, Subs.php, ViewQuery.php)

@ Note: have yet to commit files like Load.php, meaning that this commit will definitely break your Wedge. Just wait until I'm done!
 1. I need to stop posting patch sizes. They have obviously nothing to do with actual patch sizes. This one is over 10x bigger than rev 2328 which has a bigger file size.
2222
Off-topic / Re: Doctor Who
« on November 23rd, 2013, 10:09 PM »
A most excellent episode indeed!

And the direction for the next season is at last something more interesting than endless prophecies ;)
2223
Features / Re: New revs
« on November 23rd, 2013, 08:41 PM »
rev 2331 -- first batch of admin rewrites. That is, by far, the easiest and shortest batch. You can imagine the rest, I guess...
 7 files changed, 193 insertions(+), 87 deletions(-), 2.78 KiB

* Renamed package_servers table to plugin_servers. Not that it can be used for now -- there's no server for these, really. (install.sql, ManageMaintenance.php, ManagePlugins.php)

* Moved Add Plugin to its own top menu item. (Admin.php, ManagePlugins.php, ManagePlugins.template.php, packages_add.gif)

! Potential security issue with plugin server credentials. (ManagePlugins.php, ManagePlugins.template.php)

- Disabled plugin server stuff for now anyway. I mean, Wedge.org has no facility for plugins, and I don't even know where to start... (ManagePlugins.php)

! 29 tables (!) were unprotected from removal. (Class-DBPackages.php)

@ Phew... Right in time before the Doctor Who 50th anniversary episode.
2224
Features / Re: New revs
« on November 23rd, 2013, 08:40 PM »
rev 2330
 6 files changed, 77 insertions(+), 71 deletions(-), 2.53 KiB

* Rewrote math() module in Wess, which was solid for 'easy' operations, but didn't work when, for instance, global variables ($settings, $context...) were used in the lot. (Class-CSS.php)

  + This adds support for intval(), floatval() and boolval() functions. Apply to all global variables, or variable numbers that end with a unit.
  ! Parentheses were not handling multiple nesting levels very well. I've rewritten the regex to use proper recursivity, I think it's the first time I ever use sub-pattern recursivity, which is nice.

! Fixed Zoomedia close button on Wilde. (zoom.css)

! Help popups were broken in the last commit. (Subs-Template.php)

* Local variables shouldn't share their name with a global variable. (ManageMedia.php, ManageMedia3.php)

* Language tweak. (ManagePermissions.french.php)
2225
Off-topic / Re: Doctor Who
« on November 23rd, 2013, 07:15 PM »
Actually, the 20:05 time is a re-run of The Name of the Doctor. It didn't click with me, with all these 'The ... of the Doctor' in recent days, so I just accepted it as the new episode. The Day of the Doctor, itself, will be shown at 20:50, so indeed, that's the same time as the UK showtime. Glad I cleared that up, eheh.
2226
Off-topic / Re: A short script to remove unused, useless globals in PHP.
« on November 23rd, 2013, 03:19 PM »
No. Shows up when doing site operations like merging pull requests or creating a repo.
I'm aware of how settings work don't worry ;)
O just want the website to follow my own personal settings but they won't. They only pass valid emails to git. Or you have to use their no spam email, but as I said, it's buggy, and github is not giving feedback.

Re history rewrite, it's done through git filter-branch. There's a script for email rewriting in the official online git book (git-scm.com iirc), and stackoverflow of course.
2227
Off-topic / Re: Doctor Who
« on November 23rd, 2013, 02:50 PM »
Quote from Aaron on November 23rd, 2013, 01:25 PM
It was full of cameos! Carole Ann Ford played a grandmother,
I missed that. I only noticed her in the post-credits.
Quote from Aaron on November 23rd, 2013, 01:25 PM
William Russell played the security guard at the beginning... I'm pretty sure I spotted Mark Gatiss in the background somewhere, too. I should watch it a second time, I guess. :P
Yeah, eh eh.

Okay, what time is the episode going to shown at, in the UK? And in the Netherlands it's being shown too, I guess..?
Because here in France, it's at 20:05 (8:05PM), so that's the equivalent of 19:05 in the UK I think, and from what I can see, their theater showings are at either 19:30 or 19:50..?! Does that mean we're getting the episode before everyone else? I don't think so :P
2228
Off-topic / Re: Doctor Who
« on November 23rd, 2013, 09:01 AM »
It was a biopic not a docudrama ;)
And yes, very nicely done. It tended to drag here and there, but overall we thoroughly enjoyed it. There was an unexpected cameo too. I also enjoyed the poat-credits extras. :)
2229
Off-topic / Re: A short script to remove unused, useless globals in PHP.
« on November 23rd, 2013, 12:09 AM »
Quote from Nao on November 19th, 2013, 05:19 PM
This will be my first 'real' use of github though, and I'm wondering if it's worth hiding my e-mail address over there. Also, using the antispam feature, my e-mail address starts with "Naowe@" (my old user-name), when it's been renamed for quite a long time to "Nao@"... Dunno why it's still using that old name. Anyone knows how to fix, maybe..?
I have yet to receive an answer from github, which is surprising, given that my earlier support request didn't involve a bug report and was answered within a few hours.

This means that I'm still unable to launch the repo. Although I could just give up on the idea of using the website's merging feature at all. They have a method to do the merges locally, so I could possibly fetch pull requests, then either rebase or merge them, whatever, and then push them to the official repo. That would, effectively, make my local repo the 'authoritative' one, with the github repo being just a 'backup' of sorts, I guess. And it also means I'm the only merger around forever, at least until I'm ready for 'more'.
2230
Off-topic / Re: Doctor Who
« on November 22nd, 2013, 12:51 PM »
Today's Google Doodle is... interesting ;)
2231
Archived fixes / Re: Help Popup is broken
« on November 22nd, 2013, 12:29 PM »
I actually broke that this week and then fixed it yesterday and uploaded the fix here. It's in my commit change set for today but it's one of the biggest patches in recent days so I need to test again and again.
Just revert the Subs-Template file to its previous commit if you are in a hurry. ;)
2232
The Pub / Re: Is the admin area in urgent need of an overhaul?
« on November 21st, 2013, 08:57 PM »
That's pretty much it; prepareServerContextSettings (or something like that) is no longer. It's now merged with the 'regular' version, which I also tweaked to be easier to understand (seriously, some parts of that function were just too complicated for their own good. Had that developer never heard about assigning temp variables anyway..?!)

As a result, all pages can now freely save any variables to the Settings.php file, they just need to specify 'file' => true in their array declaration.
Also, I removed some extra code that didn't make sense to me. $db_show_debug is supposed to be either 'true' or 'false' (not really 'false', anything other than 'true'), but not '1' for instance. I traced this implementation back to SMF 1.1 beta 1 or 2 (I don't have earlier code for the 1.1 branch, and 1.0.x doesn't have $db_show_debug at all), it was really written like that from the start.

Pete had written some check-up code that ensured the variable was set to true or false, rather than 0 or 1. It probably would have been simpler to just go through the whole codebase, as I did, and rewrite all those 'exact' tests ($db_show_debug === true). I'm pretty sure the original code was written like that to avoid having people complain that $db_show_debug = 'false'; in the Settings.php would still show the debug code. Well, Wedge has this in the admin area, you don't need to access the file and update it yourself, so who cares..?

Finally, what I expect to be some 'security' code... Wedge/SMF check all variables that should be written to the file, and ensure they're of the correct format. But there's absolutely no reason they could be modified otherwise. It seems like a waste of time, to me... Maybe it was security code for an older version of PHP, I don't know.

That's pretty much all for today, I think.
Oh, and just for fun, I did a run of unused-globals.php on SMF 2.1, and it fixed over 900 variables automatically. I compared the files, and it's just fine. The only bug I had was because the SMF 2.1 repo is still badly handled. It made me laugh (and I rewrote my script to account for that), but I don't know, it just screams 'fix me!!!', and I don't want to.
2233
The Pub / Re: Is the admin area in urgent need of an overhaul?
« on November 21st, 2013, 12:26 AM »
I harmonized the labels with their associated variable name; it didn't take long! :lol:
2234
Off-topic / Re: A short script to remove unused, useless globals in PHP.
« on November 21st, 2013, 12:01 AM »
But what he "said" was based on the very first version of the script, wasn't it..? The one that was buggy and fixed less than an hour later...
2235
Off-topic / Re: A short script to remove unused, useless globals in PHP.
« on November 20th, 2013, 11:44 PM »
I don't know about packman. As for $smcFunc, I don't really see why it should give out false positives..?