Ticket #1815 (closed Task: fixed)

Opened 17 months ago

Last modified 17 months ago

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)
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

fckeditor.php.diff (1.2 KB) - added by ronkorving 17 months ago.
fckeditor_php5.php.diff (379 bytes) - added by ronkorving 17 months ago.
fckeditor_php4.php.diff (379 bytes) - added by ronkorving 17 months ago.

Change History

Changed 17 months ago by ronkorving

Changed 17 months ago by ronkorving

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

Changed 17 months ago by ronkorving

Changed 17 months ago by ronkorving

Changed 17 months ago by w.olchawa

  • keywords HasPatch added; FCKeditor PHP IsCompatibleBrowser removed
  • priority changed from Low to Normal
  • milestone FCKeditor 2.6 deleted

Changed 17 months ago by wwalc

  • owner set to wwalc
  • status changed from new to assigned
  • milestone set to FCKeditor 2.6

Indeed closing "?>" is not needed.

Changed 17 months ago by wwalc

  • status changed from assigned to closed
  • resolution set to fixed

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.