New revs

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1815, on December 31st, 2012, 04:23 AM »
(4 files, 3KB)

Revision: 1815
Author: arantor
Date: 31 December 2012 03:22:53
Message:
+ Add ability for admins to force-clean-up on topics with too many exclamations/question marks or too many capitals. (ManagePosts.php, Post2.php, language files: Admin, Help)
----
Modified : /trunk/Sources/ManagePosts.php
Modified : /trunk/Sources/Post2.php
Modified : /trunk/Themes/default/languages/Admin.english.php
Modified : /trunk/Themes/default/languages/Help.english.php
Re: New revs
« Reply #1816, on December 31st, 2012, 06:06 AM »
(8 files, 6KB)

Revision: 1816
Author: arantor
Date: 31 December 2012 05:05:25
Message:
! Stupid bug with posting whereby attachments would be saved in reverse order to what they were added by the user. (Post2.php)

! Silly bug in view members area related to IP addresses change. (ManageMembers.php)

! Now possible to select Email Activation then Admin Approval. I believe I've hit all the routes correctly. Needs more testing. (Activate.php, ManageRegistration.php, Register.php, Subs-Members.php, language files: EmailTemplates, Login)
----
Modified : /trunk/Sources/Activate.php
Modified : /trunk/Sources/ManageMembers.php
Modified : /trunk/Sources/ManageRegistration.php
Modified : /trunk/Sources/Post2.php
Modified : /trunk/Sources/Register.php
Modified : /trunk/Sources/Subs-Members.php
Modified : /trunk/Themes/default/languages/EmailTemplates.english.php
Modified : /trunk/Themes/default/languages/Login.english.php
Re: New revs
« Reply #1817, on December 31st, 2012, 07:15 PM »
(4 files, 3KB)

Revision: 1817
Author: arantor
Date: 31 December 2012 18:14:47
Message:
! When displaying the date in threads in mobile view, the timezone adjustment was being applied twice. (Display.php)

! Auto-purge unapproved members after x days. Currently defaults to 0, configurable by admin. (ManageRegistration.php, ScheduledTasks.php, Login language file)
----
Modified : /trunk/Sources/Display.php
Modified : /trunk/Sources/ManageRegistration.php
Modified : /trunk/Sources/ScheduledTasks.php
Modified : /trunk/Themes/default/languages/Login.english.php
Re: New revs
« Reply #1818, on December 31st, 2012, 07:19 PM »
(1 file, 1KB)

Revision: 1818
Author: arantor
Date: 31 December 2012 18:18:07
Message:
! Stupid, stupid bug. is_activated should be 0 not 1 as 0 means unactivated. (ScheduledTasks.php)
----
Modified : /trunk/Sources/ScheduledTasks.php

@ Stupid mistake to make, but it's because I was thinking about registration_method which uses 0 for immediate registration, 1 for approval, while is_activated uses 0 for unapproved and 1 for approved.
Re: New revs
« Reply #1819, on January 1st, 2013, 01:54 AM »
First commit of 2013. Long may this activity continue.

(4 files, 5KB)

Revision: 1819
Author: arantor
Date: 01 January 2013 00:53:11
Message:
! Fix missing language strings in admin panel. They don't *do* anything yet, but they might shortly. (ManageMembers.english.php)

! Updated profile code to use correct function call rather than loadUserSettings... but I have the nasty feeling this isn't doing what it's supposed to be doing, since neither loadUserSettings calling we::anything or this is actually forcing a reload of the user's details. Maybe needs a new method to force reload? (Or deprotect init_user() maybe?) Either way there are times we need to be able to force reloading user data. (Profile-Modify.php)

