Ticket #3920: 3290.diff
File 3290.diff, 26.5 KB (added by , 18 years ago) |
---|
-
app.php
192 192 $this->in_content = array(); 193 193 } else { 194 194 $endtag = $this->ns_to_prefix($name); 195 if (strstr($this->in_content[count($this->in_content)-1], "<$endtag")) {195 if (strpos($this->in_content[count($this->in_content)-1], '<' . $endtag) !== false) 196 196 array_push($this->in_content, "/>"); 197 197 } else { 198 198 array_push($this->in_content, "</$endtag>"); … … 220 220 #print str_repeat(" ", $this->depth * $this->indent) . "data: #" . $data . "#\n"; 221 221 if(!empty($this->in_content)) { 222 222 // handle self-closing tags (case: text node found, need to close element started) 223 if (strstr($this->in_content[count($this->in_content)-1], "<")) {223 if (strpos($this->in_content[count($this->in_content)], '<') !== false) { 224 224 array_push($this->in_content, ">"); 225 225 } 226 226 array_push($this->in_content, $this->xml_escape($data)); -
wp-admin/admin-functions.php
1143 1143 if ( $markerdata ) { 1144 1144 $state = true; 1145 1145 foreach ( $markerdata as $n => $markerline ) { 1146 if ( strstr( $markerline, "# BEGIN {$marker}" ))1146 if (strpos($markerline, '# BEGIN ' . $marker) !== false) 1147 1147 $state = false; 1148 1148 if ( $state ) { 1149 1149 if ( $n + 1 < count( $markerdata ) ) … … 1151 1151 else 1152 1152 fwrite( $f, "{$markerline}" ); 1153 1153 } 1154 if ( strstr( $markerline, "# END {$marker}" )) {1154 if (strpos($markerline, '# END ' . $marker) !== false) { 1155 1155 fwrite( $f, "# BEGIN {$marker}\n" ); 1156 1156 if ( is_array( $insertion )) 1157 1157 foreach ( $insertion as $insertline ) … … 1189 1189 { 1190 1190 $state = false; 1191 1191 foreach ( $markerdata as $markerline ) { 1192 if ( strstr( $markerline, "# END {$marker}" ))1192 if (strpos($markerline, '# END ' . $marker) !== false) 1193 1193 $state = false; 1194 1194 if ( $state ) 1195 1195 $result[] = $markerline; 1196 if ( strstr( $markerline, "# BEGIN {$marker}" ))1196 if (strpos($markerline, '# BEGIN ' . $marker) !== false) 1197 1197 $state = true; 1198 1198 } 1199 1199 } … … 1758 1758 <p id="bh" style="text-align: center;"><a href="http://browsehappy.com/" title="'.$getit.'"><img src="images/browse-happy.gif" alt="Browse Happy" /></a></p> 1759 1759 '; 1760 1760 } 1761 if ( strstr( $_SERVER['HTTP_USER_AGENT'], 'MSIE' )) 1761 1762 if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) 1762 1763 add_action( 'admin_footer', 'browse_happy' ); 1763 1764 1764 1765 function documentation_link( $for ) { … … 1919 1920 function wp_import_upload_form( $action ) { 1920 1921 $size = strtolower( ini_get( 'upload_max_filesize' ) ); 1921 1922 $bytes = 0; 1922 if ( strstr( $size, 'k' ))1923 if (strpos($size, 'k') !== false) 1923 1924 $bytes = $size * 1024; 1924 if ( strstr( $size, 'm' ))1925 if (strpos($size, 'm') !== false) 1925 1926 $bytes = $size * 1024 * 1024; 1926 if ( strstr( $size, 'g' ))1927 if (strpos($size, 'g') !== false) 1927 1928 $bytes = $size * 1024 * 1024 * 1024; 1928 1929 ?> 1929 1930 <form enctype="multipart/form-data" id="import-upload-form" method="post" action="<?php echo $action ?>"> -
wp-admin/edit-link-form.php
22 22 } 23 23 24 24 if ('' == $value) { 25 if ('family' == $class && !strstr($link_rel, 'child') && !strstr($link_rel, 'parent') && !strstr($link_rel, 'sibling') && !strstr($link_rel, 'spouse') && !strstr($link_rel, 'kin')) echo ' checked="checked"';26 if ('friendship' == $class && !strstr($link_rel, 'friend') && !strstr($link_rel, 'acquaintance') && !strstr($link_rel, 'contact')) echo ' checked="checked"';27 if ('geographical' == $class && !strstr($link_rel, 'co-resident') && !strstr($link_rel, 'neighbor')) echo ' checked="checked"';25 if ('family' == $class && strpos($link_rel, 'child') === false && strpos($link_rel, 'parent') === false && strpos($link_rel, 'sibling') === false && strpos($link_rel, 'spouse') === false && strpos($link_rel, 'kin') === false) echo ' checked="checked"'; 26 if ('friendship' == $class && strpos($link_rel, 'friend') === false && strpos($link_rel, 'acquaintance') === false && strpos($link_rel, 'contact') === false) echo ' checked="checked"'; 27 if ('geographical' == $class && strpos($link_rel, 'co-resident') === false && strpos($link_rel, 'neighbor') === false) echo ' checked="checked"'; 28 28 if ('identity' == $class && in_array('me', $rels) ) echo ' checked="checked"'; 29 29 } 30 30 } -
wp-admin/import/blogger.php
941 941 $this->in_content = array(); 942 942 } else { 943 943 $endtag = $this->ns_to_prefix($name); 944 if (strstr($this->in_content[count($this->in_content)-1], "<$endtag")) {944 if (strpos($this->in_content[count($this->in_content)-1], '<' . $endtag) !== false) { 945 945 array_push($this->in_content, "/>"); 946 946 } else { 947 947 array_push($this->in_content, "</$endtag>"); … … 969 969 #print str_repeat(" ", $this->depth * $this->indent) . "data: #" . $data . "#\n"; 970 970 if(!empty($this->in_content)) { 971 971 // handle self-closing tags (case: text node found, need to close element started) 972 if (strstr($this->in_content[count($this->in_content)-1], "<")) {972 if (strpos($this->in_content[count($this->in_content)-1], '<') !== false) { 973 973 array_push($this->in_content, ">"); 974 974 } 975 975 array_push($this->in_content, $this->xml_escape($data)); -
wp-admin/menu.php
6 6 // The URL of the item's file 7 7 $menu[0] = array(__('Dashboard'), 'read', 'index.php'); 8 8 9 if ( strstr($_SERVER['REQUEST_URI'], 'edit-pages.php'))9 if (strpos($_SERVER['REQUEST_URI'], 'edit-pages.php') !== false) 10 10 $menu[5] = array(__('Write'), 'edit_pages', 'page-new.php'); 11 11 else 12 12 $menu[5] = array(__('Write'), 'edit_posts', 'post-new.php'); 13 if ( strstr($_SERVER['REQUEST_URI'], 'page-new.php'))13 if (strpos($_SERVER['REQUEST_URI'], 'page-new.php') !== false) 14 14 $menu[10] = array(__('Manage'), 'edit_pages', 'edit-pages.php'); 15 15 else 16 16 $menu[10] = array(__('Manage'), 'edit_posts', 'edit.php'); -
wp-admin/options.php
148 148 <th scope='row'><label for='$option->option_name'>$option->option_name</label></th> 149 149 <td>"; 150 150 151 if (str istr($value, "\n")) echo "<textarea class='$class' name='$option->option_name' id='$option->option_name' cols='30' rows='5'>$value</textarea>";151 if (strpos($value, "\n") !== false) echo "<textarea class='$class' name='$option->option_name' id='$option->option_name' cols='30' rows='5'>$value</textarea>"; 152 152 else echo "<input class='$class' type='text' name='$option->option_name' id='$option->option_name' size='30' value='" . $value . "'$disabled />"; 153 153 154 154 echo "</td> -
wp-admin/page.php
148 148 } 149 149 150 150 $sendback = wp_get_referer(); 151 if (str str($sendback, 'page.php')) $sendback = get_option('siteurl') .'/wp-admin/page.php';152 elseif (str str($sendback, 'attachments.php')) $sendback = get_option('siteurl') .'/wp-admin/attachments.php';151 if (strpos($sendback, 'page.php') !== false) $sendback = get_option('siteurl') .'/wp-admin/page.php'; 152 elseif (strpos($sendback, 'attachments.php') !== false) $sendback = get_option('siteurl') .'/wp-admin/attachments.php'; 153 153 $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback); 154 154 wp_redirect($sendback); 155 155 exit(); -
wp-admin/post.php
160 160 } 161 161 162 162 $sendback = wp_get_referer(); 163 if (str str($sendback, 'post.php')) $sendback = get_option('siteurl') .'/wp-admin/post-new.php';164 elseif (str str($sendback, 'attachments.php')) $sendback = get_option('siteurl') .'/wp-admin/attachments.php';163 if (strpos($sendback, 'post.php') !== false) $sendback = get_option('siteurl') .'/wp-admin/post-new.php'; 164 elseif (strpos($sendback, 'attachments.php') !== false) $sendback = get_option('siteurl') .'/wp-admin/attachments.php'; 165 165 $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback); 166 166 wp_redirect($sendback); 167 167 exit(); -
wp-admin/templates.php
52 52 if ( ! current_user_can('edit_files') ) 53 53 wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this blog.').'</p>'); 54 54 55 if ( strstr( $file, 'wp-config.php' ))55 if (strpos($file, 'wp-config.php') !== false) 56 56 wp_die('<p>'.__('The config file cannot be edited or viewed through the web interface. Sorry!').'</p>'); 57 57 58 58 update_recently_edited($file); -
wp-admin/upgrade-functions.php
922 922 923 923 if ($oldfile == 'index.php') { // Check to make sure it's not a new index 924 924 $index = implode('', file("$oldpath/$oldfile")); 925 if ( strstr( $index, 'WP_USE_THEMES' )) {925 if (strpos($index, 'WP_USE_THEMES') !== false) { 926 926 if (! @copy(ABSPATH . 'wp-content/themes/default/index.php', "$site_dir/$newfile")) 927 927 return false; 928 928 continue; // Don't copy anything … … 994 994 $f = fopen("$site_dir/style.css", 'w'); 995 995 996 996 foreach ($stylelines as $line) { 997 if (str str($line, "Theme Name:")) $line = "Theme Name: $theme_name";998 elseif (str str($line, "Theme URI:")) $line = "Theme URI: " . __get_option('siteurl');999 elseif (str str($line, "Description:")) $line = "Description: Your theme";1000 elseif (str str($line, "Version:")) $line = "Version: 1";1001 elseif (str str($line, "Author:")) $line = "Author: You";1002 fwrite($f, "{$line}\n");997 if (strpos($line, 'Theme Name:') !== false) $line = 'Theme Name: ' . $theme_name; 998 elseif (strpos($line, 'Theme URI:') !== false) $line = 'Theme URI: ' . __get_option('url'); 999 elseif (strpos($line, 'Description:') !== false) $line = 'Description: Your theme.'; 1000 elseif (strpos($line, 'Version:') !== false) $line = 'Version: 1'; 1001 elseif (strpos($line, 'Author:') !== false) $line = 'Author: You'; 1002 fwrite($f, $line . "\n"); 1003 1003 } 1004 1004 fclose($f); 1005 1005 } -
wp-blog-header.php
2 2 3 3 if (! isset($wp_did_header)): 4 4 if ( !file_exists( dirname(__FILE__) . '/wp-config.php') ) { 5 if ( strstr( $_SERVER['PHP_SELF'], 'wp-admin')) $path = '';5 if (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false) $path = ''; 6 6 else $path = 'wp-admin/'; 7 7 8 8 require_once( dirname(__FILE__) . '/wp-includes/classes.php'); -
wp-content/themes/default/functions.php
25 25 } 26 26 27 27 function kubrick_upper_color() { 28 if ( strstr( $url = kubrick_header_image_url(), 'header-img.php?' )) {28 if (strpos($url = kubrick_header_image_url(), 'header-img.php?') !== false) { 29 29 parse_str(substr($url, strpos($url, '?') + 1), $q); 30 30 return $q['upper']; 31 31 } else … … 33 33 } 34 34 35 35 function kubrick_lower_color() { 36 if ( strstr( $url = kubrick_header_image_url(), 'header-img.php?' )) {36 if (strpos($url = kubrick_header_image_url(), 'header-img.php?') !== false) { 37 37 parse_str(substr($url, strpos($url, '?') + 1), $q); 38 38 return $q['lower']; 39 39 } else -
wp-includes/classes.php
120 120 } 121 121 122 122 // If req_uri is empty or if it is a request for ourself, unset error. 123 if ( empty($request) || $req_uri == $self || strstr($_SERVER['PHP_SELF'], 'wp-admin/')) {123 if (empty($request) || $req_uri == $self || strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false) { 124 124 if (isset($_GET['error'])) 125 125 unset($_GET['error']); 126 126 127 127 if (isset($error)) 128 128 unset($error); 129 129 130 if ( isset($perma_query_vars) && strstr($_SERVER['PHP_SELF'], 'wp-admin/'))130 if (isset($perma_query_vars) && strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false) 131 131 unset($perma_query_vars); 132 132 133 133 $this->did_permalink = false; -
wp-includes/comment-template.php
239 239 240 240 function trackback_rdf($timezone = 0) { 241 241 global $id; 242 if ( !stristr($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator')) {243 echo '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"244 xmlns:dc="http://purl.org/dc/elements/1.1/"245 xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">246 <rdf:Description rdf:about="';247 the_permalink();248 echo '"'."\n";249 echo ' dc:identifier="';250 the_permalink();251 echo '"'."\n";252 echo ' dc:title="'.str_replace('--', '--', wptexturize(strip_tags(get_the_title()))).'"'."\n";253 echo ' trackback:ping="'.trackback_url(0).'"'." />\n";254 echo '</rdf:RDF>';242 if (strpos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') !== false) { 243 echo '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 244 xmlns:dc="http://purl.org/dc/elements/1.1/" 245 xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"> 246 <rdf:Description rdf:about="'; 247 the_permalink(); 248 echo '"'."\n"; 249 echo ' dc:identifier="'; 250 the_permalink(); 251 echo '"'."\n"; 252 echo ' dc:title="'.str_replace('--', '--', wptexturize(strip_tags(get_the_title()))).'"'."\n"; 253 echo ' trackback:ping="'.trackback_url(0).'"'." />\n"; 254 echo '</rdf:RDF>'; 255 255 } 256 256 } 257 257 -
wp-includes/feed.php
165 165 166 166 function html_type_rss() { 167 167 $type = get_bloginfo('html_type'); 168 if ( strstr( $type, 'xhtml' ))168 if (strpos($type, 'xhtml') !== false) 169 169 $type = 'xhtml'; 170 170 else 171 171 $type = 'html'; -
wp-includes/formatting.php
29 29 if (isset($curl{0}) && '<' != $curl{0} && $next) { // If it's not a tag 30 30 // static strings 31 31 $curl = str_replace($static_characters, $static_replacements, $curl); 32 33 32 // regular expressions 34 33 $curl = preg_replace($dynamic_characters, $dynamic_replacements, $curl); 35 } elseif ( strstr($curl, '<code') || strstr($curl, '<pre') || strstr($curl, '<kbd') || strstr($curl, '<style') || strstr($curl, '<script') ) {34 } elseif (strpos($curl, '<code') !== false || strpos($curl, '<pre') !== false || strpos($curl, '<kbd') !== false || strpos($curl, '<style') !== false || strpos($curl, '<script') !== false) { 36 35 $next = false; 37 36 } else { 38 37 $next = true; … … 78 77 } 79 78 $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\s*<br />!', "$1", $pee); 80 79 $pee = preg_replace('!<br />(\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee); 81 if ( strstr( $pee, '<pre' ))80 if (strpos($pee, '<pre') !== false) 82 81 $pee = preg_replace('!(<pre.*?>)(.*?)</pre>!ise', " stripslashes('$1') . stripslashes(clean_pre('$2')) . '</pre>' ", $pee); 83 82 $pee = preg_replace( "|\n</p>$|", '</p>', $pee ); 84 83 … … 658 657 659 658 function is_email($user_email) { 660 659 $chars = "/^([a-z0-9+_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,6}\$/i"; 661 if (strstr($user_email, '@') && strstr($user_email, '.')) {660 if (strpos($user_email, '@') !== false && strpos($user_email, '.') !== false) { 662 661 if (preg_match($chars, $user_email)) { 663 662 return true; 664 663 } else { … … 1072 1071 $strip = array('%0d', '%0a'); 1073 1072 $url = str_replace($strip, '', $url); 1074 1073 $url = str_replace(';//', '://', $url); 1075 $url = ( !strstr($url, '://')) ? 'http://'.$url : $url;1074 $url = (strpos($url, '://') === false) ? 'http://'.$url : $url; 1076 1075 $url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url); 1077 1076 if ( !is_array($protocols) ) 1078 1077 $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet'); -
wp-includes/functions.php
780 780 $protocol = ''; 781 781 } 782 782 783 if ( strstr($uri, '?')) {783 if (strpos($uri, '?') !== false) { 784 784 $parts = explode('?', $uri, 2); 785 785 if ( 1 == count($parts) ) { 786 786 $base = '?'; … … 789 789 $base = $parts[0] . '?'; 790 790 $query = $parts[1]; 791 791 } 792 } else if ( !empty($protocol) || strstr($uri, '/')) {792 } elseif (!empty($protocol) || strpos($uri, '/') !== false) { 793 793 $base = $uri . '?'; 794 794 $query = ''; 795 795 } else { … … 1337 1337 if ( empty($title) ) 1338 1338 $title = __('WordPress › Error'); 1339 1339 1340 if ( strstr($_SERVER['PHP_SELF'], 'wp-admin'))1340 if (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false) 1341 1341 $admin_dir = ''; 1342 1342 else 1343 1343 $admin_dir = 'wp-admin/'; -
wp-includes/general-template.php
554 554 $daywithpost = array(); 555 555 } 556 556 557 558 559 if ( strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE') || strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'camino') || strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'safari') ) 557 if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false || strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'camino') !== false || strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'safari') !== false) 560 558 $ak_title_separator = "\n"; 561 559 else 562 560 $ak_title_separator = ', '; -
wp-includes/link-template.php
70 70 $unixtime = strtotime($post->post_date); 71 71 72 72 $category = ''; 73 if ( strstr($permalink, '%category%')) {73 if (strpos($permalink, '%category%') !== false) { 74 74 $cats = get_the_category($post->ID); 75 75 $category = $cats[0]->category_nicename; 76 76 if ( $parent=$cats[0]->category_parent ) … … 158 158 $parentlink = _get_page_link( $object->post_parent ); // Ignores page_on_front 159 159 else 160 160 $parentlink = get_permalink( $object->post_parent ); 161 if ( ! strstr($parentlink, '?'))161 if (strpos($parentlink, '?') === false) 162 162 $link = trim($parentlink, '/') . '/' . $object->post_name . '/'; 163 163 } 164 164 -
wp-includes/pluggable.php
280 280 $adminurl = strtolower(get_option('siteurl')).'/wp-admin'; 281 281 $referer = strtolower(wp_get_referer()); 282 282 if ( !wp_verify_nonce($_REQUEST['_wpnonce'], $action) && 283 !(-1 = = $action && strstr($referer, $adminurl)) ) {283 !(-1 = $action && strpos($referer, $adminurl) !== false)) 284 284 wp_nonce_ays($action); 285 285 die(); 286 286 } -
wp-includes/post.php
1198 1198 // 1199 1199 1200 1200 function is_local_attachment($url) { 1201 if ( !strstr($url, get_bloginfo('url') ))1201 if (strpos($url, get_bloginfo('url')) === false) 1202 1202 return false; 1203 if ( strstr($url, get_bloginfo('url') . '/?attachment_id='))1203 if (strpos($url, get_bloginfo('url') . '/?attachment_id=') !== false) 1204 1204 return true; 1205 1205 if ( $id = url_to_postid($url) ) { 1206 1206 $post = & get_post($id); -
wp-includes/query.php
29 29 function is_admin () { 30 30 global $wp_query; 31 31 32 return ( $wp_query->is_admin || strstr($_SERVER['REQUEST_URI'], 'wp-admin/'));32 return ($wp_query->is_admin || (strpos($_SERVER['REQUEST_URI'], 'wp-admin/') !== false)); 33 33 } 34 34 35 35 function is_archive () { … … 510 510 if (empty($qv['cat']) || ($qv['cat'] == '0')) { 511 511 $this->is_category = false; 512 512 } else { 513 if (str istr($qv['cat'],'-')) {513 if (strpos($qv['cat'], '-') !== false) { 514 514 $this->is_category = false; 515 515 } else { 516 516 $this->is_category = true; … … 557 557 $this->is_preview = true; 558 558 } 559 559 560 if (str str($_SERVER['PHP_SELF'], 'wp-admin/')) {560 if (strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false) { 561 561 $this->is_admin = true; 562 562 } 563 563 … … 850 850 $in_cats = $out_cats = $out_posts = ''; 851 851 foreach ( $cat_array as $cat ) { 852 852 $cat = intval($cat); 853 $in = strstr($cat, '-') ? false : true;853 $in = (strpos($cat, '-') !== false) ? false : true; 854 854 $cat = trim($cat, '-'); 855 855 if ( $in ) 856 856 $in_cats .= "$cat, " . get_category_children($cat, '', ', '); … … 918 918 } else { 919 919 $q['author'] = ''.urldecode($q['author']).''; 920 920 $q['author'] = addslashes_gpc($q['author']); 921 if (str istr($q['author'], '-')) {921 if (strpos($q['author'], '-') !== false) { 922 922 $eq = '!='; 923 923 $andor = 'AND'; 924 924 $q['author'] = explode('-', $q['author']); … … 938 938 // Author stuff for nice URLs 939 939 940 940 if ('' != $q['author_name']) { 941 if (str istr($q['author_name'],'/')) {941 if (strpos($q['author_name'], '/') !== false) { 942 942 $q['author_name'] = explode('/',$q['author_name']); 943 943 if ($q['author_name'][count($q['author_name'])-1]) { 944 944 $q['author_name'] = $q['author_name'][count($q['author_name'])-1];#no trailing slash -
wp-includes/rewrite.php
591 591 //individual post. Do this by checking it contains at least one of 1) post name, 592 592 //2) post ID, 3) page name, 4) timestamp (year, month, day, hour, second and 593 593 //minute all present). Set these flags now as we need them for the endpoints. 594 if (str str($struct, '%postname%') || strstr($struct, '%post_id%')595 || str str($struct, '%pagename%')596 || (str str($struct, '%year%') && strstr($struct, '%monthnum%') && strstr($struct, '%day%') && strstr($struct, '%hour%') && strstr($struct, '%minute') && strstr($struct, '%second%'))) {594 if (strpos($struct, '%postname%') !== false || strpos($struct, '%post_id%') !== false 595 || strpos($struct, '%pagename%') !== false 596 || (strpos($struct, '%year%') !== false && strpos($struct, '%monthnum%') !== false && strpos($struct, '%day%') !== false && strpos($struct, '%hour%') !== false && strpos($struct, '%minute%') !== false && strpos($struct, '%second%') !== false)) { 597 597 $post = true; 598 if ( strstr($struct, '%pagename%'))598 if (strpos($struct, '%pagename%') !== false) 599 599 $page = true; 600 600 } 601 601 … … 809 809 //nada. 810 810 } 811 811 812 if (str str($query, $this->index)) {812 if (strpos($query, $this->index) !== false) { 813 813 $rules .= 'RewriteRule ^' . $match . ' ' . $home_root . $query . " [QSA,L]\n"; 814 814 } else { 815 815 $rules .= 'RewriteRule ^' . $match . ' ' . $site_root . $query . " [QSA,L]\n"; -
wp-includes/vars.php
32 32 $is_IE = ( $is_macIE || $is_winIE ); 33 33 34 34 // Server detection 35 $is_apache = ( strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') || strstr($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed')) ? 1 : 0;36 $is_IIS = strstr($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') ? 1 : 0;35 $is_apache ((strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) || (strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false)) ? 1 : 0; 36 $is_IIS = (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false) ? 1 : 0; 37 37 38 38 // if the config file does not provide the smilies array, let's define it here 39 39 if (!isset($wpsmiliestrans)) { -
wp-includes/wp-db.php
372 372 373 373 header('Content-Type: text/html; charset=utf-8'); 374 374 375 if ( strstr($_SERVER['PHP_SELF'], 'wp-admin'))375 if (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false) 376 376 $admin_dir = ''; 377 377 else 378 378 $admin_dir = 'wp-admin/'; -
wp-settings.php
40 40 $_SERVER['SCRIPT_FILENAME'] = $_SERVER['PATH_TRANSLATED']; 41 41 42 42 // Fix for Dreamhost and other PHP as CGI hosts 43 if ( strstr( $_SERVER['SCRIPT_NAME'], 'php.cgi' ))43 if (strpos($_SERVER['SCRIPT_NAME'], 'php.cgi') !== false) 44 44 unset($_SERVER['PATH_INFO']); 45 45 46 46 // Fix empty PHP_SELF … … 140 140 include_once(ABSPATH . WPINC . '/gettext.php'); 141 141 require_once (ABSPATH . WPINC . '/l10n.php'); 142 142 143 if ( !is_blog_installed() && ( !strstr($_SERVER['PHP_SELF'], 'install.php')&& !defined('WP_INSTALLING')) ) {144 if ( strstr($_SERVER['PHP_SELF'], 'wp-admin'))143 if ( !is_blog_installed() && (strpos($_SERVER['PHP_SELF'], 'install.php') === false && !defined('WP_INSTALLING')) ) { 144 if (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false) 145 145 $link = 'install.php'; 146 146 else 147 147 $link = 'wp-admin/install.php'; … … 172 172 require (ABSPATH . WPINC . '/deprecated.php'); 173 173 require (ABSPATH . WPINC . '/script-loader.php'); 174 174 175 if ( !strstr($_SERVER['PHP_SELF'], 'install.php')) :175 if (strpos($_SERVER['PHP_SELF'], 'install.php') === false) { 176 176 // Used to guarantee unique hash cookies 177 177 $cookiehash = md5(get_option('siteurl')); 178 178 define('COOKIEHASH', $cookiehash); 179 endif; 179 } 180 180 181 181 if ( !defined('USER_COOKIE') ) 182 182 define('USER_COOKIE', 'wordpressuser_'. COOKIEHASH);