diff options
author | Tom N Harris <tnharris@whoopdedo.org> | 2009-05-28 23:54:38 +0200 |
---|---|---|
committer | Tom N Harris <tnharris@whoopdedo.org> | 2009-05-28 23:54:38 +0200 |
commit | 4b7f9e7005c4562f8b4b554ea5ea53fb1ebf804a (patch) | |
tree | 11fd280d8bd90a9c6aa58e2f2e4c0f2e0e4adef0 /inc/common.php | |
parent | 4917a83a8d49fae8bcb51077f92f39bc839119c7 (diff) | |
download | rpg-4b7f9e7005c4562f8b4b554ea5ea53fb1ebf804a.tar.gz rpg-4b7f9e7005c4562f8b4b554ea5ea53fb1ebf804a.tar.bz2 |
Change expensive uses of split to the much faster explode.
darcs-hash:20090528215438-6942e-bf1b875e689ade6bd1a17e3d812ce16bf35c84a6.gz
Diffstat (limited to 'inc/common.php')
-rw-r--r-- | inc/common.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/common.php b/inc/common.php index dfc563b7f..5c95115a6 100644 --- a/inc/common.php +++ b/inc/common.php @@ -884,7 +884,7 @@ function pageTemplate($data){ * @author Andreas Gohr <andi@splitbrain.org> */ function rawWikiSlices($range,$id,$rev=''){ - list($from,$to) = split('-',$range,2); + list($from,$to) = explode('-',$range,2); $text = io_readWikiPage(wikiFN($id, $rev), $id, $rev); if(!$from) $from = 0; if(!$to) $to = strlen($text)+1; @@ -1101,8 +1101,8 @@ function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){ $subject = $lang['mail_changed'].' '.$id; $text = str_replace('@OLDPAGE@',wl($id,"rev=$rev",true,'&'),$text); require_once(DOKU_INC.'inc/DifferenceEngine.php'); - $df = new Diff(split("\n",rawWiki($id,$rev)), - split("\n",rawWiki($id))); + $df = new Diff(explode("\n",rawWiki($id,$rev)), + explode("\n",rawWiki($id))); $dformat = new UnifiedDiffFormatter(); $diff = $dformat->format($df); }else{ |