! New DB column in the membergroups table, this time to allow for setting the display order of badges. The UI's not done, of course, but it is possible to force the order of groups for whatever reason. Even the primary group is not exempt. Also corrected one comment regarding show_when; primary group would not have a badge if show_when was set to 0 because the query simply excluded it from being loaded anyway. Now all we need is a spiffy UI for setting the order and whether they are to be displayed or not. (Load.php, install.sql)
----
Modified : /trunk/Sources/Load.php
Modified : /trunk/Sources/Profile-Modify.php
Modified : /trunk/Themes/default/languages/ManageMembers.english.php
Modified : /trunk/root/install.sql
Re: New revs
« Reply #1820, on January 1st, 2013, 05:57 AM »
4 files, 1 added, 221KB[1]

Revision: 1820
Author: arantor
Date: 01 January 2013 04:56:49
Message:
! UI for customising badge order and visibility. It's not perfect, it could use some UI loving in places (e.g. replacing the little handle square with something nicer), but it works and doesn't throw errors. As stated elsewhere, yes, it adds a complete copy of jQuery UI to the repo, but 1) this is only used in the admin area, not every page load, and 2) it means that if others do want to use it in their own plugins, it's available. (ManageMembergroups.php, ManageMembergroups.template.php, mana.css, jquery-ui-1.8.24.js, ManageMembers language file)
----
Modified : /trunk/Sources/ManageMembergroups.php
Modified : /trunk/Themes/default/ManageMembergroups.template.php
Modified : /trunk/Themes/default/languages/ManageMembers.english.php
Added : /trunk/Themes/default/scripts/jquery-ui-1.8.24.js
Modified : /trunk/Themes/default/skins/mana.css
 1. This is almost entirely due to jQuery UI.
Re: New revs
« Reply #1821, on January 1st, 2013, 06:25 PM »
20 files, 4KB

Revision: 1821
Author: arantor
Date: 01 January 2013 17:23:05
Message:
! Clean-up of legacy code. (ManageBoards.php, ManageMembergroups.php, ManageNews.php, ManagePermissions.php, ManageSmileys.php)

! Add the membergroups settings to the admin search. (ManageMembergroups.php, Admin.php)

! Fix collision with jQuery UI and Wedge's menu by renaming Wedge's menu (so that other plugin authors can use jQuery UI without problems). (GenericMenu.template.php, index.template.php, script.js)

! Drop the old group key option from the theme settings, convert it to a normal setting and inherit the sorting from the other sources. (Settings.template.php, Boards.php, Home.php, ManageMembergroups.php, Welcome.php, SSI.php, Subs-Membergroups.php, InfoCenter.template.php, language files: Help, ManageMembers, Themes)
----
Modified : /trunk/SSI.php
Modified : /trunk/Sources/Admin.php
Modified : /trunk/Sources/Boards.php
Modified : /trunk/Sources/Home.php
Modified : /trunk/Sources/ManageBoards.php
Modified : /trunk/Sources/ManageMembergroups.php
Modified : /trunk/Sources/ManageNews.php
Modified : /trunk/Sources/ManagePermissions.php
Modified : /trunk/Sources/ManageSmileys.php
Modified : /trunk/Sources/Subs-Membergroups.php
Modified : /trunk/Sources/Welcome.php
Modified : /trunk/Themes/default/GenericMenu.template.php
Modified : /trunk/Themes/default/InfoCenter.template.php
Modified : /trunk/Themes/default/Settings.template.php
Modified : /trunk/Themes/default/index.template.php
Modified : /trunk/Themes/default/languages/Help.english.php
Modified : /trunk/Themes/default/languages/ManageMembers.english.php
Modified : /trunk/Themes/default/languages/Themes.english.php
Modified : /trunk/Themes/default/languages/Themes.french.php
Modified : /trunk/Themes/default/scripts/script.js
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 #1822, on January 2nd, 2013, 09:46 PM »
rev 1822
(3 files, 2kb)

! Fixed class object instantiation not correctly initializing the browser array. (Class-System.php)

* Adding privacy tables to the list of protected tables. I think we should do a thorough check of all our table names before proceeding... (Class-DBPackages.php)

* Don't need to reset the permissions array at that point. (Still need to fix the fact that permissions can be tested against before 'we' is initialized...) (SSI.php)

