#1488: new php5 connector
---------------------------+------------------------------------------------
Reporter: tedivm | Owner:
Type: New Feature | Status: reopened
Priority: Normal | Milestone: FCKeditor 2.6
Component: Server : PHP | Version:
Resolution: | Keywords: Confirmed HasPatch
---------------------------+------------------------------------------------
Changes (by tedivm):
* status: closed => reopened
* resolution: fixed =>
Comment:
wwalc-
I didn't try to make it compatible with PHP6, I just tried to make it
compatible with php5 and commented on the fact that, since php6 is coming
out soon, maybe php5 compatibility is something to reach for. Whether
things are public or protected doesn't matter, as long as they have
something.
When you made your changes, you undid a lot of the work I put into the
code. Specifically:
1) Your code doesn't allow developers to customize the ID field, which
mine did (and is kind of important). Before you comment on backwards
compatibility, I set it so that it would behave like it used to UNLESS
someone specifically overrides the ID.
2) You removed the edits I made to the string concatenation. For instance
$Link = $this->BasePath . 'editor/' .$File . '?InstanceName=' .
$this->InstanceName;
you turned back into:
$Link =
"{$this->BasePath}editor/{$File}?InstanceName={$this->InstanceName}" ;
For someone unfamiliar with PHP, this might not seem like a bit deal.
However, the way I did it is not only closer to the standard way, but is
also significantly faster. It also uses up a lot more memory, so much so
that PHP specifically comments about it in their manual-
"Note: Parsing variables within strings uses more memory than string
concatenation. When writing a PHP script in which memory usage is a
concern, consider using the concatenation operator (.) rather than
variable parsing. "
3) Ternary statements were specifically used because they make things
easier to read and run faster.
As I mentioned before, I would be happy to assist in developing this out
further. This file is also in use in a few dozen sites now, and it works
fine.
--
Ticket URL: <http://dev.fckeditor.net/ticket/1488#comment:5>
FCKeditor <http://www.fckeditor.net>
The text editor for Internet
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac