Changeset 13316
- Timestamp:
- 02/22/2010 11:12:48 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/custom-background.php
r13308 r13316 153 153 154 154 if ( get_background_image() ) : ?> 155 155 156 156 <h2><?php _e('Change Display Options') ?></h2> 157 157 <form method="post" action="<?php echo esc_attr(add_query_arg('step', 1)) ?>"> -
trunk/wp-admin/import/wordpress.php
r12985 r13316 189 189 $user_id = wp_create_user($new_author_name, wp_generate_password()); 190 190 } 191 191 192 192 if ( !is_wp_error( $user_id ) ) { 193 193 $this->author_ids[$in_author_name] = $user_id; … … 344 344 } 345 345 } 346 346 347 347 function process_terms() { 348 348 global $wpdb, $wp_taxonomies; 349 349 350 350 $custom_taxonomies = $wp_taxonomies; 351 351 // get rid of the standard taxonomies … … 353 353 unset( $custom_taxonomies['post_tag'] ); 354 354 unset( $custom_taxonomies['link_category'] ); 355 355 356 356 $custom_taxonomies = array_keys( $custom_taxonomies ); 357 357 $current_terms = (array) get_terms( $custom_taxonomies, array('get' => 'all') ); … … 602 602 // get_post_meta would have done this but we read straight from the db on export so we could have a serialized string 603 603 $value = maybe_unserialize($value); 604 604 605 605 $this->process_post_meta($post_id, $key, $value); 606 606 -
trunk/wp-admin/includes/template.php
r13313 r13316 3219 3219 3220 3220 if ($hide_on_update AND $_GET['updated']) return; 3221 3221 3222 3222 $settings_errors = get_settings_errors( $setting, $sanitize ); 3223 3223 -
trunk/wp-content/blogs.php
r13255 r13316 6 6 * @subpackage Multisite 7 7 */ 8 8 9 9 define( 'SHORTINIT', true ); 10 10 require_once( dirname( dirname( __FILE__) ) . '/wp-load.php' ); 11 11 12 12 /** Load Multisite upload handler. */ 13 13 require_once( ABSPATH . WPINC . '/ms-files.php' ); 14 14 15 15 ?> -
trunk/wp-includes/pomo/mo.php
r13228 r13316 27 27 return $this->import_from_reader($reader); 28 28 } 29 29 30 30 function export_to_file($filename) { 31 31 $fh = fopen($filename, 'wb'); … … 44 44 $translations_lenghts_addr, $size_of_hash, $hash_addr)); 45 45 fseek($fh, $originals_lenghts_addr); 46 46 47 47 // headers' msgid is an empty string 48 48 fwrite($fh, pack('VV', 0, $current_addr)); … … 56 56 $current_addr += $length + 1; // account for the NULL byte after 57 57 } 58 58 59 59 $exported_headers = $this->export_headers(); 60 60 fwrite($fh, pack('VV', strlen($exported_headers), $current_addr)); 61 61 $current_addr += strlen($exported_headers) + 1; 62 62 $translations_table = $exported_headers . chr(0); 63 63 64 64 foreach($entries as $entry) { 65 65 $translations_table .= $this->export_translations($entry) . chr(0); … … 68 68 $current_addr += $length + 1; 69 69 } 70 70 71 71 fwrite($fh, $originals_table); 72 72 fwrite($fh, $translations_table); 73 73 fclose($fh); 74 74 } 75 75 76 76 function export_original($entry) { 77 77 //TODO: warnings for control characters … … 81 81 return $exported; 82 82 } 83 83 84 84 function export_translations($entry) { 85 85 //TODO: warnings for control characters 86 86 return implode(chr(0), $entry->translations); 87 87 } 88 88 89 89 function export_headers() { 90 90 $exported = ''; -
trunk/wp-includes/pomo/po.php
r13228 r13316 19 19 if ( !class_exists( 'PO' ) ): 20 20 class PO extends Gettext_Translations { 21 21 22 22 23 23 /** … … 107 107 return $po; 108 108 } 109 109 110 110 /** 111 111 * Gives back the original string from a PO-formatted string … … 218 218 return $res !== false; 219 219 } 220 220 221 221 function read_entry($f, $lineno = 0) { 222 222 $entry = new Translation_Entry(); … … 323 323 return array('entry' => $entry, 'lineno' => $lineno); 324 324 } 325 325 326 326 function read_line($f, $action = 'read') { 327 327 static $last_line = ''; … … 340 340 return $line; 341 341 } 342 342 343 343 function add_comment_to_entry(&$entry, $po_comment_line) { 344 344 $first_two = substr($po_comment_line, 0, 2); … … 354 354 } 355 355 } 356 356 357 357 function trim_quotes($s) { 358 358 if ( substr($s, 0, 1) == '"') $s = substr($s, 1); -
trunk/wp-includes/pomo/streams.php
r13228 r13316 11 11 if ( !class_exists( 'POMO_Reader' ) ): 12 12 class POMO_Reader { 13 13 14 14 var $endian = 'little'; 15 15 var $_post = ''; 16 16 17 17 function POMO_Reader() { 18 18 $this->is_overloaded = ((ini_get("mbstring.func_overload") & 2) != 0) && function_exists('mb_substr'); 19 19 $this->_pos = 0; 20 20 } 21 21 22 22 /** 23 23 * Sets the endianness of the file. … … 58 58 return unpack($endian_letter.$count, $bytes); 59 59 } 60 61 60 61 62 62 function substr($string, $start, $length) { 63 63 if ($this->is_overloaded) { … … 67 67 } 68 68 } 69 69 70 70 function strlen($string) { 71 71 if ($this->is_overloaded) { … … 75 75 } 76 76 } 77 77 78 78 function str_split($string, $chunk_size) { 79 79 if (!function_exists('str_split')) { … … 87 87 } 88 88 } 89 90 89 90 91 91 function pos() { 92 92 return $this->_pos; … … 96 96 return true; 97 97 } 98 98 99 99 function close() { 100 100 return true; … … 109 109 $this->_f = fopen($filename, 'r'); 110 110 } 111 111 112 112 function read($bytes) { 113 113 return fread($this->_f, $bytes); 114 114 } 115 115 116 116 function seekto($pos) { 117 117 if ( -1 == fseek($this->_f, $pos, SEEK_SET)) { … … 121 121 return true; 122 122 } 123 123 124 124 function is_resource() { 125 125 return is_resource($this->_f); 126 126 } 127 127 128 128 function feof() { 129 129 return feof($this->_f); 130 130 } 131 131 132 132 function close() { 133 133 return fclose($this->_f); 134 134 } 135 135 136 136 function read_all() { 137 137 $all = ''; … … 149 149 */ 150 150 class POMO_StringReader extends POMO_Reader { 151 151 152 152 var $_str = ''; 153 153 154 154 function POMO_StringReader($str = '') { 155 155 parent::POMO_Reader(); … … 179 179 return $this->substr($this->_str, $this->_pos, $this->strlen($this->_str)); 180 180 } 181 181 182 182 } 183 183 endif; -
trunk/wp-includes/pomo/translations.php
r13228 r13316 127 127 return call_user_func($this->_gettext_select_plural_form, $count); 128 128 } 129 129 130 130 function nplurals_and_expression_from_header($header) { 131 131 if (preg_match('/^\s*nplurals\s*=\s*(\d+)\s*;\s+plural\s*=\s*(.+)$/', $header, $matches)) { … … 181 181 return rtrim($res, ';'); 182 182 } 183 183 184 184 function make_headers($translation) { 185 185 $headers = array(); … … 194 194 return $headers; 195 195 } 196 196 197 197 function set_header($header, $value) { 198 198 parent::set_header($header, $value); … … 213 213 var $entries = array(); 214 214 var $headers = array(); 215 215 216 216 function add_entry($entry) { 217 217 return true; -
trunk/wp-includes/post.php
r13291 r13316 3139 3139 $post_type = 'attachment'; 3140 3140 $post_status = 'inherit'; 3141 3141 3142 3142 // Make sure we set a valid category. 3143 3143 if ( !isset($post_category) || 0 == count($post_category) || !is_array($post_category) ) {
Note: See TracChangeset
for help on using the changeset viewer.