@ Re: rev 1820, if we regularly update jQuery and jQuery UI, it'd probably be smarter to allow for plugin authors to link to an alias of these libraries, i.e. jquery.js and jquery-ui.js, which would then be redirected to the latest...? Or just rename the files.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1823, on January 3rd, 2013, 03:54 AM »
(90 files, 4KB)

Revision: 1823
Author: arantor
Date: 03 January 2013 02:52:40
Message:
! Lots of loose bytes saved. (many files)
----
Modified : /trunk/Sources/Admin.php
Modified : /trunk/Sources/Ajax.php
Modified : /trunk/Sources/Announce.php
Modified : /trunk/Sources/Boards.php
Modified : /trunk/Sources/Buddy.php
Modified : /trunk/Sources/Class-DB.php
Modified : /trunk/Sources/Class-Editor.php
Modified : /trunk/Sources/Class-FTP.php
Modified : /trunk/Sources/Class-System.php
Modified : /trunk/Sources/Credits.php
Modified : /trunk/Sources/Display.php
Modified : /trunk/Sources/Dlattach.php
Modified : /trunk/Sources/Errors.php
Modified : /trunk/Sources/Feed.php
Modified : /trunk/Sources/Groups.php
Modified : /trunk/Sources/Home.php
Modified : /trunk/Sources/JSModify.php
Modified : /trunk/Sources/JSOption.php
Modified : /trunk/Sources/Like.php
Modified : /trunk/Sources/Load.php
Modified : /trunk/Sources/Lock.php
Modified : /trunk/Sources/Login2.php
Modified : /trunk/Sources/Logout.php
Modified : /trunk/Sources/Mailer.php
Modified : /trunk/Sources/ManageBans.php
Modified : /trunk/Sources/ManageBoards.php
Modified : /trunk/Sources/ManageMaintenance.php
Modified : /trunk/Sources/ManageMembers.php
Modified : /trunk/Sources/ManageNews.php
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/Sources/ManageScheduledTasks.php
Modified : /trunk/Sources/ManageServer.php
Modified : /trunk/Sources/ManageSmileys.php
Modified : /trunk/Sources/Memberlist.php
Modified : /trunk/Sources/Merge.php
Modified : /trunk/Sources/MessageIndex.php
Modified : /trunk/Sources/ModerationCenter.php
Modified : /trunk/Sources/Modlog.php
Modified : /trunk/Sources/MoveTopic.php
Modified : /trunk/Sources/Notify.php
Modified : /trunk/Sources/Packages.php
Modified : /trunk/Sources/PersonalMessage.php
Modified : /trunk/Sources/Poll.php
Modified : /trunk/Sources/Post.php
Modified : /trunk/Sources/Post2.php
Modified : /trunk/Sources/PostModeration.php
Modified : /trunk/Sources/PrintPage.php
Modified : /trunk/Sources/Profile-Actions.php
Modified : /trunk/Sources/Profile-Modify.php
Modified : /trunk/Sources/Profile-View.php
Modified : /trunk/Sources/Profile.php
Modified : /trunk/Sources/QuickMod.php
Modified : /trunk/Sources/QuoteFast.php
Modified : /trunk/Sources/Recent.php
Modified : /trunk/Sources/Register.php
Modified : /trunk/Sources/Reminder.php
Modified : /trunk/Sources/RemoveTopic.php
Modified : /trunk/Sources/Report.php
Modified : /trunk/Sources/Search.php
Modified : /trunk/Sources/Search2.php
Modified : /trunk/Sources/Split.php
Modified : /trunk/Sources/Stats.php
Modified : /trunk/Sources/Subs-Admin.php
Modified : /trunk/Sources/Subs-Auth.php
Modified : /trunk/Sources/Subs-BoardIndex.php
Modified : /trunk/Sources/Subs-Boards.php
Modified : /trunk/Sources/Subs-Captcha.php
Modified : /trunk/Sources/Subs-Editor.php
Modified : /trunk/Sources/Subs-Login.php
Modified : /trunk/Sources/Subs-Membergroups.php
Modified : /trunk/Sources/Subs-Members.php
Modified : /trunk/Sources/Subs-MembersOnline.php
Modified : /trunk/Sources/Subs-Menu.php
Modified : /trunk/Sources/Subs-Moderation.php
Modified : /trunk/Sources/Subs-Post.php
Modified : /trunk/Sources/Subs-PrettyUrls.php
Modified : /trunk/Sources/Subs-Sound.php
Modified : /trunk/Sources/Subs.php
Modified : /trunk/Sources/Subscriptions-PayPal.php
Modified : /trunk/Sources/Themes.php
Modified : /trunk/Sources/Thoughts.php
Modified : /trunk/Sources/Unread.php
Modified : /trunk/Sources/UnreadReplies.php
Modified : /trunk/Sources/ViewQuery.php
Modified : /trunk/Sources/Who.php
Modified : /trunk/Themes/default/ManageBans.template.php
Modified : /trunk/Themes/default/ManageBoards.template.php
Modified : /trunk/Themes/default/ManageMedia.template.php
Modified : /trunk/Themes/default/Themes.template.php
Modified : /trunk/Themes/default/index.template.php

