New revs

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1935, on February 20th, 2013, 05:47 AM »
(1 file, 1KB)

Revision: 1935
Author: arantor
Date: 20 February 2013 04:46:47
Message:
! A quick one before bed, consistent fixed handling of not-found language files. (Load.php)
----
Modified : /trunk/Sources/Load.php
Re: New revs
« Reply #1936, on February 21st, 2013, 02:17 AM »
(19 modified, 1 deleted, 5KB)

Revision: 1936
Author: arantor
Date: 21 February 2013 01:16:57
Message:
! Big home for text is big. (install.sql, ManagePosts.php)

! Spacinazi. Yup, I got there first! (ManageNews.php)

! Commenazi. (ManageSmileys.php)

! Trim meta descriptions to 160 characters. (Display.php, MessageIndex.php)

! Remove likes when a message is permanently removed. (RemoveTopic.php)

! Remove the likes a member made when they are deleted. (Subs-Members.php)

! Missing parameter in clean-up query. (Subs-Members.php)

- Death to the weird-ass hidden parameter introduced in 2006 that outside of a bugfix, no-one appeared to *ever* have encountered in any form whatsoever. (Search2.php, Search.template.php)

- Death to teh fulltexts. (ManageMaintenance.php, ManageSearch.php, ManageSearch.template.php, detailed-version.php, SearchAPI-Fulltext.php, language files: Help, ManageMaintenance, Search)
----
Modified : /trunk/Sources/Display.php
Modified : /trunk/Sources/ManageMaintenance.php
Modified : /trunk/Sources/ManageNews.php
Modified : /trunk/Sources/ManagePosts.php
Modified : /trunk/Sources/ManageSearch.php
Modified : /trunk/Sources/ManageSmileys.php
Modified : /trunk/Sources/MessageIndex.php
Modified : /trunk/Sources/RemoveTopic.php
Modified : /trunk/Sources/Search2.php
Deleted : /trunk/Sources/SearchAPI-Fulltext.php
Modified : /trunk/Sources/Subs-Members.php
Modified : /trunk/Themes/default/ManageSearch.template.php
Modified : /trunk/Themes/default/Search.template.php
Modified : /trunk/Themes/default/languages/Help.english.php
Modified : /trunk/Themes/default/languages/ManageMaintenance.english.php
Modified : /trunk/Themes/default/languages/ManageMaintenance.french.php
Modified : /trunk/Themes/default/languages/Search.english.php
Modified : /trunk/Themes/default/languages/Search.french.php
Modified : /trunk/other/xml/detailed-version.php
Modified : /trunk/root/install.sql
Re: New revs
« Reply #1937, on February 21st, 2013, 05:45 AM »
(5 files, 2KB)

Revision: 1937
Author: arantor
Date: 21 February 2013 04:43:48
Message:
! SMF bug 4947 - improper validation of $reservedVars. (Profile-Modify.php)

! SMF bug 4811 - legacy function call not needed. (RepairBoards.php)

! For some reason my JavaScript for the anti spam Q&A page started doing template weirdness. (Admin.template.php)

! SMF bug 4974 - misleading advice for regexp validation on CPF. (Help language file)

! SMF bug 4968 - register hook should expose more useful variables. (Subs-Members.php)

----
Modified : /trunk/Sources/Profile-Modify.php
Modified : /trunk/Sources/RepairBoards.php
Modified : /trunk/Sources/Subs-Members.php
Modified : /trunk/Themes/default/Admin.template.php
Modified : /trunk/Themes/default/languages/Help.english.php

@ It isn't often I check up on SMF bugs that need fixing, but I'm going to try and do it a bit more often. I do not check whether they are fixed in SMF or not, merely whether they are fixed in Wedge mainline.
Re: New revs
« Reply #1938, on February 21st, 2013, 06:11 AM »
(11 files, 3KB)

Revision: 1938
Author: arantor
Date: 21 February 2013 05:10:34
Message:
! Quick one from me. Not properly tested though I don't think I broke anything. Includes free harmonisation of forum_name to FORUMNAME and removing a duplicate language string from index + Post into EmailTemplates since there's the only time it's really used, most of the time it was already loaded and for the one time it wasn't, no biggie. (ManageMail.php, ManageNews.php, Profile-Actions.php, ScheduledTasks.php, Subs-Post.php, language files: index, Post, EmailTemplates)

