Opened 10 years ago

Closed 10 years ago

#1815 closed Task (fixed)

Small optimization for PHP instantiation of FCKeditor

Reported by: Ron Owned by: Wiktor Walc
Priority: Normal Milestone: FCKeditor 2.6
Component: Server : PHP Version: SVN (FCKeditor) - Retired
Keywords: HasPatch Cc:

Description

The instantiation of FCKeditor from PHP can be done slightly faster. At the moment there is code being executed in FCKeditor_IsCompatibleBrowser() that in most situations will never be used. This patch solves this.

Attachments (3)

fckeditor.php.diff (1.2 KB) - added by Ron 10 years ago.
fckeditor_php5.php.diff (379 bytes) - added by Ron 10 years ago.
fckeditor_php4.php.diff (379 bytes) - added by Ron 10 years ago.

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by Ron

Attachment: fckeditor.php.diff added

comment:1 Changed 10 years ago by Ron

The patches also remove the unneeded closing "?>" and whitespace, which generate whitespace in output documents.

Changed 10 years ago by Ron

Attachment: fckeditor_php5.php.diff added

Changed 10 years ago by Ron

Attachment: fckeditor_php4.php.diff added

comment:2 Changed 10 years ago by Wojciech Olchawa

Keywords: HasPatch added; FCKeditor PHP IsCompatibleBrowser removed
Milestone: FCKeditor 2.6
Priority: LowNormal

comment:3 Changed 10 years ago by Wiktor Walc

Milestone: FCKeditor 2.6
Owner: set to Wiktor Walc
Status: newassigned

Indeed closing "?>" is not needed.

comment:4 Changed 10 years ago by Wiktor Walc

Resolution: fixed
Status: assignedclosed

Fixed with [1574].

Just few words to explain why closing tag is really unwanted here: suppose someone wants to use FCKeditor_IsCompatibleBrowser() function and move user to another location (send a header) if it returns false. Unfortunately it is currently impossible to do it without output buffering turned on due to whitespace characters at the end of files.

We could remove them with fixlineendings.php but in my opinion this is a safer solution.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy