From 8fda3fc1a32e510ab04d47c0a7ea8a8217fd7246 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Thu, 8 Apr 2004 21:08:03 +0000 Subject: [PATCH] removed an apparently complicated way to trim whitespace off, also threw php notices --- includes/Title.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index 94ef83ebc7..365378e529 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -601,14 +601,7 @@ class Title { # Clean up whitespace # - $t = preg_replace( "/[\\s_]+/", "_", $this->mDbkeyform ); - if ( "_" == @$t{0} ) { - $t = substr( $t, 1 ); - } - $l = strlen( $t ); - if ( $l && ( "_" == $t{$l-1} ) ) { - $t = substr( $t, 0, $l-1 ); - } + $t = preg_replace( "/[\\s_]+/", "_", trim($this->mDbkeyform) ); if ( "" == $t ) { wfProfileOut( $fname ); return false; -- 2.20.1