! Scheduled emails looked like they were using very much the wrong language strings. Not tested but using a variable you did set up previously as opposed to a loop castoff has to be better. (Probably remains in SMF though.) (ScheduledTasks.php)
----
Modified : /trunk/Sources/ManageMail.php
Modified : /trunk/Sources/ManageNews.php
Modified : /trunk/Sources/Profile-Actions.php
Modified : /trunk/Sources/ScheduledTasks.php
Modified : /trunk/Sources/Subs-Post.php
Modified : /trunk/Themes/default/languages/EmailTemplates.english.php
Modified : /trunk/Themes/default/languages/EmailTemplates.french.php
Modified : /trunk/Themes/default/languages/Post.english.php
Modified : /trunk/Themes/default/languages/Post.french.php
Modified : /trunk/Themes/default/languages/index.english.php
Modified : /trunk/Themes/default/languages/index.french.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,082
Re: New revs
« Reply #1939, on February 21st, 2013, 04:51 PM »
rev 1939 -- tough job. C'est la vie.
(2 files, 14kb)

+ Added French agreement... I suppose that's how it's done..? I just took the text from the original SMF file. (Agreement.french.php)

* Partial French translation for e-mail templates. Seriously, this is one of the worse translation sessions I've ever had to go through... I've always hated this file, and I always will! (EmailTemplates.french.php)
Re: New revs
« Reply #1940, on February 21st, 2013, 04:52 PM »
rev 1940 -- more love for JSON, yay!
(5 files +2, 22kb)

+ Added support for JSON and XML strings to returnAjax() helper function... The JSON bit is interesting, because you really, really just need to supply an array or object to the function and it'll deal with it for you. Gotta like that. (Subs.php)

* More shameless script.js optimizations... Using .click() instead of .on(), while using a really odd structure, saves about 6 bytes. Changing is_opera init position and removing an unneeded 'false' init saves a byte or two (I'm unsure, gzip magic and all). Moving a semi-colon around ajaxUrl saves another byte. Removed a test for .thought_actions which I forgot to (saves 10 bytes!), and removed the strange .toLowerCase in the thought object -- while I suppose I did have a good reason to add this one, I'd rather save 5 bytes now and revert it later if I remember what it was for. Overall, saved close to 25 bytes while keeping the exact same functionality. (script.js)

* Rewrote JumpTo object to optimize it for performance and size. First, converted it to use a JSON object. This saves 26 bytes in JS, and a variable but noticeable number of bytes in the response. Then, err... Removed the name sanitizer, which was a leftover from SMF days, and saved an extra 25 bytes. The JSON thing took me an hour. This one took a second. Whatever. (script.js, Ajax.php, Xml.template.php)

+ Added a json_encode() fallback, called we_json_encode(). Just call it instead of the other. The original class was about 33KB, I reduced it to 6KB by stripping the decoder (which would only be used in the Google Closure codepath -- and I'm never going to recommend this one by default, so we're safe for now), all comments, cleaning up the code, and turning the class static. (Class-JSON.php, Subs.php)

+ Added an alternative json_encode() fallback to the attic. It's much shorter, much faster, and gave me similar results on test arrays, but I chose to go with the 'safe', PEAR-approved solution. (attic/Unused-json_decode.php)

! JSON_UNESCAPED_UNICODE is only for json_encode, so it was silly of me to use it in a json_decode call... Even if that call isn't actually in the Wedge codebase, ah ah. I scare myself. (attic/Unused-convertU.php)

@ Overall, saved 85 bytes in the gzipped script file since yesterday... And gave Wedge more power to boot ;)
Re: New revs
« Reply #1941, on February 21st, 2013, 05:15 PM »
rev 1941 -- I wanted to make a joke about the importance of being earnest, but it only works for in French. Damn translations. And I couldn't think of a Spielberg joke, either.
(27 files, 5kb)

* Replaced we::$is_ajax with AJAX constant... It's shorter, easier to type, and performance tests suggest that reading a constant is faster than accessing a static object. Also moved the declaration back to QueryString, because it no longer needs the system object and I'd rather define that one ASAP. (SOURCES: Class-Editor, Class-Skeleton, Class-System, JSModify, Like, Load, Aeva-Embed, Aeva-Gallery, Aeva-Gallery2, Aeva-ModCP, Aeva-Subs-Vital, Subs-Media, Packages, PersonalMessage, Post, Post2, Profile-View, QueryString, Search, Search2, Security, Split, Stats, Subs-Menu, Subs-Template, TEMPLATE: GenericPopup.template.php)

