Changeset 18637
- Timestamp:
- 09/05/2011 04:53:19 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/misc.php
r18349 r18637 224 224 $short_url = str_replace( 'http://', '', stripslashes( $url )); 225 225 $short_url = str_replace( 'www.', '', $short_url ); 226 if ('/' == substr( $short_url, -1 )) 227 $short_url = substr( $short_url, 0, -1 ); 226 $short_url = untrailingslashit( $short_url ); 228 227 if ( strlen( $short_url ) > 35 ) 229 $short_url = substr( $short_url, 0, 32 ) .'...';228 $short_url = substr( $short_url, 0, 32 ) . '...'; 230 229 return $short_url; 231 230 } -
trunk/wp-includes/ms-functions.php
r18560 r18637 1522 1522 $size = 0; 1523 1523 1524 if ( substr( $directory, -1 ) == '/' ) 1525 $directory = substr($directory,0,-1); 1524 $directory = untrailingslashit( $directory ); 1526 1525 1527 1526 if ( !file_exists($directory) || !is_dir( $directory ) || !is_readable( $directory ) ) … … 1566 1565 $spaceAllowed = 10; // Default space allowed is 10 MB 1567 1566 1568 $dirName = BLOGUPLOADDIR; 1569 $size = get_dirsize($dirName) / 1024 / 1024; 1567 $size = get_dirsize( BLOGUPLOADDIR ) / 1024 / 1024; 1570 1568 1571 1569 if ( ($spaceAllowed-$size) < 0 ) { … … 1648 1646 1649 1647 $spaceAllowed = 1024 * 1024 * get_space_allowed(); 1650 $dirName = BLOGUPLOADDIR; 1651 $dirsize = get_dirsize($dirName) ; 1648 $dirsize = get_dirsize( BLOGUPLOADDIR ); 1652 1649 if ( $size > $spaceAllowed - $dirsize ) 1653 1650 return $spaceAllowed - $dirsize; // remaining space
Note: See TracChangeset
for help on using the changeset viewer.