Ticket #1815 (closed Task: fixed)

Opened 3 months ago

Last modified 3 months ago

Small optimization for PHP instantiation of FCKeditor

Reported by: ronkorving Assigned to: wwalc
Priority: Normal Milestone: FCKeditor 2.6
Component: Server : PHP Version: SVN
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 on 02/04/08 13:02:14.
fckeditor_php5.php.diff (379 bytes) - added by ronkorving on 02/04/08 13:05:45.
fckeditor_php4.php.diff (379 bytes) - added by ronkorving on 02/04/08 13:06:23.

Change History

02/04/08 13:02:14 changed by ronkorving

  • attachment fckeditor.php.diff added.

02/04/08 13:03:14 changed by ronkorving

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

02/04/08 13:05:45 changed by ronkorving

  • attachment fckeditor_php5.php.diff added.

02/04/08 13:06:23 changed by ronkorving

  • attachment fckeditor_php4.php.diff added.

02/05/08 14:02:31 changed by w.olchawa

  • keywords changed from FCKeditor PHP IsCompatibleBrowser to HasPatch.
  • priority changed from Low to Normal.
  • milestone deleted.

02/13/08 11:01:47 changed by wwalc

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

Indeed closing "?>" is not needed.

02/20/08 17:46:45 changed 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.