* CSS/JS filenames will now only retain the last 6 digits of the latest date. I'm even tempted to keep only 4 or 5... This gives a greater chance of cache collision, but seriously: one in a million, literally. And even if a file collides with an earlier version, what are the odds that the file, being at least 11.5 days old, will still be in some user's cache? And finally, you can always reupload a JS/CSS file to regenerate its date ID if someone complains about a collision. (Subs-Cache.php)

- Removed ?> footer from regular cache files. I tried hard, but couldn't find any evidence that this impacts performance, so we might as well save these two bytes, shouldn't we..? (Subs-Cache.php)
Re: New revs
« Reply #1942, on February 21st, 2013, 05:35 PM »
rev 1942 -- just one file, but it allows us to close a few bug reports... And hopefully not create any new one ;)
(1 file, 4kb)

! Committing my select box fix for .sb() not correctly updating the scrollbar. To tell you the truth, I left it to rot for a while because I couldn't figure out an efficient way to allow the user to click outside of a select box *after* **another** select box was redrawn with .sb()... Then I sat down, thought again about it, and I only have one thing to say. Why the hell would some code redraw a select box *while* you're in another? I mean, if you didn't even click one of the options, there's no reason for Wedge to redraw another select box anyway, right...? It just goes to show how silly I am sometimes. Well, the good news is that I'm not paid for all of that, so my hypothetical boss couldn't complain about the waste of time. (sbox.js)

@ Please note that not only the code is cool (it won't close the select box if it's being updated as of now...), but it's also shorter by 22 bytes than before. And I don't think I'd save more bytes by getting rid of the ability to keep the box open when updating it.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1943, on February 21st, 2013, 11:25 PM »
(7 modified, 3KB)

Revision: 1943
Author: arantor
Date: 21 February 2013 22:23:56
Message:
! Minor profile enhancement, language dropdown now includes the language flag. (Profile-Modify.php)

! Language caching seems oddly disturbed by admin search - but only by ManageMaintenance. I have no idea why but it works perfectly like this. (Admin.php)

! Restructure language editing into its own files (Admin.php, ManageServer.php, ManageLanguages.php)

! When caching the language list as we do anyway, don't cache the file's name as the language's name, cache the language's actual name in the right language! Yes, everything now says English and Francais rather nicely! (Load.php, index language file, yes I did both)

! In the list of languages installed, show all the relevant information (dictionary, RTL state), this is a prelude to removing that configuration page. There is really no need to edit that stuff from the ACP, only translators ever need to do so, but it's useful to have for reference. (ManageServer.php, ManageSettings language file)
----
Modified : /trunk/Sources/Admin.php
Modified : /trunk/Sources/Load.php
Modified : /trunk/Sources/ManageServer.php
Modified : /trunk/Sources/Profile-Modify.php
Modified : /trunk/Themes/default/languages/ManageSettings.english.php
Modified : /trunk/Themes/default/languages/index.english.php
Modified : /trunk/Themes/default/languages/index.french.php


Not a very exciting commit, I know, but it is a nice one and covers something I've wanted to do for a while.

📎 lang_listing.png - 16.45 kB, 944x262, viewed 287 times.

📎 lang_profile.png - 16.64 kB, 555x217, viewed 277 times.

Re: New revs
« Reply #1944, on February 22nd, 2013, 04:36 AM »
(8 files, 1 added (this time), 51KB)

