Changeset 13209
- Timestamp:
- 02/19/2010 01:03:58 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/ms.php
r13106 r13209 76 76 } 77 77 $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->blogs WHERE blog_id = %d", $blog_id) ); 78 $dir = apply_filters( 'wpmu_delete_blog_upload_dir', constant( "WP_CONTENT_DIR" ). "/blogs.dir/{$blog_id}/files/", $blog_id );78 $dir = apply_filters( 'wpmu_delete_blog_upload_dir', WP_CONTENT_DIR . "/blogs.dir/{$blog_id}/files/", $blog_id ); 79 79 $dir = rtrim($dir, DIRECTORY_SEPARATOR); 80 80 $top_dir = $dir; -
trunk/wp-admin/includes/upgrade.php
r13134 r13209 1260 1260 1261 1261 if ( $setting == 'home' && defined( 'WP_HOME' ) ) { 1262 return preg_replace( '|/+$|', '', constant( 'WP_HOME' ));1262 return preg_replace( '|/+$|', '', WP_HOME ); 1263 1263 } 1264 1264 1265 1265 if ( $setting == 'siteurl' && defined( 'WP_SITEURL' ) ) { 1266 return preg_replace( '|/+$|', '', constant( 'WP_SITEURL' ));1266 return preg_replace( '|/+$|', '', WP_SITEURL ); 1267 1267 } 1268 1268 -
trunk/wp-admin/revision.php
r12859 r13209 30 30 break; 31 31 32 if ( ! constant('WP_POST_REVISIONS')&& !wp_is_post_autosave( $revision ) ) // Revisions disabled and we're not looking at an autosave32 if ( ! WP_POST_REVISIONS && !wp_is_post_autosave( $revision ) ) // Revisions disabled and we're not looking at an autosave 33 33 break; 34 34 … … 69 69 break; // Don't diff two unrelated revisions 70 70 71 if ( ! constant('WP_POST_REVISIONS')) { // Revisions disabled71 if ( ! WP_POST_REVISIONS ) { // Revisions disabled 72 72 if ( 73 73 // we're not looking at an autosave … … 107 107 break; 108 108 109 if ( ! constant('WP_POST_REVISIONS')&& !wp_is_post_autosave( $revision ) ) // Revisions disabled and we're not looking at an autosave109 if ( ! WP_POST_REVISIONS && !wp_is_post_autosave( $revision ) ) // Revisions disabled and we're not looking at an autosave 110 110 break; 111 111 … … 208 208 209 209 $args = array( 'format' => 'form-table', 'parent' => true, 'right' => $right, 'left' => $left ); 210 if ( ! constant( 'WP_POST_REVISIONS' ))210 if ( ! WP_POST_REVISIONS ) 211 211 $args['type'] = 'autosave'; 212 212 -
trunk/wp-includes/ms-functions.php
r13125 r13209 1275 1275 function maybe_redirect_404() { 1276 1276 global $current_site; 1277 if ( is_main_site() && is_404() && defined( 'NOBLOGREDIRECT' ) && constant( 'NOBLOGREDIRECT' ) != '' ) { 1278 $destination = constant( 'NOBLOGREDIRECT' ); 1277 if ( is_main_site() && is_404() && defined( 'NOBLOGREDIRECT' ) && ( $destination = NOBLOGREDIRECT ) ) { 1279 1278 if ( $destination == '%siteurl%' ) 1280 1279 $destination = $current_site->domain . $current_site->path; -
trunk/wp-includes/ms-load.php
r13066 r13209 99 99 global $wpdb, $current_site, $domain, $path, $sites, $cookie_domain; 100 100 if ( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' ) ) { 101 $current_site->id = (defined( 'SITE_ID_CURRENT_SITE' ) ? constant('SITE_ID_CURRENT_SITE') : 1);101 $current_site->id = defined( 'SITE_ID_CURRENT_SITE' ) ? SITE_ID_CURRENT_SITE : 1; 102 102 $current_site->domain = DOMAIN_CURRENT_SITE; 103 103 $current_site->path = $path = PATH_CURRENT_SITE; -
trunk/wp-includes/post.php
r13199 r13209 4170 4170 4171 4171 // WP_POST_REVISIONS = 0, false 4172 if ( ! constant('WP_POST_REVISIONS'))4172 if ( ! WP_POST_REVISIONS ) 4173 4173 return; 4174 4174 … … 4449 4449 */ 4450 4450 function wp_get_post_revisions( $post_id = 0, $args = null ) { 4451 if ( ! constant('WP_POST_REVISIONS'))4451 if ( ! WP_POST_REVISIONS ) 4452 4452 return array(); 4453 4453 if ( ( !$post = get_post( $post_id ) ) || empty( $post->ID ) ) -
trunk/wp-includes/template-loader.php
r7754 r13209 4 4 * @package WordPress 5 5 */ 6 if ( defined('WP_USE_THEMES') && constant('WP_USE_THEMES')) {6 if ( defined('WP_USE_THEMES') && WP_USE_THEMES ) { 7 7 do_action('template_redirect'); 8 8 if ( is_robots() ) { -
trunk/wp-includes/wp-db.php
r13174 r13209 346 346 */ 347 347 function wpdb($dbuser, $dbpassword, $dbname, $dbhost) { 348 if( defined( "WP_USE_MULTIPLE_DB" ) && CONSTANT( "WP_USE_MULTIPLE_DB" ) == true)348 if( defined( 'WP_USE_MULTIPLE_DB' ) && WP_USE_MULTIPLE_DB ) 349 349 $this->db_connect(); 350 350 return $this->__construct($dbuser, $dbpassword, $dbname, $dbhost); … … 368 368 register_shutdown_function(array(&$this, "__destruct")); 369 369 370 if ( defined( 'WP_DEBUG' ) &&WP_DEBUG )370 if ( WP_DEBUG ) 371 371 $this->show_errors(); 372 372 373 373 if ( is_multisite() ) { 374 374 $this->charset = 'utf8'; 375 if ( defined( 'DB_COLLATE' ) && constant( 'DB_COLLATE' ) != '')376 $this->collate = constant( 'DB_COLLATE' );375 if ( defined( 'DB_COLLATE' ) && DB_COLLATE ) 376 $this->collate = DB_COLLATE; 377 377 else 378 378 $this->collate = 'utf8_general_ci'; 379 } elseif ( defined( 'DB_COLLATE' ) ) { 380 $this->collate = DB_COLLATE; 379 381 } 380 382 381 383 if ( defined('DB_CHARSET') ) 382 384 $this->charset = DB_CHARSET; 383 384 if ( defined('DB_COLLATE') )385 $this->collate = DB_COLLATE;386 385 387 386 $this->dbuser = $dbuser; … … 667 666 $msg = "WordPress database error: [$str]\n{$this->last_query}\n"; 668 667 if ( defined( 'ERRORLOGFILE' ) ) 669 error_log( $msg, 3, CONSTANT( 'ERRORLOGFILE' ));668 error_log( $msg, 3, ERRORLOGFILE ); 670 669 if ( defined( 'DIEONDBERROR' ) ) 671 670 die( $msg ); … … 808 807 // use $this->dbhglobal for gloal table ops 809 808 unset( $dbh ); 810 if( defined( "WP_USE_MULTIPLE_DB" ) && CONSTANT( "WP_USE_MULTIPLE_DB" ) == true) {809 if( defined( 'WP_USE_MULTIPLE_DB' ) && WP_USE_MULTIPLE_DB ) { 811 810 if( $this->blogs != '' && preg_match("/(" . $this->blogs . "|" . $this->users . "|" . $this->usermeta . "|" . $this->site . "|" . $this->sitemeta . "|" . $this->sitecategories . ")/i",$query) ) { 812 811 if( false == isset( $this->dbhglobal ) ) {
Note: See TracChangeset
for help on using the changeset viewer.