@ This is literally cleaning house after that big ol' find/replace operation. Whatever tool was being used, when it was told to use Unix format, it was using strict Unix format, which says there must be a blank line at the end of the file >_<
Re: New revs
« Reply #1824, on January 3rd, 2013, 05:12 AM »
(5 files, 2KB)

Revision: 1824
Author: arantor
Date: 03 January 2013 04:11:14
Message:
! Protect all the instances of calling plugin XML files against XXE. (Admin.php, ManagePermissions.php, ManagePlugins.php, ManageSettings.php, Reports.php)
----
Modified : /trunk/Sources/Admin.php
Modified : /trunk/Sources/ManagePermissions.php
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/Sources/ManageSettings.php
Modified : /trunk/Sources/Reports.php

@ If anyone asks me what XXE vulnerabilities are, I will explain. For now, just understand that it is a vector of vulnerability that SMF does not have because SMF doesn't use SimpleXML and we do; SMF, because of its history, rolled its own XML handling class while SXML is installed by default on PHP 5 and we can make use of it as such.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #1825, on January 3rd, 2013, 05:35 PM »
rev 1825
(4 files, 2kb)

! Noticed this typo in the latest scheduled tasks query. (ScheduledTasks.php)

* Clarifying a comment. (Security.php)

* Apparently, a singleton's __clone() function doesn't need to return false. (Class-System.php)

