cvs: phd(PHD_0_4) /themes/php chmsource.php

From: Date: Fri, 26 Dec 2008 15:36:21 +0000
Subject: cvs: phd(PHD_0_4) /themes/php chmsource.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-2829@lists.php.net to get a copy of this message
eniac2008 Fri Dec 26 15:36:21 2008 UTC Modified files: (Branch: PHD_0_4) /phd/themes/php chmsource.php Log: MFH:Fixed Bug #46714 - change ereg_* to preg_* http://cvs.php.net/viewvc.cgi/phd/themes/php/chmsource.php?r1=1.4.2.5.2.6&r2=1.4.2.5.2.7&diff_format=u Index: phd/themes/php/chmsource.php diff -u phd/themes/php/chmsource.php:1.4.2.5.2.6 phd/themes/php/chmsource.php:1.4.2.5.2.7 --- phd/themes/php/chmsource.php:1.4.2.5.2.6 Sat Dec 6 07:49:29 2008 +++ phd/themes/php/chmsource.php Fri Dec 26 15:36:20 2008 @@ -1,5 +1,5 @@ <?php -/* $Id: chmsource.php,v 1.4.2.5.2.6 2008/12/06 07:49:29 nilgun Exp $ */ +/* $Id: chmsource.php,v 1.4.2.5.2.7 2008/12/26 15:36:20 eniac2008 Exp $ */ require_once $ROOT . '/themes/php/chunkedhtml.php'; class chmsource extends chunkedhtml { @@ -333,8 +333,10 @@ public function header($id) { $header = parent::header($id); // Add CSS link to <head> - $header = ereg_replace('( *)</head>','\\1 <link media="all" rel="stylesheet" type="text/css" href="style.css"/> - \\1</head>', $header); + $pattern = '/(.*)(\r|\n|\r\n|\n\r)(.*)<\/head>/'; + $replacement = '$1 <link media="all" rel="stylesheet" type="text/css" href="style.css"/>$2$3</head>'; + + $header = preg_replace($pattern, $replacement, $header); return $header; }

« previous php.doc.cvs (#2829) next »