diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-01-13 14:38:38 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-01-13 14:38:38 +0000 |
commit | 6ff8147a75fbb1977b0e73a66c39dcf7f9844f4d (patch) | |
tree | ee363f9fcd20539bf41b4904b736ee180a5a9448 | |
parent | 2f59320ca575fae6b98841ab05e84de756d2d39f (diff) | |
download | brdo-6ff8147a75fbb1977b0e73a66c39dcf7f9844f4d.tar.gz brdo-6ff8147a75fbb1977b0e73a66c39dcf7f9844f4d.tar.bz2 |
- Patch #44176 by Zen: performance improvement: split() -> explode().
-rw-r--r-- | includes/locale.inc | 4 | ||||
-rw-r--r-- | includes/menu.inc | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/includes/locale.inc b/includes/locale.inc index 934413621..c158e868d 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -311,7 +311,7 @@ function _locale_import_read_po($file) { $plural = 0; // Current plural form $po = strtr($po, array("\\\n" => "")); - $lines = split("\n", $po); + $lines = explode("\n", $po); $lineno = 0; foreach ($lines as $line) { @@ -903,7 +903,7 @@ function _locale_export_print($str) { * @author Jacobo Tarrio */ function _locale_export_wrap($str, $len) { - $words = split(" ", $str); + $words = explode(' ', $str); $ret = array(); $cur = ""; diff --git a/includes/menu.inc b/includes/menu.inc index b6d330319..fef280653 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -831,7 +831,7 @@ function theme_menu_links($links) { if (!count($links)) { return ''; } - $level_tmp = split('-', key($links)); + $level_tmp = explode('-', key($links)); $level = $level_tmp[0]; $output = "<ul class=\"links-$level\">\n"; foreach ($links as $index => $link) { |