New revs

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #15, on September 5th, 2010, 03:07 AM »
Revision: 38
Author: arantor
Date: 02:06:18, 05 September 2010
Message:
! Ensure the auto added topic is updated to actually be the new admin's by ownership. (other/install.php) (ticket 21)
----
Modified : /trunk/other/install.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: 15,927
Re: New revs
« Reply #16, on September 5th, 2010, 09:20 AM »
Thanks for the auto-topic fix, I really don't have time to work on anything this weekend... (I hate it.)
BTW, the "Mark Resolved" feature in SD doesn't seem to work when clicked from within a ticket. It does work when using the icon in the ticket list.
I really should rewrite the template for the homepage, btw, just so it shows tickets a bit more like Mantis & PT do... Right now it's a bit confusing to me, because of this whole "waiting for user/admin feedback" thing that really isn't necessary here.
Quote
The reason for this one is to make it much easier to build on and/or replace in the event of using something like CKEditor; now whatever we do in terms of altering the code, we just have to update wedgeEditor rather than liberally hitting up the code throughout Wedge.
Oh... Right! Then it's fantastic.
I love it that you baptized our project :) Very logically, too, since this is something that is unlikely of reaching SMF at all. (And if it does, they'd better keep the name :P)
Re: New revs
« Reply #17, on September 5th, 2010, 12:05 PM »
rev 39
- Removed php_412_bugfix leftovers. (Load.php, smf_api.php, install.php)
- Some of the files were not requiring PHP 5. (index.php, webinstall.php, install.php, upgrade.php, Subs-Compat.php)
@ Is the eval() necessary in convert.php? Will it run on PHP4 without them? (Considering PHP4 isn't supported, it's not important but...)

--> The eval() stuff should be unneeded, but I'm just not sure whether PHP4 won't choke on some stuff in it. I don't think so, but I kinda have a hangover, AND I'm about to go to that stupid party in a minute.
Anyway, I'm not yet finished with the PHP5 requirements (I only did the files that should be a "barrier" to installing Wegde on PHP4). There are many more lines to remove, I'll do them later today when I get back, so we're finished with it.

I've also upgraded to the latest SMF rev (10093), and I'm nearly finished with the botslice/topslice stuff, hopefully, tonight, or tomorrow morning everything will be committed.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #18, on September 5th, 2010, 03:45 PM »
If you're referring to the eval that's executed with a check on PHP 5 (line 2436 or so), just dropping it back out of being an eval and removing the other branch would be fine. The point is that try/catch is a language construct in PHP 5 and would choke in PHP 4.

Adding try/catch is not something I'm overly looking at yet, since SMF's code is written to pretty much avoid failing anyway.
Posted: September 5th, 2010, 02:41 PM

Revision: 40
Author: arantor
Date: 14:02:17, 05 September 2010
Message:
! Removed unnecessary eval from dropping PHP 4 support (convert.php)
----
Modified : /trunk/other/converters/convert.php



EDIT to add
Quote
I really should rewrite the template for the homepage, btw, just so it shows tickets a bit more like Mantis & PT do... Right now it's a bit confusing to me, because of this whole "waiting for user/admin feedback" thing that really isn't necessary here.
Trouble is, it's all based on the logic in SimpleDesk.php, particularly shd_helpdesk_listing() IIRC - haven't touched that code in months, but it's the main part of SimpleDesk.php, which handles querying for data and processing it... it's not pretty, because it does have the ability to paginate on each block independently, and preserve pagination as you go, so if you hit page 2 of one block, and page 3 of another, both are preserved.
Posted: September 5th, 2010, 03:02 PM

Revision: 41
Author: arantor
Date: 14:26:17, 05 September 2010
Message:
! Do not add extraneous Core rows in themes table on install (install_2-0_mysql.sql)
! Set it to return to post after posting by default (install_2-0_mysql.sql)
----
Modified : /trunk/other/install_2-0_mysql.sql

Posted: September 5th, 2010, 03:26 PM

Revision: 42
Author: arantor
Date: 14:44:43, 05 September 2010
Message:
! Remove legacy PHP 4.3.2 and lower compatibility function (Subs-Auth.php)
----
Modified : /trunk/Sources/Subs-Auth.php

MultiformeIngegno

  • Posts: 1,337
Re: New revs
« Reply #19, on September 5th, 2010, 04:27 PM »
I love seeing new revs! :D
Can't wait to test Wedge!!

Nao

  • Dadman with a boy
  • Posts: 15,927
Re: New revs
« Reply #20, on September 5th, 2010, 04:38 PM »
@Lorenzo> An exclusive for you! Here's a short sample from some of our custom code!

Code: [Select]
if (!empty(

Sorry, can't show more. Hope it keeps you excited  :eheh:
Quote from Arantor on September 5th, 2010, 03:45 PM
If you're referring to the eval that's executed with a check on PHP 5 (line 2436 or so), just dropping it back out of being an eval and removing the other branch would be fine. The point is that try/catch is a language construct in PHP 5 and would choke in PHP 4.
Yeah, but I don't know if it could crash a PHP4 just by having some instructions it doesn't understand -- maybe com_exception, things like that.
Quote
Trouble is, it's all based on the logic in SimpleDesk.php, particularly shd_helpdesk_listing() IIRC - haven't touched that code in months, but it's the main part of SimpleDesk.php, which handles querying for data and processing it... it's not pretty, because it does have the ability to paginate on each block independently, and preserve pagination as you go, so if you hit page 2 of one block, and page 3 of another, both are preserved.
That's nice... But I'm sure it can be rewritten, still ;)
Quote
! Do not add extraneous Core rows in themes table on install (install_2-0_mysql.sql)
! Set it to return to post after posting by default (install_2-0_mysql.sql)
Yeah, I have yet to look into the mysql install files. I'm really removing things as things go, like, this morning I was simply looking for php_version and tried getting rid of all of the unneeded stuff. Still a lot remains to be done. Nothing biggie though.
Quote
Revision: 42
Author: arantor
Ahhhh!! You, filthy thief!![1] You stole my rev! I was looking forward to committing it myself! :P

'kay, just kidding, I already had rev 10.000 on SMF, and no one will take that one away from me... Despite Norv's efforts to revert part of that commit :niark:
Next stop: rev 69. Who will be getting it? :ph34r:

We just finished eating and I'm quite a bit wasted, again. What a weekend... And what with that 26'' monitor my hosts are using?! Why do they need that much space?
Anyway, I'll deal with all of these commits tonight (I have at least 3 on my waiting list, as I try to separate different fixes/additions into different commits).
Quote
! Remove legacy PHP 4.3.2 and lower compatibility function (Subs-Auth.php)
Can't look into the svn right now (see above), so... Are you doing stuff in my stead? Maybe we should determine how to deal with commit conflicts. Usually we work on different parts at the same time so it's okay, but for instance, if you're going to tackle a task in the bug tracker, could you assign it to yourself first? That way I would have a way to make sure we're not working on fixing the same issue at the same time. Which at best is a waste of time for one of us, and at worst, brings commit confusion. (I'm talking about big fixes and features, of course. If it's just a few lines of code, who cares if we're wasting time.)
 1. I like the sound of that.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #21, on September 5th, 2010, 04:43 PM »
Quote
Yeah, but I don't know if it could crash a PHP4 just by having some instructions it doesn't understand -- maybe com_exception, things like that.
It'll be a fatal error since try/catch is a language construct not in PHP 4. Since we don't support PHP 4 at all, it's not worth worrying about unless we reinstate the original branch too (since the eval will just return false in PHP 4 and do absolutely nothing otherwise)
Quote
That's nice... But I'm sure it can be rewritten, still
Sure it can. Just remember that each block is given specific parameters in order to specify what will be in each block. It shouldn't be too hard to deal with that though.
Quote
Yeah, I have yet to look into the mysql install files
It only occurred to me as I was adding the return_to_post entry which lives in the same place.
Quote
Ahhhh!! You, filthy thief!!
Hahaha
Quote
Can't look into the svn right now (see above), so... Are you doing stuff in my stead?
All I did was remove the code that defines session_regenerate_id() if it doesn't exist, it's not done with a PHP_VERSION check but a function_exists(), so it's possible you wouldn't find it otherwise.

Sure, can assign stuff, it's been a while since I worked in a team!

MultiformeIngegno

  • Posts: 1,337
Re: New revs
« Reply #22, on September 5th, 2010, 04:47 PM »
@Nao: I can't keep it secret!!!! Everybody needs to know this incredible scoop!! :P

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #23, on September 5th, 2010, 04:49 PM »
Quote from MultiformeIngegno on September 5th, 2010, 04:47 PM
@Nao: I can't keep it secret!!!! Everybody needs to know this incredible scoop!! :P
I'd love to tell people, but 1) it would risk being overhyped, and 2) we've kept it quiet as a courtesy to SMF. It is, as Nao has said, a PR move. Can you imagine what would happen if it were public what we were doing?

Nao

  • Dadman with a boy
  • Posts: 15,927
Re: New revs
« Reply #24, on September 5th, 2010, 04:52 PM »
Quote from Arantor on September 5th, 2010, 04:43 PM
Quote
Yeah, but I don't know if it could crash a PHP4 just by having some instructions it doesn't understand -- maybe com_exception, things like that.
It'll be a fatal error since try/catch is a language construct not in PHP 4. Since we don't support PHP 4 at all, it's not worth worrying about unless we reinstate the original branch too (since the eval will just return false in PHP 4 and do absolutely nothing otherwise)
I think I need to explain myself better, sorry. What I mean is, when you put a syntax error into a function, even a function that never gets called, PHP will directly crash on running the file. Would the try+catch and com_exception be considered as syntax errors? Because in that case, it would crash convert.php even before getting to the error message about the need to upgrade php.
However, it doesn't really matter, because you need to install your forum before you can convert to it, and if it won't install, there's no need to run the file anyway. So I'm good.
Quote
All I did was remove the code that defines session_regenerate_id() if it doesn't exist, it's not done with a PHP_VERSION check but a function_exists(), so it's possible you wouldn't find it otherwise.
I was actually planning to do a site-wide search on function_exists() as well, don't worry :) I only thought about it at the last moment though, so you're right, I could just as well have forgotten about it.
Quote
Sure, can assign stuff, it's been a while since I worked in a team!
We're a bit rusty :blush:

@Lorenzo> If you share that piece of code, even under a nickname, we'll KNOW it was your doing!

@Pete> He was kidding, re-read my previous PM with the code quote ;)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #25, on September 5th, 2010, 04:55 PM »
Just for reference, yes, try/catch (I keep typing cache instead, haha) would be a syntax error in PHP 4, so yes it would crash PHP in that respect.

Nao

  • Dadman with a boy
  • Posts: 15,927
Re: New revs
« Reply #26, on September 5th, 2010, 06:02 PM »
Quote from Arantor on September 5th, 2010, 04:55 PM
Just for reference, yes, try/catch (I keep typing cache instead, haha)
Thta's not a porblem, we're not hree to witre a thises. We're hree to wrok on Webge Wegde[/s] Wgede.
Quote
would be a syntax error in PHP 4, so yes it would crash PHP in that respect.
Yeah, that's what I feared...
Oh well, as I said, it's okay because convert.php is unlikely to be used if the installer refused to work in the first place.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #27, on September 5th, 2010, 08:19 PM »
Revision: 43
Author: arantor
Date: 19:18:15, 05 September 2010
Message:
! db_show_debug can now be shown to different user groups (admin, admin+mod, all logged in users, everyone), optionally with query log being separated. (ManageServer.php, Subs.php, ViewQuery.php, Help.english.php, ManageSettings.english.php) (ticket 12)
----
Modified : /trunk/Sources/ManageServer.php
Modified : /trunk/Sources/Subs.php
Modified : /trunk/Sources/ViewQuery.php
Modified : /trunk/Themes/default/languages/Help.english.php
Modified : /trunk/Themes/default/languages/ManageSettings.english.php

Nao

  • Dadman with a boy
  • Posts: 15,927
Re: New revs
« Reply #28, on September 5th, 2010, 09:27 PM »
Nice! Although that adds a lot of lines, but they'll run fast enough so that's okay :)
BTW --> I compressed the two isset()->unset() into a single unset() with both variables listed in it. isset() isn't needed, as PHP5 won't generate an error if you try unsetting a non-existent variable (it won't even do it if you try to unset an array entry in a non-existent array). So, might as well unset both in one go. :)

My first big one is here... (Mostly Norv's doing.)

rev 44
Code: [Select]
- More PHP4 stuff removal. (index.php, SSI.php)
* Updated to SMF rev 10093:
  ! Fixed calculating steps/substeps for log_actions changes (upgrade script) [Bug 4427]
  ! Added the optional (in 1.1 spec) assoc_type to OpenID parameters (Subs-OpenID.php) [Bug 4420]
  ! Small improvement to be more mod-friendly, a useless variable usage could have caused issues with mods (Load.php) [Bug 4445]
  ! Avatars loaded from remote locations may have failed resizing in some cases (script.js) [Bug 3842]
  ! Re-added a couple of flock() calls, as fclose() does not unlock the file on PHP 5.3.2+ (Load.php, ManageMaintenance.php) [Bug 4330]
  ! Improved 'who's online' behavior for a user who toggles WYSIWYG view (index.php) [Bug 4415]
  ! MySQL needs the autoincrement column defined as primary key (DbPackages-mysql.php) [Bug 4422]
  ! A variable was overwritten for font-size style tag, but needed later for <a> tag preservation (Subs-Editor.php -> Class-Editor.php) [Bug 4447]

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #29, on September 5th, 2010, 09:43 PM »
Quote
PHP5 won't generate an error if you try unsetting a non-existent variable (it won't even do it if you try to unset an array entry in a non-existent array)
And again... -.- If it weren't actually kind of important this would be almost funny.


Revision: 45
Author: arantor
Date: 20:42:54, 05 September 2010
Message:
! Again with the CRLF line endings having to disappear. (index.php, upgrade_2-0_mysql.sql, DbPackages-mysql.php, ManageMaintenance.php, Subs-OpenID.php, script.js)
----
Modified : /trunk/Sources/DbPackages-mysql.php
Modified : /trunk/Sources/ManageMaintenance.php
Modified : /trunk/Sources/Subs-OpenID.php
Modified : /trunk/Themes/default/scripts/script.js
Modified : /trunk/index.php
Modified : /trunk/other/upgrade_2-0_mysql.sql