New revs

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: New revs
« Reply #2325, on November 17th, 2013, 11:53 AM »
rev 2325
 10 files changed, 36 insertions(+), 50 deletions(-), 2.16 KiB

! Unneeded or malformed params. (Aeva-Embed.php, Aeva-Foxy.php, ManageMedia2.php, Thoughts.php)

! Nao bug: AeMe didn't correctly get the inserted ID on playlists. (Aeva-Foxy.php)

! SMF bug: non-existent variable $type. Note: fixed in Elk, but not SMF 2.1. Also some bracketnazi. (Reports.php)

! Pete bug: search settings were broken by a hasty rewrite. (ManageSearch.php)

! Pete bug: yet another parenthesis problem, this one was in his very first commit for draft saving. Interesting. Just hoping this fix doesn't actually break the feature; in which case, at least I'll know what I need to remove. Also saving a few function calls if the draft is going to fail. (Subs-Post.php)

! Pete bug: $row['issued_by'], not $issued_by. (And yes, if you want to take your infraction code elsewhere, of course you don't have to bother about this bug fix.) (ModerationCenter.php)

! Pete bug: a single use of $db_connection instead of self::$_db_con since his very first commit of that class. I think the most amusing here is the irony of that bug being inside the function called serious_error. (Class-DB.php)

@ As in a few of the last commits, this changeset is mostly sponsored by hhvm-wrapper. A real life-saver, even if it took hours to get it to work...
Re: New revs
« Reply #2326, on November 19th, 2013, 12:20 PM »
rev 2326 -- note: I had to do a push --force to prevent a dirty repo. This is because I made an --amend on the latest pull request merge, and forgot to immediately push force it, so... Apologies if you end up with a broken repo when you pull.
 11 files changed, 46 insertions(+), 213 deletions(-), 3.33 KiB

* Previous/next topic links will now jump to the latest post, rather than the latest post in their first page (what the..?!) (Display.php)

* Simplified or improved some Unread code. If topic has no replies, don't bother with the #new anchor or a msg variable. Got rid of msg anchors as much as possible. Removed href and link variables, as they're unused duplicates. (Unread.php, UnreadReplies.php)

* Merged Unread/UnreadReplies templates back together, with a template param to differentiate them. This also gives me an opportunity to show that it's easy to set a template param through wetem::load(). Note, though, that specifying 'unread:false' wouldn't work, as 'false' is a non-false string value. I know, it's kind of counter-productive, but you can still use 'unread:true' for readability, and fall back to 'unread' (if the param has a false default) or 'unread:0' to specify false. (Recent.template.php)

* Again, don't link to a #new anchor if topic has no replies. (MessageIndex.php)

- Unneeded globals. (Boards.php, Home.php, Welcome.php, Subs-Media.php)

- Unneeded $custom_table parameters in addData() and addSeparator(). They were never used, and I have no plans to extend reports any further. (Reports.php)

- Unneeded $context['topics'][$id]['newtime']. (MessageIndex.php)

- $theme['show_member_bar'] was never used. (Boards.php, Home.php, Welcome.php)

* Micro-optimizations. Don't bother. (Errors.php)
Re: New revs
« Reply #2327, on November 19th, 2013, 08:03 PM »
rev 2327
 21 files changed, 50 insertions(+), 62 deletions(-), 2.47 KiB

- More unused globals. Since I just spent an hour manually checking these and fixing them (about 70 entries), and had no false positives at all, it's awfully tempting to write some code to remove these automatically before a manual check at commit time... (SOURCES: Like, ManageSmileys, Merge, Modlog, MoveTopic, PersonalMessage, Poll, Post, Post2, PrettyUrls-Filters, PrintPage, Profile-Actions, Profile-View, Profile, Subs, Suggest, ViewQuery, ViewRemote, Welcome, Aeva-Embed, Aeva-Foxy)
Re: New revs
« Reply #2328, on November 19th, 2013, 08:04 PM »
rev 2328
 7 files changed, 48 insertions(+), 70 deletions(-), 10.47 KiB (definitely doesn't represent the real patch size; it's not that big.)

* Harmonized template_button_strip calls to always use the return value. (index.template.php, Media.template.php, Recent.template.php, Reports.template.php)

* Turns out that wesql::insert CAN return a success value, it was just a matter of checking out the PHP documentation, not MySQL's. (Class-DB.php, Load.php)

* Cleaned up installer code: removed unused globals, harmonized all required-version variables into constants, and all constants are defined at startup. (install.php)
Re: New revs
« Reply #2329, on November 20th, 2013, 01:23 PM »
rev 2329 -- I would like to thank my humble unused-globals.php, and its newest feature, 'fix all files for me, duh.' Didn't save me the hassle of a manual check (in order to remove the couple of false positives I *did* find), but I still saved several hours overall.
 62 files changed, 162 insertions(+), 197 deletions(-), 12.90 KiB

- Last, and biggest, batch of unneeded globals. There are some that are going to stay in for now, because they're in files I'm not ready to commit yet. (62 files, not listing them all!)
Re: New revs
« Reply #2330, 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)
Re: New revs
« Reply #2331, 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.
Re: New revs
« Reply #2332, 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.
Re: New revs
« Reply #2333, on November 24th, 2013, 06:35 PM »
rev 2333
 15 files changed, 76 insertions(+), 64 deletions(-), 11.41 KiB

+ A nice little rewrite of the language flags system. Mostly, they're now shown in a select box, so that you can add support for as many languages as you want, without disrupting the layout. Also, I've tweaked the sidebar to allow moving the language selector over there in case you're using a mobile skin. (Subs-Cache.php, Profile-Modify.php, Admin.template.php, index.template.php, skeleton.xml)

* A tweak to the .inline-block mixin allows you to directly remove vertical-align (or change its value from the default "middle") by specifying an empty parameter (mixes .inline-block(""), basically.) (Subs-Cache.php, common.css)

* Added a few separators in the admin menu. (Admin.php)

* Minor tweaks, spacinazi, globalnazi, thoughtihadcommittedthatnazi. (JSOption.php, Load.php, ManageLanguages.php, ManageModeration.php, Profile-Modify.php, Subs-Members.php, MessageIndex.template.php, detailed-version.php)

! Fixed another quick edit bug. (This was fixed on wedge.org some time ago, just forgot to commit it.) (QuoteFast.php)
Re: New revs
« Reply #2334, on November 24th, 2013, 06:37 PM »
rev 2334
 8 files changed, 5 insertions(+), 20 deletions(-), 1.33 KiB

* Trying a universal border-box. We'll see how it fares. I'm a bit pessimistic, but I'd be glad if it works. (editor.css, index.css, index.member.css, mana.css, media.css, sections.css, zoom.css, Wireless/extra.css)

* A couple of other, minor fixes. Hmm, what's the point in committing border-box separately if I can't just mindlessly revert it because of that? Well? Well, I'm sure there's a point. (sections.css)
Re: New revs
« Reply #2335, on November 25th, 2013, 12:04 AM »
rev 2335 -- sorry for this boring 'maintenance' commit, I'm trying to reduce my number of uncommitted files.
 15 files changed, 22 insertions(+), 58 deletions(-), 2.33 KiB

* message_index_preview is a 'custom' setting set by themes, and as such, I think it should be in $context rather than $theme, which is 'automatically' built from the database. I also commented out that famous 'example' in the index template, because there's no need to grow internal arrays for nothing. (MessageIndex.php, Unread.php, UnreadReplies.php, index.template.php)

- Removed ability for 'themes' to set a default smiley set. Maybe I'll restore it later, but done differently. (JSOption.php, Load.php, Subs-Members.php, Themes.php, Profile.template.php, Admin.language.php)

- Some of the latest SQL changes were a bit too early in my workflow. I should probably postpone that until the code is actually ready... (install.sql)
Re: New revs
« Reply #2336, on November 27th, 2013, 05:18 PM »
rev 2336
 7 files changed, 55 insertions(+), 88 deletions(-), 2.08 KiB

- Removing markAsRead for PM previews. I believe most PMs are made to be answered, and if a PM is marked read and you forget about it, well... Wedge needs to bother you about it; you can preview it to read it, but you'll still need to visit the page if you want it marked as read. (PersonalMessage.php, script.js)

! Firefox needed even stronger protection against flexbox+code bugs. Sigh. (topic.js)

! Draft permission entries weren't translated in reports. Also useless colons. (Reports.php, Reports.template.php)

! Fixed a couple of minor issues in JS strict mode. (script.js)

* Looks like jQuery switched their CDN provider, and they now support HTTPS, allowing me to remove some of my fallback code for them. (Load.php, Subs-Cache.php)

* Now allowing JS file links without a protocol, but with the protocol header hack (//), to be seen as direct links. (Subs-Cache.php)
Re: New revs
« Reply #2337, on November 29th, 2013, 11:00 PM »
rev 2337 -- 1337, v2.0
 17 files changed, 45 insertions(+), 42 deletions(-), 2.84 KiB

* If the Wess analyzer finds an entry like '20px' without surrounding quotes, it will parse it as a number, as long as it starts with digits. (Class-System.php)

! This bit may be confusing (and/or controversial, feedback is welcome), but other variables will need to be surrounded with quotes, like the $vertical_align test in the inline-block mixin. I *could* force the addition of quotes at parse time, but I'm not sure it's worth the hassle. (common.css, index.css)

! Fixed select box height at selection time. (index.css)

* Renamed a confusing variable. (Class-CSS.php)

- Extra unneeded param. (repair_settings.php, not used anyway.)

* Spacinazi. (Class-System.php, Like.php, Load.php, ManageInfractions.php, ManageLanguages.php, ManageMail.php, ManagePlugins.php, ManageSearch.php, Pin.php, Profile-Actions.php, Reports.php, Subs-Plugins.php, Subs-Post.php)
Re: New revs
« Reply #2338, on December 1st, 2013, 02:02 PM »
rev 2338 -- very minor. Just cleaning up my commit log.
 8 files changed, 16 insertions(+), 9 deletions(-), 5.47 KiB

+ Added support for $txt language arrays in JS caching (as opposed to just regular strings.) (Subs-Cache.php)

* Language flag positioning tweaks. (ManageInfractions.template.php, ManageMail.template.php, ManageModeration.template.php, Register.template.php)

* Minor tweaks. (GenericList.template.php, mana.css)

* Commenazi. (Class-Editor.php)
Re: New revs
« Reply #2339, on December 3rd, 2013, 08:57 PM »
rev 2339 -- mostly CSS stuff. Next commit will be much, much cooler.
 5 files changed, 34 insertions(+), 54 deletions(-) 5 files changed, 34 insertions(+), 54 deletions(-)

- The install file still inserted some permissions that were deleted long ago. That's a Pete bug, I'm afraid... (install.sql)

! Also fixed a width bug in sidebar button, due to the border-box hack. Was visible in Firefox and mobile browsers, mostly. (index.css)

! Fixed select box internal heights, same reason. Boo, !important hack in reply to that? Not cool. But it works, so shut up and let me do the dirty work. (index.css)

! Firefox actionbar alignment issue, due to the (redacted) hack. Am I gonna fix related bugs forever? Nah.. Don't think so. Also removing some stats code, in preparation for the next commit, hopefully. (sections.css)

* Minor tweaks. (Wine/extra.css, Wilde/extra.css)