Revision: 1944
Author: arantor
Date: 22 February 2013 03:33:21
Message:
! ManageLanguages.php got forgotten about last time :( (ManageLanguages.php)

! Some errant optimisation was not finished. (ManageMail.php)

! PMs have an email template. Use the darn email templates system! (Subs-Post.php, ManageMail.php, language files: EmailTemplates, ManageMail, PersonalMessage)

! Bug in scheduled tasks queue where failed items were incorrectly pushed to the back of the queue. (ScheduledTasks.php)
----
Added : /trunk/Sources/ManageLanguages.php
Modified : /trunk/Sources/ManageMail.php
Modified : /trunk/Sources/ScheduledTasks.php
Modified : /trunk/Sources/Subs-Post.php
Modified : /trunk/Themes/default/languages/EmailTemplates.english.php
Modified : /trunk/Themes/default/languages/EmailTemplates.french.php
Modified : /trunk/Themes/default/languages/ManageMail.english.php
Modified : /trunk/Themes/default/languages/PersonalMessage.english.php
Modified : /trunk/Themes/default/languages/PersonalMessage.french.php


@ I did as much of the French changes as I could, without resorting to Google Translate. There's two new strings in ManageMail and only one actual new string in the email templates.
Re: New revs
« Reply #1945, on February 22nd, 2013, 07:46 PM »
(2 files, 2KB)

Revision: 1945
Author: arantor
Date: 22 February 2013 18:42:53
Message:
! Some miscellaneous fixes to language loading, notably fixing issues relating to loading multiple files at once, which is the cause of the error log issues plus the cause of why I had to edit the admin search, which I'm reverting here too. There were several issues, including a flag not being cleared in multiple loads, plus errors occurring prior to the theme being loaded would cause an incorrect theme id to be used, creating spurious cache entries unnecessarily. (Admin.php, Load.php)
----
Modified : /trunk/Sources/Admin.php
Modified : /trunk/Sources/Load.php
Re: New revs
« Reply #1946, on February 23rd, 2013, 01:17 AM »
(4 files, 2KB)

Revision: 1946
Author: arantor
Date: 23 February 2013 00:16:32
Message:
! Forgot global variable for language editing system. (ManageMail.php)
! Merging moving topic notices is... um... bad. It's totally 'crossing the streams' bad. Don't do it. (Display.php, Merge.php, Errors language file)
----
Modified : /trunk/Sources/Display.php
Modified : /trunk/Sources/ManageMail.php
Modified : /trunk/Sources/Merge.php
Modified : /trunk/Themes/default/languages/Errors.english.php
Re: New revs
« Reply #1947, on February 23rd, 2013, 03:47 AM »
(4 files, 2KB, not sure I like these little commits much.)

Revision: 1947
Author: arantor
Date: 23 February 2013 02:46:14
Message:
! Technically CAPTCHA was a section, not a setting. (Admin.php)

! SMF bug 4640: remove index not used in any queries from log_activity table. (install.sql)

! SMF bug 4929: global variable overwritten in a loop. (MessageIndex.php)

! Stupidly used the wrong variable in the language area. No biggie, just meant all languages appeared to be RTL (even though they're not) (ManageLanguages.php)
----
Modified : /trunk/Sources/Admin.php
Modified : /trunk/Sources/ManageLanguages.php
Modified : /trunk/Sources/MessageIndex.php
Modified : /trunk/root/install.sql
Re: New revs
« Reply #1948, on February 23rd, 2013, 09:35 PM »
(3 files, 1KB)

Revision: 1948
Author: arantor
Date: 23 February 2013 20:34:23
Message:
! {literal} parameter in queries now supported. (Class-DB.php)

! Example query using {literal} (Subs-Members.php)

! XML returns from drafts were broken in r1926. (Subs-Post.php)
----
Modified : /trunk/Sources/Class-DB.php
Modified : /trunk/Sources/Subs-Members.php
Modified : /trunk/Sources/Subs-Post.php
Re: New revs
« Reply #1949, on February 24th, 2013, 05:14 AM »
(12 files, 1 deleted, 2KB)

Revision: 1949
Author: arantor
Date: 24 February 2013 04:13:43
Message:
- House cleaning. Nothing seems to be broken, and anything that is, is both non critical and inherently temporary and possibly even pending a commit in its own right on unrelated matters. (Admin.php, PackageGet.php, Packages.php, Subs-Package.php, Packages.template.php, language files: Admin, Errors, ManageSettings, Packages)
----
Modified : /trunk/Sources/Admin.php
Modified : /trunk/Sources/PackageGet.php
Deleted : /trunk/Sources/Packages.php
Modified : /trunk/Sources/Subs-Package.php
Modified : /trunk/Themes/default/Packages.template.php
Modified : /trunk/Themes/default/languages/Admin.english.php
Modified : /trunk/Themes/default/languages/Admin.french.php
Modified : /trunk/Themes/default/languages/Errors.english.php
Modified : /trunk/Themes/default/languages/Errors.french.php
Modified : /trunk/Themes/default/languages/ManageSettings.english.php
Modified : /trunk/Themes/default/languages/ManageSettings.french.php
Modified : /trunk/Themes/default/languages/Packages.english.php
Modified : /trunk/Themes/default/languages/Packages.french.php