[wp-trac] [WordPress Trac] #5695: setup-config.php unnecessarily
writes to wp-config.php on every line
WordPress Trac
wp-trac at lists.automattic.com
Sun Jan 20 18:37:04 GMT 2008
#5695: setup-config.php unnecessarily writes to wp-config.php on every line
--------------------------+-------------------------------------------------
Reporter: hansengel | Owner: hansengel
Type: defect | Status: new
Priority: normal | Milestone: 2.5
Component: Optimization | Version: 2.5
Severity: normal | Keywords: has-patch
--------------------------+-------------------------------------------------
In {{{wp-admin/setup-config.php}}}, a loop is run to read each line of wp-
config-sample.php. There is a default case that says if it can't find a
match, that it will overwrite the file anyway with its contents.
This is completely unnecessary, because the file writes wp-config.php for
'''every line''', even if there's no match. This just slows down the
process!
Also, for some reason str_replace functions used in the switch statement
are used differently for separate cases, when there is no need.
--
Ticket URL: <http://trac.wordpress.org/ticket/5695>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list