Opened 9 years ago

Closed 9 years ago

#1815 closed Task (fixed)

Small optimization for PHP instantiation of FCKeditor

Reported by: ronkorving Owned by: wwalc
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 ronkorving 9 years ago.
fckeditor_php5.php.diff (379 bytes) - added by ronkorving 9 years ago.
fckeditor_php4.php.diff (379 bytes) - added by ronkorving 9 years ago.

Download all attachments as: .zip

Change History (7)

Changed 9 years ago by ronkorving

comment:1 Changed 9 years ago by ronkorving

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

Changed 9 years ago by ronkorving

Changed 9 years ago by ronkorving

comment:2 Changed 9 years ago by w.olchawa

  • Keywords HasPatch added; FCKeditor PHP IsCompatibleBrowser removed
  • Milestone FCKeditor 2.6 deleted
  • Priority changed from Low to Normal

comment:3 Changed 9 years ago by wwalc

  • Milestone set to FCKeditor 2.6
  • Owner set to wwalc
  • Status changed from new to assigned

Indeed closing "?>" is not needed.

comment:4 Changed 9 years ago by wwalc

  • Resolution set to fixed
  • Status changed from assigned to closed

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 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy