WordPress.org

Make WordPress Core

Ticket #15554: diff304-blogo.txt

File diff304-blogo.txt, 3.6 KB (added by qdinar, 3 years ago)

make idn working

Line 
1diff -r installer/wordpress-3.0.4/wp-admin/ms-edit.php oldsites/blogorf-12//wp-admin/ms-edit.php
254c54,55
3<                               if ( ! preg_match( '/(--|\.\.)/', $domain ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $domain ) )
4---
5>                               //if ( ! preg_match( '/(--|\.\.)/', $domain ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $domain ) )
6>                               if ( ! preg_match( '/(\.\.)/', $domain ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $domain ) )
767c68,69
8<                               if ( ! preg_match( '/(--|\.\.)/', $domain ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $domain ) )
9---
10>                               //if ( ! preg_match( '/(--|\.\.)/', $domain ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $domain ) )
11>                               if ( ! preg_match( '/(\.\.)/', $domain ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $domain ) )
1280c82,83
13<               } elseif ( ! preg_match( '/(--|\.)/', $_POST['dashboard_blog'] ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $_POST['dashboard_blog'] ) ) {
14---
15>               //} elseif ( ! preg_match( '/(--|\.)/', $_POST['dashboard_blog'] ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $_POST['dashboard_blog'] ) ) {
16>               } elseif ( ! preg_match( '/(\.)/', $_POST['dashboard_blog'] ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $_POST['dashboard_blog'] ) ) {
17149c152,153
18<               if ( ! preg_match( '/(--)/', $blog['domain'] ) && preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) )
19---
20>               //if ( ! preg_match( '/(--)/', $blog['domain'] ) && preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) )
21>               if ( preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) )
22
23
24diff -r installer/wordpress-3.0.4/wp-includes/ms-functions.php oldsites/blogorf-12//wp-includes/ms-functions.php
25529c529,530
26<       preg_match( '/[a-z0-9]+/', $blogname, $maybe );
27---
28>       //preg_match( '/[a-z0-9]+/', $blogname, $maybe );
29>       preg_match( '/[a-z0-9-]+/', $blogname, $maybe );
30548c549
31<       preg_match( '/[0-9]*/', $blogname, $match );
32---
33>       preg_match( '/[0-9-]*/', $blogname, $match );
34
35
36
37
38diff -r installer/wordpress-3.0.4/wp-signup.php oldsites/blogorf-12//wp-signup.php
3972c72
40<               echo '<label for="blogname">' . __('Site Domain:') . '</label>';
41---
42>               echo '<label for="blogname">' . __('Site Domain:') . '</label>кириллица белән язсагыз әйбәт булыр';
4381c81,82
44<               echo '<input name="blogname" type="text" id="blogname" value="'.esc_attr($blogname).'" maxlength="60" /><span class="suffix_address">.' . ( $site_domain = preg_replace( '|^www\.|', '', $current_site->domain ) ) . '</span><br />';
45---
46>               //echo '<input name="blogname" type="text" id="blogname" value="'.esc_attr($blogname).'" maxlength="60" /><span class="suffix_address">.' . ( $site_domain = preg_replace( '|^www\.|', '', $current_site->domain ) ) . '</span><br />';
47>               echo '<input name="blogname" type="text" id="blogname" value="'.idn_to_unicode(esc_attr($blogname)).'" maxlength="60" /><span class="suffix_address">.' . idn_to_unicode( $site_domain = preg_replace( '|^www\.|', '', $current_site->domain ) ) . '</span><br />';
4888c89,90
49<                       print __( 'domain.' ) . $site_domain . $current_site->path;
50---
51>                       //print __( 'domain.' ) . $site_domain . $current_site->path;
52>                       print __( 'domain.' ) . idn_to_unicode($site_domain) . $current_site->path;
53131c133
54<       echo '<label for="user_name">' . __('Username:') . '</label>';
55---
56>       echo '<label for="user_name">' . __('Username:') . '</label>моны кечкенә латин хәрефе һәм цифр белән язасы';
57134a137
58>       //$user_name=idn_to_utf8($user_name);
59382a386,387
60> $_POST['blogname']=idn_to_ascii($_POST['blogname']);
61>
62435c440,441
63<                               signup_user( $newblogname, $user_email );
64---
65>                               //signup_user( $newblogname, $user_email );
66>                               signup_user( '', $user_email );
67