* Loading system object first, just in case. At least things like we::$is_admin will return null, and no error, if something is triggered too early. (index.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1826, on January 5th, 2013, 02:20 AM »
(5 files, 1 added, 43KB)

Revision: 1826
Author: arantor
Date: 05 January 2013 01:19:57
Message:
! Fixing an Englishism for Americanism as all the language files are "American" English. I couldn't immediately find any others. (Help language file)
! More of the plugin upload system including the magic new zip unpacking in place tour de force. This is part one of many, I should imagine a fair amount of it, including progression into the next step of installation, is broken but I want to commit where I am so I can rest a bit mentally. Bloody colds. (Class-ZipExtract.php, ManagePlugins.php, Subs-Plugins.php, ManagePlugins.template.php, ManagePlugins english)
----
Added : /trunk/Sources/Class-ZipExtract.php
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/Sources/Subs-Plugins.php
Modified : /trunk/Themes/default/ManagePlugins.template.php
Modified : /trunk/Themes/default/languages/Help.english.php
Modified : /trunk/Themes/default/languages/ManagePlugins.english.php

@ Remember the zip extract library is 18KB, not to mention the fact that the rest of the changes are not simple - there's a bunch of refactoring bits in there too.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #1827, on January 6th, 2013, 12:19 PM »
rev 1827
(12 files, 14kb)

+ Added add_jquery_ui() generic function. It will automatically load jQuery UI (only once per page), from your server or your CDN of choice, and it follows your jQuery Origin admin setting. (Subs-Cache.php, ManageMembergroups.php)

* Rewrote JavaScript code's is_* browser variables to avoid using $.browser, to ease transition into jQuery 1.9 once we do the jump. In the process, I saved a total of 2 gzipped bytes. Yes I did spend half an hour doing permutations just to see what was the shortest. Yes I did spend another half hour agonizing over the fact that I'm executing .toLowerCase() at least 6 times more than needed and wasting about a microsecond of your computer's CPU, just to save a total of 4 more bytes. But at least I got the little sucker and made it shorter than it was before. Don't look at me like that. Why are you looking at me. Get off my lawn. (script.js)

- The days of IE spoofing are over. In Opera's case, it stopped doing it by default at least 8 years ago. It's time to remove these odd hacks... (Class-System.php, script.js)

* Casenazi. Microsoft's CDN URLs are case-insensitive, so might as well use the lowercase version for better HTML gzipping... Ah ah. (Load.php)

* Spacinazi. I tend to like having a space after PHP flow control instructions, like if () or foreach (). catch () looks like a flow control instruction to me. But don't get me started on other instructions I might have overlooked... (Subs-Plugins.php)

* Minor system object reference simplifications. (Class-System.php, Load.php, Security.php, Subs-Login.php)

* Since the system object is now loaded (not initialized though) before all other file includes, it's always defined. (Errors.php, Security.php)

* Added 3 missing files to the file list for XML purposes. Not that we're ever gonna use that... (xml/detailed-version.php)

! Another bastardization that needed to be made. I feel for you, Pete. (Help.english.php)

! Fixed ISO to UTF8 in latest French file. (ManageBans.french.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1828, on January 7th, 2013, 05:03 AM »
(5 files, 4KB)

Revision: 1828
Author: arantor
Date: 07 January 2013 04:02:43
Message:
! Disallow zip and lock files from being served from the cache folder. (.htaccess)

! Clear up a factual inaccuracy. (Help.english.php)

! Add hooks as suggested by minimoo about handling registration errors a bit better, though taking into account the differences between as suggested and the way hooks are supposed to work. (ManagePlugins.php, Subs-Members.php)

! A minor optimisation based on learning a bit more about how the $reg_errors stuff actually worked; it supports pushing parameters as well. (Subs-Members.php)

! I forgot this: PHP in its wisdom will remove uploaded files at the end of execution if not moved or renamed. So I move it into the cache folder for now because it's somewhere that is writable in local space. However there is still plenty more to do, and I will need to add checks in to ensure that the files are purged periodically too. (Subs-Plugins.php)
----
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/Sources/Subs-Members.php
Modified : /trunk/Sources/Subs-Plugins.php
Modified : /trunk/Themes/default/languages/Help.english.php
Modified : /trunk/cache/.htaccess
Re: New revs
« Reply #1829, on January 7th, 2013, 07:29 PM »
(4 files, 3KB)

Revision: 1829
Author: arantor
Date: 07 January 2013 18:28:37
Message:
! SMF bug: error log could in some cases be the victim of a directory traversal bug, and/or showing the contents of files inappropriately. SMF devs have been notified. (ManageErrors.php)

! SMF bug: Some SSI functions still could be called from GET request, but not have the parameters to make this happen. I've added them to our list of functions that can't be called from GET, but I'm not sure this is something we need to keep as a feature, except for poll voting purposes anyway, and we might be better served by dropping all the other options for GETs. (SSI.php)

! Just 'correctness' in the drafts show code, everywhere else in that function uses the profile standard $memID rather than we::$id even though they should be the same. (Profile-View.php)

! Yes, Nao, I'll admit there was a bug in moderation filters! Stupid bug, don't know why I didn't catch this months ago when I first wrote it, calling the wrong function to update the UI. (ManageModeration.template.php)
----
Modified : /trunk/SSI.php
Modified : /trunk/Sources/ManageErrors.php
Modified : /trunk/Sources/Profile-View.php
Modified : /trunk/Themes/default/ManageModeration.template.php