Use strpos instead of strstr where ever possible, for speed. Props rob1n. fixes #3920

git-svn-id: https://develop.svn.wordpress.org/trunk@4990 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2007-03-07 05:29:15 +00:00
parent 5b1ff4fbd5
commit 56368548ad
26 changed files with 82 additions and 84 deletions
+2 -2
View File
@@ -120,14 +120,14 @@ class WP {
}
// If req_uri is empty or if it is a request for ourself, unset error.
if ( empty($request) || $req_uri == $self || strstr($_SERVER['PHP_SELF'], 'wp-admin/') ) {
if (empty($request) || $req_uri == $self || strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false) {
if (isset($_GET['error']))
unset($_GET['error']);
if (isset($error))
unset($error);
if ( isset($perma_query_vars) && strstr($_SERVER['PHP_SELF'], 'wp-admin/') )
if (isset($perma_query_vars) && strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false)
unset($perma_query_vars);
$this->did_permalink = false;