/var/www/wordpress/wp-admin/includes/admin.php
/var/www/wordpress/wp-admin/includes/bookmark.php
/var/www/wordpress/wp-admin/includes/class-ftp-pure.php
/var/www/wordpress/wp-admin/includes/class-ftp-sockets.php
/var/www/wordpress/wp-admin/includes/class-ftp.php
/var/www/wordpress/wp-admin/includes/class-pclzip.php
/var/www/wordpress/wp-admin/includes/class-wp-filesystem-base.php
/var/www/wordpress/wp-admin/includes/class-wp-filesystem-direct.php
/var/www/wordpress/wp-admin/includes/class-wp-filesystem-ftpext.php
/var/www/wordpress/wp-admin/includes/class-wp-filesystem-ftpsockets.php
/var/www/wordpress/wp-admin/includes/class-wp-filesystem-ssh2.php
/var/www/wordpress/wp-admin/includes/class-wp-importer.php
/var/www/wordpress/wp-admin/includes/class-wp-upgrader.php
/var/www/wordpress/wp-admin/includes/comment.php
/var/www/wordpress/wp-admin/includes/continents-cities.php
/var/www/wordpress/wp-admin/includes/dashboard.php
/var/www/wordpress/wp-admin/includes/deprecated.php
/var/www/wordpress/wp-admin/includes/export.php
/var/www/wordpress/wp-admin/includes/file.php
/var/www/wordpress/wp-admin/includes/image-edit.php
/var/www/wordpress/wp-admin/includes/image.php
/var/www/wordpress/wp-admin/includes/import.php
/var/www/wordpress/wp-admin/includes/manifest.php
/var/www/wordpress/wp-admin/includes/media.php
/var/www/wordpress/wp-admin/includes/meta-boxes.php
/var/www/wordpress/wp-admin/includes/misc.php
/var/www/wordpress/wp-admin/includes/ms-deprecated.php
/var/www/wordpress/wp-admin/includes/ms.php
/var/www/wordpress/wp-admin/includes/nav-menu.php
/var/www/wordpress/wp-admin/includes/plugin-install.php
/var/www/wordpress/wp-admin/includes/plugin.php
/var/www/wordpress/wp-admin/includes/post.php
/var/www/wordpress/wp-admin/includes/schema.php
/var/www/wordpress/wp-admin/includes/taxonomy.php
/var/www/wordpress/wp-admin/includes/template.php
/var/www/wordpress/wp-admin/includes/theme-install.php
/var/www/wordpress/wp-admin/includes/theme.php
/var/www/wordpress/wp-admin/includes/update-core.php
/var/www/wordpress/wp-admin/includes/update.php
/var/www/wordpress/wp-admin/includes/upgrade.php
#CodeDescriptions
1<?php
2/**
3 * WordPress Upgrade API
4 *
5 * Most of the functions are pluggable and can be overwritten
6 *
7 * @package WordPress
8 * @subpackage Administration
9 */
10
11/** Include user install customize script. */
12if ( file_exists(WP_CONTENT_DIR . '/install.php') )
13 require (WP_CONTENT_DIR . '/install.php');
14
15/** WordPress Administration API */
16require_once(ABSPATH . 'wp-admin/includes/admin.php');
17
18/** WordPress Schema API */
19require_once(ABSPATH . 'wp-admin/includes/schema.php');
20
21if ( !function_exists('wp_install') ) :
22/**
23 * Installs the blog
24 *
25 * {@internal Missing Long Description}}
26 *
27 * @since unknown
28 *
29 * @param string $blog_title Blog title.
30 * @param string $user_name User's username.
31 * @param string $user_email User's email.
32 * @param bool $public Whether blog is public.
33 * @param null $deprecated Optional. Not used.
34 * @param string $user_password Optional. User's chosen password. Will default to a random password.
35 * @return array Array keys 'url', 'user_id', 'password', 'password_message'.
36 */
37function wp_install( $blog_title, $user_name, $user_email, $public, $deprecated = '', $user_password = '' ) {
38 global $wp_rewrite;
39
40 if ( !empty( $deprecated ) )
41 _deprecated_argument( __FUNCTION__, '2.6' );
42
43 wp_check_mysql_version();
44 wp_cache_flush();
45 make_db_current_silent();
46 populate_options();
47 populate_roles();
48
49 update_option('blogname', $blog_title);
50 update_option('admin_email', $user_email);//Connection Handling
51 update_option('blog_public', $public);
52
53 $guessurl = wp_guess_url();
54
55 update_option('siteurl', $guessurl);
56
57 // If not a public blog, don't ping.
58 if ( ! $public )
59 update_option('default_pingback_flag', 0);
60
61 // Create default user. If the user already exists, the user tables are
62 // being shared among blogs. Just set the role in that case.
63 $user_id = username_exists($user_name);
64 $user_password = trim($user_password);
65 $email_password = false;
66 if ( !$user_id && empty($user_password) ) {
67 $user_password = wp_generate_password();
68 $message = __('<strong><em>Note that password</em></strong> carefully! It is a <em>random</em> password that was generated just for you.');
69 $user_id = wp_create_user($user_name, $user_password, $user_email);
70 update_user_option($user_id, 'default_password_nag', true, true);
71 $email_password = true;
72 } else if ( !$user_id ) {
73 // Password has been provided
74 $message = '<em>'.__('Your chosen password.').'</em>';
75 $user_id = wp_create_user($user_name, $user_password, $user_email);
76 } else {
77 $message = __('User already exists. Password inherited.');
78 }
79
80 $user = new WP_User($user_id);
81 $user->set_role('administrator');
82
83 wp_install_defaults($user_id);
84
85 $wp_rewrite->flush_rules();
86
87 wp_new_blog_notification($blog_title, $guessurl, $user_id, ($email_password ? $user_password : __('The password you chose during the install.') ) );
88
89 wp_cache_flush();
90
91 return array('url' => $guessurl, 'user_id' => $user_id, 'password' => $user_password, 'password_message' => $message);
92}
93endif;
94
95if ( !function_exists('wp_install_defaults') ) :
96/**
97 * {@internal Missing Short Description}}
98 *
99 * {@internal Missing Long Description}}
100 *
101 * @since unknown
102 *
103 * @param int $user_id User ID.
104 */
105function wp_install_defaults($user_id) {
106 global $wpdb, $wp_rewrite, $current_site, $table_prefix;
107
108 // Default category
109 $cat_name = __('Uncategorized');
110 /* translators: Default category slug */
111 $cat_slug = sanitize_title(_x('Uncategorized', 'Default category slug'));
112
113 if ( global_terms_enabled() ) {
114 $cat_id = $wpdb->get_var( $wpdb->prepare( "SELECT cat_ID FROM {$wpdb->sitecategories} WHERE category_nicename = %s", $cat_slug ) );
115 if ( $cat_id == null ) {
116 $wpdb->insert( $wpdb->sitecategories, array('cat_ID' => 0, 'cat_name' => $cat_name, 'category_nicename' => $cat_slug, 'last_updated' => current_time('mysql', true)) );
117 $cat_id = $wpdb->insert_id;
118 }
119 update_option('default_category', $cat_id);
120 } else {
121 $cat_id = 1;
122 }
123
124 $wpdb->insert( $wpdb->terms, array('term_id' => $cat_id, 'name' => $cat_name, 'slug' => $cat_slug, 'term_group' => 0) );
125 $wpdb->insert( $wpdb->term_taxonomy, array('term_id' => $cat_id, 'taxonomy' => 'category', 'description' => '', 'parent' => 0, 'count' => 1));
126 $cat_tt_id = $wpdb->insert_id;
127
128 // Default link category
129 $cat_name = __('Blogroll');
130 /* translators: Default link category slug */
131 $cat_slug = sanitize_title(_x('Blogroll', 'Default link category slug'));
132
133 if ( global_terms_enabled() ) {
134 $blogroll_id = $wpdb->get_var( $wpdb->prepare( "SELECT cat_ID FROM {$wpdb->sitecategories} WHERE category_nicename = %s", $cat_slug ) );
135 if ( $blogroll_id == null ) {
136 $wpdb->insert( $wpdb->sitecategories, array('cat_ID' => 0, 'cat_name' => $cat_name, 'category_nicename' => $cat_slug, 'last_updated' => current_time('mysql', true)) );
137 $blogroll_id = $wpdb->insert_id;
138 }
139 update_option('default_link_category', $blogroll_id);
140 } else {
141 $blogroll_id = 2;
142 }
143
144 $wpdb->insert( $wpdb->terms, array('term_id' => $blogroll_id, 'name' => $cat_name, 'slug' => $cat_slug, 'term_group' => 0) );
145 $wpdb->insert( $wpdb->term_taxonomy, array('term_id' => $blogroll_id, 'taxonomy' => 'link_category', 'description' => '', 'parent' => 0, 'count' => 7));
146 $blogroll_tt_id = $wpdb->insert_id;
147
148 // Now drop in some default links
149 $default_links = array();
150 $default_links[] = array( 'link_url' => 'http://codex.wordpress.org/',
151 'link_name' => 'Документация',
152 'link_rss' => '',
153 'link_notes' => '');
154
155 $default_links[] = array( 'link_url' => 'http://wordpress.org/news/',
156 'link_name' => 'Блог WordPress',
157 'link_rss' => 'http://wordpress.org/development/feed/',
158 'link_notes' => '');
159
160 $default_links[] = array( 'link_url' => 'http://wordpress.org/extend/ideas/',
161 'link_name' => 'Предложите идею',
162 'link_rss' => '',
163 'link_notes' =>'');
164
165 $default_links[] = array( 'link_url' => 'http://mywordpress.ru/support/',
166 'link_name' => 'Форум поддержки',
167 'link_rss' => '',
168 'link_notes' =>'');
169
170 $default_links[] = array( 'link_url' => 'http://plugins.mywordpress.ru/',
171 'link_name' => 'Плагины',
172 'link_rss' => '',
173 'link_notes' =>'');
174
175 $default_links[] = array( 'link_url' => 'http://themes.mywordpress.ru/',
176 'link_name' => 'Темы оформления',
177 'link_rss' => '',
178 'link_notes' =>'');
179
180 $default_links[] = array( 'link_url' => 'http://planet.wordpress.org/',
181 'link_name' => 'WordPress Planet',
182 'link_rss' => '',
183 'link_notes' =>'');
184
185 foreach ( $default_links as $link ) {
186 $wpdb->insert( $wpdb->links, $link);
187 $wpdb->insert( $wpdb->term_relationships, array('term_taxonomy_id' => $blogroll_tt_id, 'object_id' => $wpdb->insert_id) );
188 }
189
190 // First post
191 $now = date('Y-m-d H:i:s');
192 $now_gmt = gmdate('Y-m-d H:i:s');
193 $first_post_guid = get_option('home') . '/?p=1';
194
195 if ( is_multisite() ) {
196 $first_post = get_site_option( 'first_post' );
197
198 if ( empty($first_post) )
199 $first_post = stripslashes( __( 'Welcome to <a href="SITE_URL">SITE_NAME</a>. This is your first post. Edit or delete it, then start blogging!' ) );
200
201 $first_post = str_replace( "SITE_URL", esc_url( network_home_url() ), $first_post );
202 $first_post = str_replace( "SITE_NAME", $current_site->site_name, $first_post );
203 } else {
204 $first_post = __('Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!');
205 }
206
207 $wpdb->insert( $wpdb->posts, array(
208 'post_author' => $user_id,
209 'post_date' => $now,
210 'post_date_gmt' => $now_gmt,
211 'post_content' => $first_post,
212 'post_excerpt' => '',
213 'post_title' => __('Hello world!'),
214 /* translators: Default post slug */
215 'post_name' => sanitize_title( _x('hello-world', 'Default post slug') ),
216 'post_modified' => $now,
217 'post_modified_gmt' => $now_gmt,
218 'guid' => $first_post_guid,
219 'comment_count' => 1,
220 'to_ping' => '',
221 'pinged' => '',
222 'post_content_filtered' => ''
223 ));
224 $wpdb->insert( $wpdb->term_relationships, array('term_taxonomy_id' => $cat_tt_id, 'object_id' => 1) );
225
226 // Default comment
227 $first_comment_author = __('Mr WordPress');
228 $first_comment_url = 'http://wordpress.org/';
229 $first_comment = __('Hi, this is a comment.<br />To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.');
230 if ( is_multisite() ) {
231 $first_comment_author = get_site_option( 'first_comment_author', $first_comment_author );
232 $first_comment_url = get_site_option( 'first_comment_url', network_home_url() );
233 $first_comment = get_site_option( 'first_comment', $first_comment );
234 }
235 $wpdb->insert( $wpdb->comments, array(
236 'comment_post_ID' => 1,
237 'comment_author' => $first_comment_author,
238 'comment_author_email' => '',
239 'comment_author_url' => $first_comment_url,
240 'comment_date' => $now,
241 'comment_date_gmt' => $now_gmt,
242 'comment_content' => $first_comment
243 ));
244
245 // First Page
246 $first_page = __('This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.');
247 if ( is_multisite() )
248 $first_page = get_site_option( 'first_page', $first_page );
249 $first_post_guid = get_option('home') . '/?page_id=2';
250 $wpdb->insert( $wpdb->posts, array(
251 'post_author' => $user_id,
252 'post_date' => $now,
253 'post_date_gmt' => $now_gmt,
254 'post_content' => $first_page,
255 'post_excerpt' => '',
256 'post_title' => __('About'),
257 /* translators: Default page slug */
258 'post_name' => _x('about', 'Default page slug'),
259 'post_modified' => $now,
260 'post_modified_gmt' => $now_gmt,
261 'guid' => $first_post_guid,
262 'post_type' => 'page',
263 'to_ping' => '',
264 'pinged' => '',
265 'post_content_filtered' => ''
266 ));
267 $wpdb->insert( $wpdb->postmeta, array( 'post_id' => 2, 'meta_key' => '_wp_page_template', 'meta_value' => 'default' ) );
268
269 // Setup default widgets for default theme.
270 update_option( 'widget_search', array ( 2 => array ( 'title' => '' ), '_multiwidget' => 1 ) );
271 update_option( 'widget_recent-posts', array ( 2 => array ( 'title' => '', 'number' => 5 ), '_multiwidget' => 1 ) );
272 update_option( 'widget_recent-comments', array ( 2 => array ( 'title' => '', 'number' => 5 ), '_multiwidget' => 1 ) );
273 update_option( 'widget_archives', array ( 2 => array ( 'title' => '', 'count' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) );
274 update_option( 'widget_categories', array ( 2 => array ( 'title' => '', 'count' => 0, 'hierarchical' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) );
275 update_option( 'widget_meta', array ( 2 => array ( 'title' => '' ), '_multiwidget' => 1 ) );
276 update_option( 'sidebars_widgets', array ( 'wp_inactive_widgets' => array ( ), 'primary-widget-area' => array ( 0 => 'search-2', 1 => 'recent-posts-2', 2 => 'recent-comments-2', 3 => 'archives-2', 4 => 'categories-2', 5 => 'meta-2', ), 'secondary-widget-area' => array ( ), 'first-footer-widget-area' => array ( ), 'second-footer-widget-area' => array ( ), 'third-footer-widget-area' => array ( ), 'fourth-footer-widget-area' => array ( ), 'array_version' => 3 ) );
277
278 if ( is_multisite() ) {
279 // Flush rules to pick up the new page.
280 $wp_rewrite->init();
281 $wp_rewrite->flush_rules();
282
283 $user = new WP_User($user_id);
284 $wpdb->update( $wpdb->options, array('option_value' => $user->user_email), array('option_name' => 'admin_email') );
285
286 // Remove all perms except for the login user.
287 $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id != %d AND meta_key = %s", $user_id, $table_prefix.'user_level') );
288 $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id != %d AND meta_key = %s", $user_id, $table_prefix.'capabilities') );
289
290 // Delete any caps that snuck into the previously active blog. (Hardcoded to blog 1 for now.) TODO: Get previous_blog_id.
291 if ( !is_super_admin( $user_id ) && $user_id != 1 )
292 $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $wpdb->base_prefix.'1_capabilities') );
293 }
294
295 // Russian helper plugin activation
296 $plugin = plugin_basename( trim( 'rh/rh.php' ) );
297 if ( is_multisite() ) {
298 $current = get_site_option( 'active_sitewide_plugins', array() );
299 $current[$plugin] = time();
300 update_site_option( 'active_sitewide_plugins', $current );
301 } else {
302 $current = get_option( 'active_plugins', array() );
303 $current[] = $plugin;
304 sort($current);
305 update_option('active_plugins', $current);
306 }
307}
308endif;
309
310if ( !function_exists('wp_new_blog_notification') ) :
311/**
312 * {@internal Missing Short Description}}
313 *
314 * {@internal Missing Long Description}}
315 *
316 * @since unknown
317 *
318 * @param string $blog_title Blog title.
319 * @param string $blog_url Blog url.
320 * @param int $user_id User ID.
321 * @param string $password User's Password.
322 */
323function wp_new_blog_notification($blog_title, $blog_url, $user_id, $password) {
324 $user = new WP_User($user_id);
325 $email = $user->user_email;//Connection Handling
326 $name = $user->user_login;
327 $message = sprintf(__("Your new WordPress site has been successfully set up at:
328
329%1\$s
330
331You can log in to the administrator account with the following information:
332
333Username: %2\$s
334Password: %3\$s
335
336We hope you enjoy your new site. Thanks!
337
338--The WordPress Team
339http://wordpress.org/
340"), $blog_url, $name, $password);
341
342 @wp_mail($email, __('New WordPress Site'), $message);//Connection Handling
343}
344endif;
345
346if ( !function_exists('wp_upgrade') ) :
347/**
348 * Run WordPress Upgrade functions.
349 *
350 * {@internal Missing Long Description}}
351 *
352 * @since unknown
353 *
354 * @return null
355 */
356function wp_upgrade() {
357 global $wp_current_db_version, $wp_db_version, $wpdb;
358
359 $wp_current_db_version = __get_option('db_version');
360
361 // We are up-to-date. Nothing to do.
362 if ( $wp_db_version == $wp_current_db_version )
363 return;
364
365 if ( ! is_blog_installed() )
366 return;
367
368 wp_check_mysql_version();
369 wp_cache_flush();
370 pre_schema_upgrade();
371 make_db_current_silent();
372 upgrade_all();
373 if ( is_multisite() && is_main_site() )
374 upgrade_network();
375 wp_cache_flush();
376
377 if ( is_multisite() ) {
378 if ( $wpdb->get_row( "SELECT blog_id FROM {$wpdb->blog_versions} WHERE blog_id = '{$wpdb->blogid}'" ) )
379 $wpdb->query( "UPDATE {$wpdb->blog_versions} SET db_version = '{$wp_db_version}' WHERE blog_id = '{$wpdb->blogid}'" );
380 else
381 $wpdb->query( "INSERT INTO {$wpdb->blog_versions} ( `blog_id` , `db_version` , `last_updated` ) VALUES ( '{$wpdb->blogid}', '{$wp_db_version}', NOW());" );
382 }
383}
384endif;
385
386/**
387 * Functions to be called in install and upgrade scripts.
388 *
389 * {@internal Missing Long Description}}
390 *
391 * @since unknown
392 */
393function upgrade_all() {
394 global $wp_current_db_version, $wp_db_version, $wp_rewrite;
395 $wp_current_db_version = __get_option('db_version');
396
397 // We are up-to-date. Nothing to do.
398 if ( $wp_db_version == $wp_current_db_version )
399 return;
400
401 // If the version is not set in the DB, try to guess the version.
402 if ( empty($wp_current_db_version) ) {
403 $wp_current_db_version = 0;
404
405 // If the template option exists, we have 1.5.
406 $template = __get_option('template');
407 if ( !empty($template) )
408 $wp_current_db_version = 2541;
409 }
410
411 if ( $wp_current_db_version < 6039 )
412 upgrade_230_options_table();
413
414 populate_options();
415
416 if ( $wp_current_db_version < 2541 ) {
417 upgrade_100();
418 upgrade_101();
419 upgrade_110();
420 upgrade_130();
421 }
422
423 if ( $wp_current_db_version < 3308 )
424 upgrade_160();
425
426 if ( $wp_current_db_version < 4772 )
427 upgrade_210();
428
429 if ( $wp_current_db_version < 4351 )
430 upgrade_old_slugs();
431
432 if ( $wp_current_db_version < 5539 )
433 upgrade_230();
434
435 if ( $wp_current_db_version < 6124 )
436 upgrade_230_old_tables();
437
438 if ( $wp_current_db_version < 7499 )
439 upgrade_250();
440
441 if ( $wp_current_db_version < 7935 )
442 upgrade_252();
443
444 if ( $wp_current_db_version < 8201 )
445 upgrade_260();
446
447 if ( $wp_current_db_version < 8989 )
448 upgrade_270();
449
450 if ( $wp_current_db_version < 10360 )
451 upgrade_280();
452
453 if ( $wp_current_db_version < 11958 )
454 upgrade_290();
455
456 if ( $wp_current_db_version < 15260 )
457 upgrade_300();
458
459 maybe_disable_automattic_widgets();
460
461 update_option( 'db_version', $wp_db_version );
462 update_option( 'db_upgraded', true );
463}
464
465/**
466 * Execute changes made in WordPress 1.0.
467 *
468 * @since 1.0.0
469 */
470function upgrade_100() {
471 global $wpdb;
472
473 // Get the title and ID of every post, post_name to check if it already has a value
474 $posts = $wpdb->get_results("SELECT ID, post_title, post_name FROM $wpdb->posts WHERE post_name = ''");
475 if ($posts) {
476 foreach($posts as $post) {
477 if ('' == $post->post_name) {
478 $newtitle = sanitize_title($post->post_title);
479 $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_name = %s WHERE ID = %d", $newtitle, $post->ID) );
480 }
481 }
482 }
483
484 $categories = $wpdb->get_results("SELECT cat_ID, cat_name, category_nicename FROM $wpdb->categories");
485 foreach ($categories as $category) {
486 if ('' == $category->category_nicename) {
487 $newtitle = sanitize_title($category->cat_name);
488 $wpdb>update( $wpdb->categories, array('category_nicename' => $newtitle), array('cat_ID' => $category->cat_ID) );
489 }
490 }
491
492 $wpdb->query("UPDATE $wpdb->options SET option_value = REPLACE(option_value, 'wp-links/links-images/', 'wp-images/links/')
493 WHERE option_name LIKE 'links_rating_image%'
494 AND option_value LIKE 'wp-links/links-images/%'");
495
496 $done_ids = $wpdb->get_results("SELECT DISTINCT post_id FROM $wpdb->post2cat");
497 if ($done_ids) :
498 foreach ($done_ids as $done_id) :
499 $done_posts[] = $done_id->post_id;
500 endforeach;
501 $catwhere = ' AND ID NOT IN (' . implode(',', $done_posts) . ')';
502 else:
503 $catwhere = '';
504 endif;
505
506 $allposts = $wpdb->get_results("SELECT ID, post_category FROM $wpdb->posts WHERE post_category != '0' $catwhere");
507 if ($allposts) :
508 foreach ($allposts as $post) {
509 // Check to see if it's already been imported
510 $cat = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->post2cat WHERE post_id = %d AND category_id = %d", $post->ID, $post->post_category) );
511 if (!$cat && 0 != $post->post_category) { // If there's no result
512 $wpdb->insert( $wpdb->post2cat, array('post_id' => $post->ID, 'category_id' => $post->post_category) );
513 }
514 }
515 endif;
516}
517
518/**
519 * Execute changes made in WordPress 1.0.1.
520 *
521 * @since 1.0.1
522 */
523function upgrade_101() {
524 global $wpdb;
525
526 // Clean up indices, add a few
527 add_clean_index($wpdb->posts, 'post_name');
528 add_clean_index($wpdb->posts, 'post_status');
529 add_clean_index($wpdb->categories, 'category_nicename');
530 add_clean_index($wpdb->comments, 'comment_approved');
531 add_clean_index($wpdb->comments, 'comment_post_ID');
532 add_clean_index($wpdb->links , 'link_category');
533 add_clean_index($wpdb->links , 'link_visible');
534}
535
536/**
537 * Execute changes made in WordPress 1.2.
538 *
539 * @since 1.2.0
540 */
541function upgrade_110() {
542 global $wpdb;
543
544 // Set user_nicename.
545 $users = $wpdb->get_results("SELECT ID, user_nickname, user_nicename FROM $wpdb->users");
546 foreach ($users as $user) {
547 if ('' == $user->user_nicename) {
548 $newname = sanitize_title($user->user_nickname);
549 $wpdb->update( $wpdb->users, array('user_nicename' => $newname), array('ID' => $user->ID) );
550 }
551 }
552
553 $users = $wpdb->get_results("SELECT ID, user_pass from $wpdb->users");
554 foreach ($users as $row) {
555 if (!preg_match('/^[A-Fa-f0-9]{32}$/', $row->user_pass)) {
556 $wpdb->update( $wpdb->users, array('user_pass' => md5($row->user_pass)), array('ID' => $row->ID) );
557 }
558 }
559
560 // Get the GMT offset, we'll use that later on
561 $all_options = get_alloptions_110();
562
563 $time_difference = $all_options->time_difference;
564
565 $server_time = time()+date('Z');
566 $weblogger_time = $server_time + $time_difference*3600;
567 $gmt_time = time();
568
569 $diff_gmt_server = ($gmt_time - $server_time) / 3600;
570 $diff_weblogger_server = ($weblogger_time - $server_time) / 3600;
571 $diff_gmt_weblogger = $diff_gmt_server - $diff_weblogger_server;
572 $gmt_offset = -$diff_gmt_weblogger;
573
574 // Add a gmt_offset option, with value $gmt_offset
575 add_option('gmt_offset', $gmt_offset);
576
577 // Check if we already set the GMT fields (if we did, then
578 // MAX(post_date_gmt) can't be '0000-00-00 00:00:00'
579 // <michel_v> I just slapped myself silly for not thinking about it earlier
580 $got_gmt_fields = ! ($wpdb->get_var("SELECT MAX(post_date_gmt) FROM $wpdb->posts") == '0000-00-00 00:00:00');
581
582 if (!$got_gmt_fields) {
583
584 // Add or substract time to all dates, to get GMT dates
585 $add_hours = intval($diff_gmt_weblogger);
586 $add_minutes = intval(60 * ($diff_gmt_weblogger - $add_hours));
587 $wpdb->query("UPDATE $wpdb->posts SET post_date_gmt = DATE_ADD(post_date, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)");
588 $wpdb->query("UPDATE $wpdb->posts SET post_modified = post_date");
589 $wpdb->query("UPDATE $wpdb->posts SET post_modified_gmt = DATE_ADD(post_modified, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE) WHERE post_modified != '0000-00-00 00:00:00'");
590 $wpdb->query("UPDATE $wpdb->comments SET comment_date_gmt = DATE_ADD(comment_date, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)");
591 $wpdb->query("UPDATE $wpdb->users SET user_registered = DATE_ADD(user_registered, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)");
592 }
593
594}
595
596/**
597 * Execute changes made in WordPress 1.5.
598 *
599 * @since 1.5.0
600 */
601function upgrade_130() {
602 global $wpdb;
603
604 // Remove extraneous backslashes.
605 $posts = $wpdb->get_results("SELECT ID, post_title, post_content, post_excerpt, guid, post_date, post_name, post_status, post_author FROM $wpdb->posts");
606 if ($posts) {
607 foreach($posts as $post) {
608 $post_content = addslashes(deslash($post->post_content));
609 $post_title = addslashes(deslash($post->post_title));
610 $post_excerpt = addslashes(deslash($post->post_excerpt));
611 if ( empty($post->guid) )
612 $guid = get_permalink($post->ID);
613 else
614 $guid = $post->guid;
615
616 $wpdb->update( $wpdb->posts, compact('post_title', 'post_content', 'post_excerpt', 'guid'), array('ID' => $post->ID) );
617
618 }
619 }
620
621 // Remove extraneous backslashes.
622 $comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_content FROM $wpdb->comments");
623 if ($comments) {
624 foreach($comments as $comment) {
625 $comment_content = deslash($comment->comment_content);
626 $comment_author = deslash($comment->comment_author);
627
628 $wpdb->update($wpdb->comments, compact('comment_content', 'comment_author'), array('comment_ID' => $comment->comment_ID) );
629 }
630 }
631
632 // Remove extraneous backslashes.
633 $links = $wpdb->get_results("SELECT link_id, link_name, link_description FROM $wpdb->links");
634 if ($links) {
635 foreach($links as $link) {
636 $link_name = deslash($link->link_name);
637 $link_description = deslash($link->link_description);
638
639 $wpdb->update( $wpdb->links, compact('link_name', 'link_description'), array('link_id' => $link->link_id) );
640 }
641 }
642
643 $active_plugins = __get_option('active_plugins');
644
645 // If plugins are not stored in an array, they're stored in the old
646 // newline separated format. Convert to new format.
647 if ( !is_array( $active_plugins ) ) {
648 $active_plugins = explode("\n", trim($active_plugins));
649 update_option('active_plugins', $active_plugins);
650 }
651
652 // Obsolete tables
653 $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'optionvalues');
654 $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'optiontypes');
655 $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'optiongroups');
656 $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'optiongroup_options');
657
658 // Update comments table to use comment_type
659 $wpdb->query("UPDATE $wpdb->comments SET comment_type='trackback', comment_content = REPLACE(comment_content, '<trackback />', '') WHERE comment_content LIKE '<trackback />%'");
660 $wpdb->query("UPDATE $wpdb->comments SET comment_type='pingback', comment_content = REPLACE(comment_content, '<pingback />', '') WHERE comment_content LIKE '<pingback />%'");
661
662 // Some versions have multiple duplicate option_name rows with the same values
663 $options = $wpdb->get_results("SELECT option_name, COUNT(option_name) AS dupes FROM `$wpdb->options` GROUP BY option_name");
664 foreach ( $options as $option ) {
665 if ( 1 != $option->dupes ) { // Could this be done in the query?
666 $limit = $option->dupes - 1;
667 $dupe_ids = $wpdb->get_col( $wpdb->prepare("SELECT option_id FROM $wpdb->options WHERE option_name = %s LIMIT %d", $option->option_name, $limit) );
668 if ( $dupe_ids ) {
669 $dupe_ids = join($dupe_ids, ',');
670 $wpdb->query("DELETE FROM $wpdb->options WHERE option_id IN ($dupe_ids)");
671 }
672 }
673 }
674
675 make_site_theme();
676}
677
678/**
679 * Execute changes made in WordPress 2.0.
680 *
681 * @since 2.0.0
682 */
683function upgrade_160() {
684 global $wpdb, $wp_current_db_version;
685
686 populate_roles_160();
687
688 $users = $wpdb->get_results("SELECT * FROM $wpdb->users");
689 foreach ( $users as $user ) :
690 if ( !empty( $user->user_firstname ) )
691 update_user_meta( $user->ID, 'first_name', $wpdb->escape($user->user_firstname) );
692 if ( !empty( $user->user_lastname ) )
693 update_user_meta( $user->ID, 'last_name', $wpdb->escape($user->user_lastname) );
694 if ( !empty( $user->user_nickname ) )
695 update_user_meta( $user->ID, 'nickname', $wpdb->escape($user->user_nickname) );
696 if ( !empty( $user->user_level ) )
697 update_user_meta( $user->ID, $wpdb->prefix . 'user_level', $user->user_level );
698 if ( !empty( $user->user_icq ) )
699 update_user_meta( $user->ID, 'icq', $wpdb->escape($user->user_icq) );
700 if ( !empty( $user->user_aim ) )
701 update_user_meta( $user->ID, 'aim', $wpdb->escape($user->user_aim) );
702 if ( !empty( $user->user_msn ) )
703 update_user_meta( $user->ID, 'msn', $wpdb->escape($user->user_msn) );
704 if ( !empty( $user->user_yim ) )
705 update_user_meta( $user->ID, 'yim', $wpdb->escape($user->user_icq) );
706 if ( !empty( $user->user_description ) )
707 update_user_meta( $user->ID, 'description', $wpdb->escape($user->user_description) );
708
709 if ( isset( $user->user_idmode ) ):
710 $idmode = $user->user_idmode;
711 if ($idmode == 'nickname') $id = $user->user_nickname;
712 if ($idmode == 'login') $id = $user->user_login;
713 if ($idmode == 'firstname') $id = $user->user_firstname;
714 if ($idmode == 'lastname') $id = $user->user_lastname;
715 if ($idmode == 'namefl') $id = $user->user_firstname.' '.$user->user_lastname;
716 if ($idmode == 'namelf') $id = $user->user_lastname.' '.$user->user_firstname;
717 if (!$idmode) $id = $user->user_nickname;
718 $wpdb->update( $wpdb->users, array('display_name' => $id), array('ID' => $user->ID) );
719 endif;
720
721 // FIXME: RESET_CAPS is temporary code to reset roles and caps if flag is set.
722 $caps = get_user_meta( $user->ID, $wpdb->prefix . 'capabilities');
723 if ( empty($caps) || defined('RESET_CAPS') ) {
724 $level = get_user_meta($user->ID, $wpdb->prefix . 'user_level', true);
725 $role = translate_level_to_role($level);
726 update_user_meta( $user->ID, $wpdb->prefix . 'capabilities', array($role => true) );
727 }
728
729 endforeach;
730 $old_user_fields = array( 'user_firstname', 'user_lastname', 'user_icq', 'user_aim', 'user_msn', 'user_yim', 'user_idmode', 'user_ip', 'user_domain', 'user_browser', 'user_description', 'user_nickname', 'user_level' );
731 $wpdb->hide_errors();
732 foreach ( $old_user_fields as $old )
733 $wpdb->query("ALTER TABLE $wpdb->users DROP $old");
734 $wpdb->show_errors();
735
736 // populate comment_count field of posts table
737 $comments = $wpdb->get_results( "SELECT comment_post_ID, COUNT(*) as c FROM $wpdb->comments WHERE comment_approved = '1' GROUP BY comment_post_ID" );
738 if ( is_array( $comments ) )
739 foreach ($comments as $comment)
740 $wpdb->update( $wpdb->posts, array('comment_count' => $comment->c), array('ID' => $comment->comment_post_ID) );
741
742 // Some alpha versions used a post status of object instead of attachment and put
743 // the mime type in post_type instead of post_mime_type.
744 if ( $wp_current_db_version > 2541 && $wp_current_db_version <= 3091 ) {
745 $objects = $wpdb->get_results("SELECT ID, post_type FROM $wpdb->posts WHERE post_status = 'object'");
746 foreach ($objects as $object) {
747 $wpdb->update( $wpdb->posts, array( 'post_status' => 'attachment',
748 'post_mime_type' => $object->post_type,
749 'post_type' => ''),
750 array( 'ID' => $object->ID ) );
751
752 $meta = get_post_meta($object->ID, 'imagedata', true);
753 if ( ! empty($meta['file']) )
754 update_attached_file( $object->ID, $meta['file'] );//Arbitrary file disclosing
755 }
756 }
757}
758
759/**
760 * Execute changes made in WordPress 2.1.
761 *
762 * @since 2.1.0
763 */
764function upgrade_210() {
765 global $wpdb, $wp_current_db_version;
766
767 if ( $wp_current_db_version < 3506 ) {
768 // Update status and type.
769 $posts = $wpdb->get_results("SELECT ID, post_status FROM $wpdb->posts");
770
771 if ( ! empty($posts) ) foreach ($posts as $post) {
772 $status = $post->post_status;
773 $type = 'post';
774
775 if ( 'static' == $status ) {
776 $status = 'publish';
777 $type = 'page';
778 } else if ( 'attachment' == $status ) {
779 $status = 'inherit';
780 $type = 'attachment';
781 }
782
783 $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_status = %s, post_type = %s WHERE ID = %d", $status, $type, $post->ID) );
784 }
785 }
786
787 if ( $wp_current_db_version < 3845 ) {
788 populate_roles_210();
789 }
790
791 if ( $wp_current_db_version < 3531 ) {
792 // Give future posts a post_status of future.
793 $now = gmdate('Y-m-d H:i:59');
794 $wpdb->query ("UPDATE $wpdb->posts SET post_status = 'future' WHERE post_status = 'publish' AND post_date_gmt > '$now'");
795
796 $posts = $wpdb->get_results("SELECT ID, post_date FROM $wpdb->posts WHERE post_status ='future'");
797 if ( !empty($posts) )
798 foreach ( $posts as $post )
799 wp_schedule_single_event(mysql2date('U', $post->post_date, false), 'publish_future_post', array($post->ID));
800 }
801}
802
803/**
804 * Execute changes made in WordPress 2.3.
805 *
806 * @since 2.3.0
807 */
808function upgrade_230() {
809 global $wp_current_db_version, $wpdb;
810
811 if ( $wp_current_db_version < 5200 ) {
812 populate_roles_230();
813 }
814
815 // Convert categories to terms.
816 $tt_ids = array();
817 $have_tags = false;
818 $categories = $wpdb->get_results("SELECT * FROM $wpdb->categories ORDER BY cat_ID");
819 foreach ($categories as $category) {
820 $term_id = (int) $category->cat_ID;
821 $name = $category->cat_name;
822 $description = $category->category_description;
823 $slug = $category->category_nicename;
824 $parent = $category->category_parent;
825 $term_group = 0;
826
827 // Associate terms with the same slug in a term group and make slugs unique.
828 if ( $exists = $wpdb->get_results( $wpdb->prepare("SELECT term_id, term_group FROM $wpdb->terms WHERE slug = %s", $slug) ) ) {
829 $term_group = $exists[0]->term_group;
830 $id = $exists[0]->term_id;
831 $num = 2;
832 do {
833 $alt_slug = $slug . "-$num";
834 $num++;
835 $slug_check = $wpdb->get_var( $wpdb->prepare("SELECT slug FROM $wpdb->terms WHERE slug = %s", $alt_slug) );
836 } while ( $slug_check );
837
838 $slug = $alt_slug;
839
840 if ( empty( $term_group ) ) {
841 $term_group = $wpdb->get_var("SELECT MAX(term_group) FROM $wpdb->terms GROUP BY term_group") + 1;
842 $wpdb->query( $wpdb->prepare("UPDATE $wpdb->terms SET term_group = %d WHERE term_id = %d", $term_group, $id) );
843 }
844 }
845
846 $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->terms (term_id, name, slug, term_group) VALUES
847 (%d, %s, %s, %d)", $term_id, $name, $slug, $term_group) );
848
849 $count = 0;
850 if ( !empty($category->category_count) ) {
851 $count = (int) $category->category_count;
852 $taxonomy = 'category';
853 $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ( %d, %s, %s, %d, %d)", $term_id, $taxonomy, $description, $parent, $count) );
854 $tt_ids[$term_id][$taxonomy] = (int) $wpdb->insert_id;
855 }
856
857 if ( !empty($category->link_count) ) {
858 $count = (int) $category->link_count;
859 $taxonomy = 'link_category';
860 $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ( %d, %s, %s, %d, %d)", $term_id, $taxonomy, $description, $parent, $count) );
861 $tt_ids[$term_id][$taxonomy] = (int) $wpdb->insert_id;
862 }
863
864 if ( !empty($category->tag_count) ) {
865 $have_tags = true;
866 $count = (int) $category->tag_count;
867 $taxonomy = 'post_tag';
868 $wpdb->insert( $wpdb->term_taxonomy, compact('term_id', 'taxonomy', 'description', 'parent', 'count') );
869 $tt_ids[$term_id][$taxonomy] = (int) $wpdb->insert_id;
870 }
871
872 if ( empty($count) ) {
873 $count = 0;
874 $taxonomy = 'category';
875 $wpdb->insert( $wpdb->term_taxonomy, compact('term_id', 'taxonomy', 'description', 'parent', 'count') );
876 $tt_ids[$term_id][$taxonomy] = (int) $wpdb->insert_id;
877 }
878 }
879
880 $select = 'post_id, category_id';
881 if ( $have_tags )
882 $select .= ', rel_type';
883
884 $posts = $wpdb->get_results("SELECT $select FROM $wpdb->post2cat GROUP BY post_id, category_id");
885 foreach ( $posts as $post ) {
886 $post_id = (int) $post->post_id;
887 $term_id = (int) $post->category_id;
888 $taxonomy = 'category';
889 if ( !empty($post->rel_type) && 'tag' == $post->rel_type)
890 $taxonomy = 'tag';
891 $tt_id = $tt_ids[$term_id][$taxonomy];
892 if ( empty($tt_id) )
893 continue;
894
895 $wpdb->insert( $wpdb->term_relationships, array('object_id' => $post_id, 'term_taxonomy_id' => $tt_id) );
896 }
897
898 // < 3570 we used linkcategories. >= 3570 we used categories and link2cat.
899 if ( $wp_current_db_version < 3570 ) {
900 // Create link_category terms for link categories. Create a map of link cat IDs
901 // to link_category terms.
902 $link_cat_id_map = array();
903 $default_link_cat = 0;
904 $tt_ids = array();
905 $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM " . $wpdb->prefix . 'linkcategories');
906 foreach ( $link_cats as $category) {
907 $cat_id = (int) $category->cat_id;
908 $term_id = 0;
909 $name = $wpdb->escape($category->cat_name);
910 $slug = sanitize_title($name);
911 $term_group = 0;
912
913 // Associate terms with the same slug in a term group and make slugs unique.
914 if ( $exists = $wpdb->get_results( $wpdb->prepare("SELECT term_id, term_group FROM $wpdb->terms WHERE slug = %s", $slug) ) ) {
915 $term_group = $exists[0]->term_group;
916 $term_id = $exists[0]->term_id;
917 }
918
919 if ( empty($term_id) ) {
920 $wpdb->insert( $wpdb->terms, compact('name', 'slug', 'term_group') );
921 $term_id = (int) $wpdb->insert_id;
922 }
923
924 $link_cat_id_map[$cat_id] = $term_id;
925 $default_link_cat = $term_id;
926
927 $wpdb->insert( $wpdb->term_taxonomy, array('term_id' => $term_id, 'taxonomy' => 'link_category', 'description' => '', 'parent' => 0, 'count' => 0) );
928 $tt_ids[$term_id] = (int) $wpdb->insert_id;
929 }
930
931 // Associate links to cats.
932 $links = $wpdb->get_results("SELECT link_id, link_category FROM $wpdb->links");
933 if ( !empty($links) ) foreach ( $links as $link ) {
934 if ( 0 == $link->link_category )
935 continue;
936 if ( ! isset($link_cat_id_map[$link->link_category]) )
937 continue;
938 $term_id = $link_cat_id_map[$link->link_category];
939 $tt_id = $tt_ids[$term_id];
940 if ( empty($tt_id) )
941 continue;
942
943 $wpdb->insert( $wpdb->term_relationships, array('object_id' => $link->link_id, 'term_taxonomy_id' => $tt_id) );
944 }
945
946 // Set default to the last category we grabbed during the upgrade loop.
947 update_option('default_link_category', $default_link_cat);
948 } else {
949 $links = $wpdb->get_results("SELECT link_id, category_id FROM $wpdb->link2cat GROUP BY link_id, category_id");
950 foreach ( $links as $link ) {
951 $link_id = (int) $link->link_id;
952 $term_id = (int) $link->category_id;
953 $taxonomy = 'link_category';
954 $tt_id = $tt_ids[$term_id][$taxonomy];
955 if ( empty($tt_id) )
956 continue;
957 $wpdb->insert( $wpdb->term_relationships, array('object_id' => $link_id, 'term_taxonomy_id' => $tt_id) );
958 }
959 }
960
961 if ( $wp_current_db_version < 4772 ) {
962 // Obsolete linkcategories table
963 $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'linkcategories');
964 }
965
966 // Recalculate all counts
967 $terms = $wpdb->get_results("SELECT term_taxonomy_id, taxonomy FROM $wpdb->term_taxonomy");
968 foreach ( (array) $terms as $term ) {
969 if ( ('post_tag' == $term->taxonomy) || ('category' == $term->taxonomy) )
970 $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->term_relationships, $wpdb->posts WHERE $wpdb->posts.ID = $wpdb->term_relationships.object_id AND post_status = 'publish' AND post_type = 'post' AND term_taxonomy_id = %d", $term->term_taxonomy_id) );
971 else
972 $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $term->term_taxonomy_id) );
973 $wpdb->update( $wpdb->term_taxonomy, array('count' => $count), array('term_taxonomy_id' => $term->term_taxonomy_id) );
974 }
975}
976
977/**
978 * Remove old options from the database.
979 *
980 * @since 2.3.0
981 */
982function upgrade_230_options_table() {
983 global $wpdb;
984 $old_options_fields = array( 'option_can_override', 'option_type', 'option_width', 'option_height', 'option_description', 'option_admin_level' );
985 $wpdb->hide_errors();
986 foreach ( $old_options_fields as $old )
987 $wpdb->query("ALTER TABLE $wpdb->options DROP $old");
988 $wpdb->show_errors();
989}
990
991/**
992 * Remove old categories, link2cat, and post2cat database tables.
993 *
994 * @since 2.3.0
995 */
996function upgrade_230_old_tables() {
997 global $wpdb;
998 $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'categories');
999 $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'link2cat');
1000 $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'post2cat');
/var/www/wordpress/wp-admin/includes/user.php
/var/www/wordpress/wp-admin/includes/widgets.php
/var/www/wordpress/wp-admin/js/revisions-js.php
/var/www/wordpress/wp-admin/maint/repair.php
/var/www/wordpress/wp-admin/admin-ajax.php
/var/www/wordpress/wp-admin/admin-footer.php
/var/www/wordpress/wp-admin/admin-functions.php
/var/www/wordpress/wp-admin/admin-header.php
/var/www/wordpress/wp-admin/admin-post.php
/var/www/wordpress/wp-admin/admin.php
/var/www/wordpress/wp-admin/async-upload.php
/var/www/wordpress/wp-admin/comment.php
/var/www/wordpress/wp-admin/custom-background.php
/var/www/wordpress/wp-admin/custom-header.php
/var/www/wordpress/wp-admin/edit-attachment-rows.php
/var/www/wordpress/wp-admin/edit-comments.php
/var/www/wordpress/wp-admin/edit-form-advanced.php
/var/www/wordpress/wp-admin/edit-form-comment.php
/var/www/wordpress/wp-admin/edit-link-categories.php
/var/www/wordpress/wp-admin/edit-link-category-form.php
/var/www/wordpress/wp-admin/edit-link-form.php
/var/www/wordpress/wp-admin/edit-post-rows.php
/var/www/wordpress/wp-admin/edit-tag-form.php
/var/www/wordpress/wp-admin/edit-tags.php
/var/www/wordpress/wp-admin/edit.php
/var/www/wordpress/wp-admin/export.php
/var/www/wordpress/wp-admin/gears-manifest.php
/var/www/wordpress/wp-admin/import.php
/var/www/wordpress/wp-admin/index-extra.php
/var/www/wordpress/wp-admin/index.php
/var/www/wordpress/wp-admin/install-helper.php
/var/www/wordpress/wp-admin/install.php
/var/www/wordpress/wp-admin/link-add.php
/var/www/wordpress/wp-admin/link-category.php
/var/www/wordpress/wp-admin/link-manager.php
/var/www/wordpress/wp-admin/link-parse-opml.php
/var/www/wordpress/wp-admin/link.php
/var/www/wordpress/wp-admin/load-scripts.php
/var/www/wordpress/wp-admin/load-styles.php
/var/www/wordpress/wp-admin/media-new.php
/var/www/wordpress/wp-admin/media-upload.php
/var/www/wordpress/wp-admin/media.php
/var/www/wordpress/wp-admin/menu-header.php
/var/www/wordpress/wp-admin/menu.php
/var/www/wordpress/wp-admin/moderation.php
/var/www/wordpress/wp-admin/ms-admin.php
/var/www/wordpress/wp-admin/ms-delete-site.php
/var/www/wordpress/wp-admin/ms-edit.php
/var/www/wordpress/wp-admin/ms-options.php
/var/www/wordpress/wp-admin/ms-sites.php
/var/www/wordpress/wp-admin/ms-themes.php
/var/www/wordpress/wp-admin/ms-upgrade-network.php
/var/www/wordpress/wp-admin/ms-users.php
/var/www/wordpress/wp-admin/my-sites.php
/var/www/wordpress/wp-admin/nav-menus.php
/var/www/wordpress/wp-admin/network.php
/var/www/wordpress/wp-admin/options-discussion.php
/var/www/wordpress/wp-admin/options-general.php
/var/www/wordpress/wp-admin/options-head.php
/var/www/wordpress/wp-admin/options-media.php
/var/www/wordpress/wp-admin/options-permalink.php
/var/www/wordpress/wp-admin/options-privacy.php
/var/www/wordpress/wp-admin/options-reading.php
/var/www/wordpress/wp-admin/options-writing.php
/var/www/wordpress/wp-admin/options.php
/var/www/wordpress/wp-admin/plugin-editor.php
/var/www/wordpress/wp-admin/plugin-install.php
/var/www/wordpress/wp-admin/plugins.php
/var/www/wordpress/wp-admin/post-new.php
/var/www/wordpress/wp-admin/post.php
/var/www/wordpress/wp-admin/press-this.php
/var/www/wordpress/wp-admin/profile.php
/var/www/wordpress/wp-admin/revision.php
/var/www/wordpress/wp-admin/setup-config.php
/var/www/wordpress/wp-admin/sidebar.php
/var/www/wordpress/wp-admin/theme-editor.php
/var/www/wordpress/wp-admin/theme-install.php
/var/www/wordpress/wp-admin/themes.php
/var/www/wordpress/wp-admin/tools.php
/var/www/wordpress/wp-admin/update-core.php
/var/www/wordpress/wp-admin/update.php
/var/www/wordpress/wp-admin/upgrade-functions.php
/var/www/wordpress/wp-admin/upgrade.php
/var/www/wordpress/wp-admin/upload.php
/var/www/wordpress/wp-admin/user-edit.php
/var/www/wordpress/wp-admin/user-new.php
/var/www/wordpress/wp-admin/users.php
/var/www/wordpress/wp-admin/widgets.php
/var/www/wordpress/wp-content/languages/ru_RU.php
/var/www/wordpress/wp-content/plugins/akismet/akismet.php
/var/www/wordpress/wp-content/plugins/rh/rh.php
/var/www/wordpress/wp-content/plugins/hello.php
/var/www/wordpress/wp-content/plugins/index.php
/var/www/wordpress/wp-content/themes/twentyten/404.php
/var/www/wordpress/wp-content/themes/twentyten/archive.php
/var/www/wordpress/wp-content/themes/twentyten/attachment.php
/var/www/wordpress/wp-content/themes/twentyten/author.php
/var/www/wordpress/wp-content/themes/twentyten/category.php
/var/www/wordpress/wp-content/themes/twentyten/comments.php
/var/www/wordpress/wp-content/themes/twentyten/footer.php
/var/www/wordpress/wp-content/themes/twentyten/functions.php
/var/www/wordpress/wp-content/themes/twentyten/header.php
/var/www/wordpress/wp-content/themes/twentyten/index.php
/var/www/wordpress/wp-content/themes/twentyten/loop.php
/var/www/wordpress/wp-content/themes/twentyten/onecolumn-page.php
/var/www/wordpress/wp-content/themes/twentyten/page.php
/var/www/wordpress/wp-content/themes/twentyten/search.php
/var/www/wordpress/wp-content/themes/twentyten/sidebar-footer.php
/var/www/wordpress/wp-content/themes/twentyten/sidebar.php
/var/www/wordpress/wp-content/themes/twentyten/single.php
/var/www/wordpress/wp-content/themes/twentyten/tag.php
/var/www/wordpress/wp-content/themes/index.php
/var/www/wordpress/wp-content/index.php
/var/www/wordpress/wp-includes/js/tinymce/langs/wp-langs.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/Logger.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/EnchantSpell.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpell.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpellShell.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/SpellChecker.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/includes/general.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/config.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/rpc.php
/var/www/wordpress/wp-includes/js/tinymce/wp-mce-help.php
/var/www/wordpress/wp-includes/js/tinymce/wp-tinymce.php
/var/www/wordpress/wp-includes/pomo/entry.php
/var/www/wordpress/wp-includes/pomo/mo.php
/var/www/wordpress/wp-includes/pomo/po.php
/var/www/wordpress/wp-includes/pomo/streams.php
/var/www/wordpress/wp-includes/pomo/translations.php
/var/www/wordpress/wp-includes/Text/Diff/Engine/native.php
/var/www/wordpress/wp-includes/Text/Diff/Engine/shell.php
/var/www/wordpress/wp-includes/Text/Diff/Engine/string.php
/var/www/wordpress/wp-includes/Text/Diff/Engine/xdiff.php
/var/www/wordpress/wp-includes/Text/Diff/Renderer/inline.php
/var/www/wordpress/wp-includes/Text/Diff/Renderer.php
/var/www/wordpress/wp-includes/Text/Diff.php
/var/www/wordpress/wp-includes/theme-compat/comments-popup.php
/var/www/wordpress/wp-includes/theme-compat/comments.php
/var/www/wordpress/wp-includes/theme-compat/footer.php
/var/www/wordpress/wp-includes/theme-compat/header.php
/var/www/wordpress/wp-includes/theme-compat/sidebar.php
/var/www/wordpress/wp-includes/atomlib.php
/var/www/wordpress/wp-includes/author-template.php
/var/www/wordpress/wp-includes/bookmark-template.php
/var/www/wordpress/wp-includes/bookmark.php
/var/www/wordpress/wp-includes/cache.php
/var/www/wordpress/wp-includes/canonical.php
/var/www/wordpress/wp-includes/capabilities.php
/var/www/wordpress/wp-includes/category-template.php
/var/www/wordpress/wp-includes/category.php
/var/www/wordpress/wp-includes/class-feed.php
/var/www/wordpress/wp-includes/class-http.php
/var/www/wordpress/wp-includes/class-IXR.php
/var/www/wordpress/wp-includes/class-json.php
/var/www/wordpress/wp-includes/class-oembed.php
/var/www/wordpress/wp-includes/class-phpass.php
/var/www/wordpress/wp-includes/class-phpmailer.php
/var/www/wordpress/wp-includes/class-pop3.php
/var/www/wordpress/wp-includes/class-simplepie.php
/var/www/wordpress/wp-includes/class-smtp.php
/var/www/wordpress/wp-includes/class-snoopy.php
/var/www/wordpress/wp-includes/class.wp-dependencies.php
/var/www/wordpress/wp-includes/class.wp-scripts.php
/var/www/wordpress/wp-includes/class.wp-styles.php
/var/www/wordpress/wp-includes/classes.php
/var/www/wordpress/wp-includes/comment-template.php
/var/www/wordpress/wp-includes/comment.php
/var/www/wordpress/wp-includes/compat.php
/var/www/wordpress/wp-includes/cron.php
/var/www/wordpress/wp-includes/default-constants.php
/var/www/wordpress/wp-includes/default-embeds.php
/var/www/wordpress/wp-includes/default-filters.php
/var/www/wordpress/wp-includes/default-widgets.php
/var/www/wordpress/wp-includes/deprecated.php
/var/www/wordpress/wp-includes/feed-atom-comments.php
/var/www/wordpress/wp-includes/feed-atom.php
/var/www/wordpress/wp-includes/feed-rdf.php
/var/www/wordpress/wp-includes/feed-rss.php
/var/www/wordpress/wp-includes/feed-rss2-comments.php
/var/www/wordpress/wp-includes/feed-rss2.php
/var/www/wordpress/wp-includes/feed.php
/var/www/wordpress/wp-includes/formatting.php
/var/www/wordpress/wp-includes/functions.php
/var/www/wordpress/wp-includes/functions.wp-scripts.php
/var/www/wordpress/wp-includes/functions.wp-styles.php
/var/www/wordpress/wp-includes/general-template.php
/var/www/wordpress/wp-includes/http.php
/var/www/wordpress/wp-includes/kses.php
/var/www/wordpress/wp-includes/l10n.php
/var/www/wordpress/wp-includes/link-template.php
/var/www/wordpress/wp-includes/load.php
/var/www/wordpress/wp-includes/locale.php
/var/www/wordpress/wp-includes/media.php
/var/www/wordpress/wp-includes/meta.php
/var/www/wordpress/wp-includes/ms-blogs.php
/var/www/wordpress/wp-includes/ms-default-constants.php
/var/www/wordpress/wp-includes/ms-default-filters.php
/var/www/wordpress/wp-includes/ms-deprecated.php
/var/www/wordpress/wp-includes/ms-files.php
/var/www/wordpress/wp-includes/ms-functions.php
/var/www/wordpress/wp-includes/ms-load.php
/var/www/wordpress/wp-includes/ms-settings.php
/var/www/wordpress/wp-includes/nav-menu-template.php
/var/www/wordpress/wp-includes/nav-menu.php
/var/www/wordpress/wp-includes/pluggable-deprecated.php
/var/www/wordpress/wp-includes/pluggable.php
/var/www/wordpress/wp-includes/plugin.php
/var/www/wordpress/wp-includes/post-template.php
/var/www/wordpress/wp-includes/post-thumbnail-template.php
/var/www/wordpress/wp-includes/post.php
/var/www/wordpress/wp-includes/query.php
/var/www/wordpress/wp-includes/registration-functions.php
/var/www/wordpress/wp-includes/registration.php
/var/www/wordpress/wp-includes/rewrite.php
/var/www/wordpress/wp-includes/rss-functions.php
/var/www/wordpress/wp-includes/rss.php
/var/www/wordpress/wp-includes/script-loader.php
/var/www/wordpress/wp-includes/shortcodes.php
/var/www/wordpress/wp-includes/taxonomy.php
/var/www/wordpress/wp-includes/template-loader.php
/var/www/wordpress/wp-includes/theme.php
/var/www/wordpress/wp-includes/update.php
/var/www/wordpress/wp-includes/user.php
/var/www/wordpress/wp-includes/vars.php
/var/www/wordpress/wp-includes/version.php
/var/www/wordpress/wp-includes/widgets.php
/var/www/wordpress/wp-includes/wp-db.php
/var/www/wordpress/wp-includes/wp-diff.php
/var/www/wordpress/index.php
/var/www/wordpress/wp-activate.php
/var/www/wordpress/wp-app.php
/var/www/wordpress/wp-atom.php
/var/www/wordpress/wp-blog-header.php
/var/www/wordpress/wp-comments-post.php
/var/www/wordpress/wp-commentsrss2.php
/var/www/wordpress/wp-config-sample.php
/var/www/wordpress/wp-cron.php
/var/www/wordpress/wp-feed.php
/var/www/wordpress/wp-links-opml.php
/var/www/wordpress/wp-load.php
/var/www/wordpress/wp-login.php
/var/www/wordpress/wp-mail.php
/var/www/wordpress/wp-pass.php
/var/www/wordpress/wp-rdf.php
/var/www/wordpress/wp-register.php
/var/www/wordpress/wp-rss.php
/var/www/wordpress/wp-rss2.php
/var/www/wordpress/wp-settings.php
/var/www/wordpress/wp-signup.php
/var/www/wordpress/wp-trackback.php
/var/www/wordpress/xmlrpc.php