Changeset 734

Show
Ignore:
Timestamp:
09/08/06 10:57:32 (2 years ago)
Author:
donncha
Message:

WP Merge to #4124

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/admin-functions.php

    r729 r734  
    973973        // Exit if no meta 
    974974        if (!$meta) { 
    975                 echo '<tbody id="the-list"></tbody>'; //TBODY needed for list-manipulation JS 
     975                echo '<tbody id="the-list"><tr style="display: none;"><td>&nbsp;</td></tr></tbody>'; //TBODY needed for list-manipulation JS 
    976976                return; 
    977977        } 
     
    12661266 
    12671267function the_quicktags() { 
    1268         // Browser detection sucks, but until Safari supports the JS needed for this to work people just assume it's a bug in WP 
    1269         if (!strstr($_SERVER['HTTP_USER_AGENT'], 'Safari')) { 
    12701268                echo ' 
    12711269                <div id="quicktags"> 
    12721270                        '; 
    12731271                wp_print_scripts( 'quicktags' ); 
    1274                 echo '                  <script type="text/javascript">if ( typeof tinyMCE == "undefined" || tinyMCE.configs.length < 1 ) edToolbar();</script> 
     1272                echo '                  <script type="text/javascript"> 
     1273                                //<![CDATA[ 
     1274                                if ( typeof tinyMCE == "undefined" || tinyMCE.configs.length < 1 ) edToolbar(); 
     1275                                //]]> 
     1276                        </script> 
    12751277                </div> 
    12761278'; 
    1277         } else echo ' 
     1279        echo ' 
    12781280<script type="text/javascript"> 
    12791281function edInsertContent(myField, myValue) { 
  • trunk/wp-admin/cat-js.php

    r729 r734  
    2222        newcatSub.name = 'Button'; 
    2323        newcatSub.id = 'catadd'; 
    24         newcatSub.value = 'Add'; 
     24        newcatSub.value = '<?php _e('Add'); ?>'; 
    2525        newcatSub.onclick = function() { catList.ajaxAdder('category', 'categorydiv'); }; 
    2626 
  • trunk/wp-admin/edit-form-advanced.php

    r729 r734  
    189189        $uploading_iframe_src = apply_filters('uploading_iframe_src', $uploading_iframe_src); 
    190190        if ( false != $uploading_iframe_src ) 
    191                 echo '<iframe id="uploading" border="0" src="' . $uploading_iframe_src . '">' . __('This feature requires iframe support.') . '</iframe>'; 
     191                echo '<iframe id="uploading" frameborder="0" src="' . $uploading_iframe_src . '">' . __('This feature requires iframe support.') . '</iframe>'; 
    192192} 
    193193?> 
  • trunk/wp-admin/edit-page-form.php

    r729 r734  
    160160        $uploading_iframe_src = apply_filters('uploading_iframe_src', $uploading_iframe_src); 
    161161        if ( false != $uploading_iframe_src ) 
    162                 echo '<iframe id="uploading" border="0" src="' . $uploading_iframe_src . '">' . __('This feature requires iframe support.') . '</iframe>'; 
     162                echo '<iframe id="uploading" frameborder="0" src="' . $uploading_iframe_src . '">' . __('This feature requires iframe support.') . '</iframe>'; 
    163163} 
    164164?> 
     
    192192                <input name="deletepost" class="button" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this page') ?>" <?php echo "onclick=\"if ( confirm('" . sprintf(__("You are about to delete this page \'%s\'\\n  \'Cancel\' to stop, \'OK\' to delete."), js_escape($post->post_title) ) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> /> 
    193193<?php endif; ?> 
     194</div> 
     195 
    194196</form> 
    195197 
    196198</div> 
    197  
    198 </div> 
  • trunk/wp-admin/edit.php

    r729 r734  
    116116        <fieldset> 
    117117        <legend><?php _e('Browse Category&hellip;') ?></legend> 
    118         <?php wp_dropdown_categories('show_option_all=All&hide_empty=0&hierarchical=1&show_count=1&selected='.$cat);?> 
     118        <?php wp_dropdown_categories('show_option_all='.__('All').'&hide_empty=0&hierarchical=1&show_count=1&selected='.$cat);?> 
    119119        <input type="submit" name="submit" value="<?php _e('Show Category') ?>"  />  
    120120        </fieldset> 
  • trunk/wp-admin/import/blogger.php

    r729 r734  
    671671$blogger_import = new Blogger_Import(); 
    672672 
    673 register_importer('blogger', 'Blogger and Blogspot', __('Import <strong>posts and comments</strong> from your Blogger account'), array ($blogger_import, 'start')); 
     673register_importer('blogger', __('Blogger and Blogspot'), __('Import <strong>posts and comments</strong> from your Blogger account'), array ($blogger_import, 'start')); 
    674674 
    675675?> 
  • trunk/wp-admin/import/blogware.php

    r549 r734  
    189189$blogware_import = new BW_Import(); 
    190190 
    191 register_importer('blogware', 'Blogware', __('Import posts from Blogware'), array ($blogware_import, 'dispatch')); 
     191register_importer('blogware', __('Blogware'), __('Import posts from Blogware'), array ($blogware_import, 'dispatch')); 
    192192?> 
  • trunk/wp-admin/import/dotclear.php

    r638 r734  
    633633                echo '<p>'.__('Secondly, we have attempted to preserve post authors.  If you are the only author or contributor to your blog, then you are safe.  In most cases, we are successful in this preservation endeavor.  However, if we cannot ascertain the name of the writer due to discrepancies between database tables, we assign it to you, the administrative user.').'</p>'; 
    634634                echo '<h3>'.__('Textile').'</h3>'; 
    635                 echo '<p>'.__('Also, since you\'re coming from Dotclear, you probably have been using Textile to format your comments and posts.  If this is the case, we recommend downloading and installing <a href="http://www.huddledmasses.org/2004/04/19/wordpress-plugin-textile-20/">Textile for WordPress</a>.  Trust me... You\'ll want it.').'</p>'; 
     635                echo '<p>'.__('Also, since you\'re coming from Dotclear, you probably have been using Textile to format your comments and posts.  If this is the case, we recommend downloading and installing <a href="http://www.huddledmasses.org/category/development/wordpress/textile/">Textile for WordPress</a>.  Trust me... You\'ll want it.').'</p>'; 
    636636                echo '<h3>'.__('WordPress Resources').'</h3>'; 
    637637                echo '<p>'.__('Finally, there are numerous WordPress resources around the internet.  Some of them are:').'</p>'; 
    638638                echo '<ul>'; 
    639639                echo '<li>'.__('<a href="http://www.wordpress.org">The official WordPress site</a>').'</li>'; 
    640                 echo '<li>'.__('<a href="http://wordpress.org/support/">The WordPress support forums').'</li>'; 
     640                echo '<li>'.__('<a href="http://wordpress.org/support/">The WordPress support forums</a>').'</li>'; 
    641641                echo '<li>'.__('<a href="http://codex.wordpress.org">The Codex (In other words, the WordPress Bible)</a>').'</li>'; 
    642642                echo '</ul>'; 
    643                 echo '<p>'.sprintf(__('That\'s it! What are you waiting for? Go <a href="%1$s">login</a>!'), '/wp-login.php').'</p>'; 
     643                echo '<p>'.sprintf(__('That\'s it! What are you waiting for? Go <a href="%1$s">login</a>!'), '../wp-login.php').'</p>'; 
    644644        } 
    645645 
     
    744744 
    745745$dc_import = new Dotclear_Import(); 
    746 register_importer('dotclear', 'Dotclear', __('Import posts from a Dotclear Blog'), array ($dc_import, 'dispatch')); 
     746register_importer('dotclear', __('Dotclear'), __('Import posts from a Dotclear Blog'), array ($dc_import, 'dispatch')); 
    747747?> 
  • trunk/wp-admin/import/greymatter.php

    r638 r734  
    1717                $this->header(); 
    1818?> 
    19 <p>This is a basic GreyMatter to WordPress import script.</p> 
    20 <p>What it does:</p> 
     19<p><?php _e('This is a basic GreyMatter to WordPress import script.') ?></p> 
     20<p><?php _e('What it does:') ?></p> 
    2121<ul> 
    22 <li>Parses gm-authors.cgi to import (new) authors. Everyone is imported at level 1.</li> 
    23 <li>Parses the entries cgi files to import posts, comments, and karma on posts (although karma is not used on WordPress yet).<br />If authors are found not to be in gm-authors.cgi, imports them at level 0.</li> 
    24 <li>Detects duplicate entries or comments. If you don't import everything the first time, or this import should fail in the middle, duplicate entries will not be made when you try again.</li> 
     22<li><?php _e('Parses gm-authors.cgi to import (new) authors. Everyone is imported at level 1.') ?></li> 
     23<li><?php _e('Parses the entries cgi files to import posts, comments, and karma on posts (although karma is not used on WordPress yet).<br />If authors are found not to be in gm-authors.cgi, imports them at level 0.') ?></li> 
     24<li><?php _e("Detects duplicate entries or comments. If you don't import everything the first time, or this import should fail in the middle, duplicate entries will not be made when you try again.") ?></li> 
    2525</ul> 
    26 <p>What it does not:</p> 
     26<p><?php _e('What it does not:') ?></p> 
    2727<ul> 
    28 <li>Parse gm-counter.cgi, gm-banlist.cgi, gm-cplog.cgi (you can make a CP log hack if you really feel like it, but I question the need of a CP log).</li> 
    29 <li>Import gm-templates.</li> 
    30 <li>Doesn't keep entries on top.</li> 
     28<li><?php _e('Parse gm-counter.cgi, gm-banlist.cgi, gm-cplog.cgi (you can make a CP log hack if you really feel like it, but I question the need of a CP log).') ?></li> 
     29<li><?php _e('Import gm-templates.') ?></li> 
     30<li><?php _e("Doesn't keep entries on top.")?></li> 
    3131</ul> 
    3232<p>&nbsp;</p> 
     
    3535<input type="hidden" name="import" value="greymatter" /> 
    3636<input type="hidden" name="step" value="1" /> 
    37 <h3>Second step: GreyMatter details:</h3> 
     37<h3><?php _e('Second step: GreyMatter details:') ?></h3> 
    3838<p><table cellpadding="0"> 
    3939<tr> 
    40 <td>Path to GM files:</td> 
     40<td><?php _e('Path to GM files:') ?></td> 
    4141<td><input type="text" style="width:300px" name="gmpath" value="/home/my/site/cgi-bin/greymatter/" /></td> 
    4242</tr> 
    4343<tr> 
    44 <td>Path to GM entries:</td> 
     44<td><?php _e('Path to GM entries:') ?></td> 
    4545<td><input type="text" style="width:300px" name="archivespath" value="/home/my/site/cgi-bin/greymatter/archives/" /></td> 
    4646</tr> 
    4747<tr> 
    48 <td colspan="2"><br />This importer will search for files 00000001.cgi to 000-whatever.cgi,<br />so you need to enter the number of the last GM post here.<br />(if you don't know that number, just log into your FTP and look it out<br />in the entries' folder)</td> 
     48<td colspan="2"><br /><?php _e("This importer will search for files 00000001.cgi to 000-whatever.cgi,<br />so you need to enter the number of the last GM post here.<br />(if you don't know that number, just log into your FTP and look it out<br />in the entries' folder)") ?></td> 
    4949</tr> 
    5050<tr> 
    51 <td>Last entry's number:</td> 
     51<td><?php _e("Last entry's number:") ?></td> 
    5252<td><input type="text" name="lastentry" value="00000001" /></td> 
    5353</tr> 
    5454</table> 
    5555</p> 
    56 <p>When you're ready, click OK to start importing: <input type="submit" name="submit" value="OK" class="search" /></p> 
     56<p><?php _e("When you're ready, click OK to start importing: ") ?><input type="submit" name="submit" value="<?php _e('OK') ?>" class="search" /></p> 
    5757</form> 
    5858<p>&nbsp</p> 
     
    8888 
    8989                if (!chdir($archivespath)) 
    90                         wp_die("Wrong path, $archivespath\ndoesn't exist\non the server"); 
     90                        wp_die(sprintf(__("Wrong path, %s\ndoesn't exist\non the server"), $archivespath)); 
    9191 
    9292                if (!chdir($gmpath)) 
    93                         wp_die("Wrong path, $gmpath\ndoesn't exist\non the server"); 
     93                        wp_die(sprintf(__("Wrong path, %s\ndoesn't exist\non the server"), $gmpath)); 
    9494                         
    9595                $this->header(); 
    9696?> 
    97 <p>The importer is running...</p> 
     97<p><?php _e('The importer is running...') ?></p> 
    9898<ul> 
    99 <li>importing users... <ul><?php 
     99<li><?php _e('importing users...') ?><ul><?php 
    100100 
    101101        chdir($gmpath); 
     
    121121                $user_id = username_exists($user_login); 
    122122                if ($user_id) { 
    123                         echo "<li>user <i>$user_login</i>... <b>Already exists</b></li>"
     123                        printf('<li>'.__('user %s').'<strong>'.__('Already exists').'</strong></li>', "<em>$user_login</em>")
    124124                        $this->gmnames[$userdata[0]] = $user_id; 
    125125                        continue; 
     
    130130                $this->gmnames[$userdata[0]] = $user_id; 
    131131                 
    132                 echo "<li>user <i>$user_login</i>... <b>Done</b></li>"; 
    133  
    134         } 
    135  
    136 ?></ul><b>Done</b></li> 
    137 <li>importing posts, comments, and karma...<br /><ul><?php 
     132                printf('<li>'.__('user %s...').' <strong>'.__('Done').'</strong></li>', "<em>$user_login</em>"); 
     133        } 
     134 
     135?></ul><strong><?php _e('Done') ?></strong></li> 
     136<li><?php _e('importing posts, comments, and karma...') ?><br /><ul><?php 
    138137 
    139138        chdir($archivespath); 
     
    164163 
    165164                        $entry=file($entryfile.".cgi"); 
    166                         echo "<li>entry # $entryfile "; 
    167165                        $postinfo=explode("|",$entry[0]); 
    168166                        $postmaincontent=$this->gm2autobr($entry[2]); 
     
    172170 
    173171                        $post_title=$this->gm2autobr($postinfo[2]); 
    174                         echo " : $post_title : by $postinfo[1]"
     172                        printf('<li>'.__('entry # %s : %s : by %s'), $entryfile, $post_title, $postinfo[1])
    175173                        $post_title=$wpdb->escape($post_title); 
    176174 
     
    199197                         
    200198                        if ($post_ID = post_exists($post_title, '', $post_date)) { 
    201                                 echo ' (already exists)'; 
     199                                echo ' '; 
     200                                _e('(already exists)'); 
    202201                        } else { 
    203202                                //just so that if a post already exists, new users are not created by checkauthor 
     
    220219                                        $this->gmnames[$postinfo[1]] = $user_id; 
    221220                                         
    222                                         echo ": registered deleted user <i>$user_login</i> at level 0 "; 
     221                                        echo ': '; 
     222                                        printf(__('registered deleted user %s at level 0 '), "<em>$user_login</em>"); 
    223223                                } 
    224224                         
     
    267267                                } 
    268268                                if ($numAddedComments > 0) { 
    269                                         echo ": imported $numAddedComments comment"; 
    270                                         if ($numAddedComments != 1) 
    271                                                 echo "s"; 
     269                                        echo ': '; 
     270                                        printf(__('imported %d comment(s)'), $numAddedComments); 
    272271                                } 
    273272                                $preExisting = $numComments - numAddedComments; 
    274                                 if ($preExisting > 0) 
    275                                         echo " (ignored $preExisting pre-existing comments)"; 
     273                                if ($preExisting > 0) { 
     274                                        echo ' '; 
     275                                        printf(__('ignored %d pre-existing comments'), $preExisting); 
     276                                } 
    276277                        } 
    277                         echo "... <b>Done</b></li>"
     278                        echo '... <strong>'.__('Done').'</strong></li>'
    278279                } 
    279280        } 
    280281        ?> 
    281 </ul><b>Done</b></li></ul> 
     282</ul><strong><?php _e('Done') ?></strong></li></ul> 
    282283<p>&nbsp;</p> 
    283 <p>Completed Greymatter import !</p> 
     284<p><?php _e('Completed Greymatter import!') ?></p> 
    284285<?php 
    285286        $this->footer(); 
     
    309310$gm_import = new GM_Import(); 
    310311 
    311 register_importer('greymatter', 'Greymatter', __('Import posts and comments from your Greymatter blog'), array ($gm_import, 'dispatch')); 
     312register_importer('greymatter', __('Greymatter'), __('Import posts and comments from your Greymatter blog'), array ($gm_import, 'dispatch')); 
    312313?> 
  • trunk/wp-admin/import/livejournal.php

    r550 r734  
    165165$livejournal_import = new LJ_Import(); 
    166166 
    167 register_importer('livejournal', 'LiveJournal', __('Import posts from LiveJournal'), array ($livejournal_import, 'dispatch')); 
     167register_importer('livejournal', __('LiveJournal'), __('Import posts from LiveJournal'), array ($livejournal_import, 'dispatch')); 
    168168?> 
  • trunk/wp-admin/import/mt.php

    r559 r734  
    3333                $users = get_users_of_blog($wpdb->blogid); 
    3434?><select name="userselect[<?php echo $n; ?>]"> 
    35         <option value="#NONE#">- Select -</option> 
     35        <option value="#NONE#"><?php _e('- Select -') ?></option> 
    3636        <?php 
    3737 
     
    5151                global $wpdb; 
    5252                //mtnames is an array with the names in the mt import file 
    53                 $key = array_search($author, $this->mtnames); //find the array key for $author in the $mtnames array 
    54                 $user_id = username_exists($this->newauthornames[$key]); //use that key to get the value of the author's name from $newauthornames 
     53                $pass = 'changeme'; 
     54                if (!(in_array($author, $this->mtnames))) { //a new mt author name is found 
     55                        ++ $this->j; 
     56                        $this->mtnames[$this->j] = $author; //add that new mt author name to an array  
     57                        $user_id = username_exists($this->newauthornames[$this->j]); //check if the new author name defined by the user is a pre-existing wp user 
     58                        if (!$user_id) { //banging my head against the desk now.  
     59                                if ($newauthornames[$this->j] == 'left_blank') { //check if the user does not want to change the authorname 
     60                                        $user_id = wp_create_user($author, $pass); 
     61                                        $this->newauthornames[$this->j] = $author; //now we have a name, in the place of left_blank. 
     62                                } else { 
     63                                        $user_id = wp_create_user($this->newauthornames[$this->j], $pass); 
     64                                } 
     65                        } else { 
     66                                return $user_id; // return pre-existing wp username if it exists 
     67                        } 
     68                } else { 
     69                        $key = array_search($author, $this->mtnames); //find the array key for $author in the $mtnames array 
     70                        $user_id = username_exists($this->newauthornames[$key]); //use that key to get the value of the author's name from $newauthornames 
     71                } 
    5572 
    5673                return $user_id; 
     
    94111                $selectnames = array (); 
    95112 
     113                foreach ($_POST['user'] as $key => $line) { 
     114                        $newname = trim(stripslashes($line)); 
     115                        if ($newname == '') 
     116                                $newname = 'left_blank'; //passing author names from step 1 to step 2 is accomplished by using POST. left_blank denotes an empty entry in the form. 
     117                        array_push($formnames, "$newname"); 
     118                } // $formnames is the array with the form entered names 
     119 
    96120                foreach ($_POST['userselect'] as $user => $key) { 
    97121                        $selected = trim(stripslashes($key)); 
     
    125149                foreach ($authors as $author) { 
    126150                        ++ $j; 
    127                         echo '<li><i>'.$author.'</i><br />'.'<input type="text" value="'.$author.'" name="'.'user[]'.'" maxlength="30">'
     151                        echo '<li>'.__('Current author:').' <strong>'.$author.'</strong><br />'.sprintf(__('Create user %1$s or map to existing'), ' <input type="text" value="'.$author.'" name="'.'user[]'.'" maxlength="30"> <br />')
    128152                        $this->users_form($j); 
    129153                        echo '</li>'; 
    130154                } 
    131155 
    132                 echo '<input type="submit" value="Submit">'.'<br/>'; 
     156                echo '<input type="submit" value="'.__('Submit').'">'.'<br/>'; 
    133157                echo '</form>'; 
    134158                echo '</ol></div>'; 
     
    139163                $file = wp_import_handle_upload(); 
    140164                if ( isset($file['error']) ) { 
    141                         echo $file['error']; 
     165                        $this->header(); 
     166                        echo '<p>'.__('Sorry, there has been an error').'.</p>'; 
     167                        echo '<p><strong>' . $file['error'] . '</strong></p>'; 
     168                        $this->footer(); 
    142169                        return; 
    143170                } 
     
    171198                                // We want the excerpt 
    172199                                preg_match("|-----\nEXCERPT:(.*)|s", $post, $excerpt); 
    173                                 $excerpt = $wpdb->escape(trim($excerpt[1])); 
     200                                $post_excerpt = $wpdb->escape(trim($excerpt[1])); 
    174201                                $post = preg_replace("|(-----\nEXCERPT:.*)|s", '', $post); 
    175202 
     
    308335                                } 
    309336                                if ( $num_comments ) 
    310                                         printf(__(' (%s comments)'), $num_comments); 
     337                                        printf(' '.__('(%s comments)'), $num_comments); 
    311338 
    312339                                // Finally the pings 
     
    356383                                } 
    357384                                if ( $num_pings ) 
    358                                         printf(__(' (%s pings)'), $num_pings); 
     385                                        printf(' '.__('(%s pings)'), $num_pings); 
    359386 
    360387                                echo "</li>"; 
     
    404431$mt_import = new MT_Import(); 
    405432 
    406 register_importer('mt', 'Movable Type and Typepad', __('Imports <strong>posts and comments</strong> from your Movable Type or Typepad blog'), array ($mt_import, 'dispatch')); 
     433register_importer('mt', __('Movable Type and Typepad'), __('Imports <strong>posts and comments</strong> from your Movable Type or Typepad blog'), array ($mt_import, 'dispatch')); 
    407434?> 
  • trunk/wp-admin/import/rss.php

    r524 r734  
    3939                foreach ($this->posts as $post) { 
    4040                        preg_match('|<title>(.*?)</title>|is', $post, $post_title); 
    41                         $post_title = $wpdb->escape(trim($post_title[1])); 
     41                        $post_title = str_replace(array('<![CDATA[', ']]>'), '', $wpdb->escape( trim($post_title[1]) )); 
    4242 
    43                         preg_match('|<pubdate>(.*?)</pubdate>|is', $post, $post_date); 
     43                        preg_match('|<pubdate>(.*?)</pubdate>|is', $post, $post_date_gmt); 
    4444 
    45                         if ($post_date) { 
    46                                 $post_date = strtotime($post_date[1]); 
     45                        if ($post_date_gmt) { 
     46                                $post_date_gmt = strtotime($post_date_gmt[1]); 
    4747                        } else { 
    4848                                // if we don't already have something from pubDate 
    49                                 preg_match('|<dc:date>(.*?)</dc:date>|is', $post, $post_date); 
    50                                 $post_date = preg_replace('|([-+])([0-9]+):([0-9]+)$|', '\1\2\3', $post_date[1]); 
    51                                 $post_date = str_replace('T', ' ', $post_date); 
    52                                 $post_date = strtotime($post_date); 
     49                                preg_match('|<dc:date>(.*?)</dc:date>|is', $post, $post_date_gmt); 
     50                                $post_date_gmt = preg_replace('|([-+])([0-9]+):([0-9]+)$|', '\1\2\3', $post_date_gmt[1]); 
     51                                $post_date_gmt = str_replace('T', ' ', $post_date_gmt); 
     52                                $post_date_gmt = strtotime($post_date_gmt); 
    5353                        } 
    5454 
    55                         $post_date = gmdate('Y-m-d H:i:s', $post_date); 
     55                        $post_date_gmt = gmdate('Y-m-d H:i:s', $post_date_gmt); 
     56                        $post_date = get_date_from_gmt( $post_date_gmt ); 
    5657 
    5758                        preg_match_all('|<category>(.*?)</category>|is', $post, $categories); 
     
    9192                        $post_author = 1; 
    9293                        $post_status = 'publish'; 
    93                         $this->posts[$index] = compact('post_author', 'post_date', 'post_content', 'post_title', 'post_status', 'guid', 'categories'); 
     94                        $this->posts[$index] = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_status', 'guid', 'categories'); 
    9495                        $index++; 
    9596                } 
     
    168169$rss_import = new RSS_Import(); 
    169170 
    170 register_importer('rss', 'RSS', __('Import posts from an RSS feed'), array ($rss_import, 'dispatch')); 
     171register_importer('rss', __('RSS'), __('Import posts from an RSS feed'), array ($rss_import, 'dispatch')); 
    171172?> 
  • trunk/wp-admin/import/textpattern.php

    r638 r734  
    556556                echo '<p>'.__('Secondly, we have attempted to preserve post authors.  If you are the only author or contributor to your blog, then you are safe.  In most cases, we are successful in this preservation endeavor.  However, if we cannot ascertain the name of the writer due to discrepancies between database tables, we assign it to you, the administrative user.').'</p>'; 
    557557                echo '<h3>'.__('Textile').'</h3>'; 
    558                 echo '<p>'.__('Also, since you\'re coming from Textpattern, you probably have been using Textile to format your comments and posts.  If this is the case, we recommend downloading and installing <a href="http://www.huddledmasses.org/2004/04/19/wordpress-plugin-textile-20/">Textile for WordPress</a>.  Trust me... You\'ll want it.').'</p>'; 
     558                echo '<p>'.__('Also, since you\'re coming from Textpattern, you probably have been using Textile to format your comments and posts.  If this is the case, we recommend downloading and installing <a href="http://www.huddledmasses.org/category/development/wordpress/textile/">Textile for WordPress</a>.  Trust me... You\'ll want it.').'</p>'; 
    559559                echo '<h3>'.__('WordPress Resources').'</h3>'; 
    560560                echo '<p>'.__('Finally, there are numerous WordPress resources around the internet.  Some of them are:').'</p>'; 
    561561                echo '<ul>'; 
    562562                echo '<li>'.__('<a href="http://www.wordpress.org">The official WordPress site</a>').'</li>'; 
    563                 echo '<li>'.__('<a href="http://wordpress.org/support/">The WordPress support forums').'</li>'; 
     563                echo '<li>'.__('<a href="http://wordpress.org/support/">The WordPress support forums</a>').'</li>'; 
    564564                echo '<li>'.__('<a href="http://codex.wordpress.org">The Codex (In other words, the WordPress Bible)</a>').'</li>'; 
    565565                echo '</ul>'; 
     
    660660 
    661661$txp_import = new Textpattern_Import(); 
    662 register_importer('textpattern', 'Textpattern', __('Import posts from a Textpattern Blog'), array ($txp_import, 'dispatch')); 
     662register_importer('textpattern', __('Textpattern'), __('Import posts from a Textpattern Blog'), array ($txp_import, 'dispatch')); 
    663663?> 
  • trunk/wp-admin/import/wordpress.php

    r559 r734  
    5555                //mtnames is an array with the names in the mt import file 
    5656                $pass = 'changeme'; 
    57                 $key = array_search($author, $this->mtnames); //find the array key for $author in the $mtnames array 
    58                 $user_id = username_exists($this->newauthornames[$key]); //use that key to get the value of the author's name from $newauthornames 
     57                if (!(in_array($author, $this->mtnames))) { //a new mt author name is found 
     58                        ++ $this->j; 
     59                        $this->mtnames[$this->j] = $author; //add that new mt author name to an array  
     60                        $user_id = username_exists($this->newauthornames[$this->j]); //check if the new author name defined by the user is a pre-existing wp user 
     61                        if (!$user_id) { //banging my head against the desk now.  
     62                                if ($newauthornames[$this->j] == 'left_blank') { //check if the user does not want to change the authorname 
     63                                        $user_id = wp_create_user($author, $pass); 
     64                                        $this->newauthornames[$this->j] = $author; //now we have a name, in the place of left_blank. 
     65                                } else { 
     66                                        $user_id = wp_create_user($this->newauthornames[$this->j], $pass); 
     67                                } 
     68                        } else { 
     69                                return $user_id; // return pre-existing wp username if it exists 
     70                        } 
     71                } else { 
     72                        $key = array_search($author, $this->mtnames); //find the array key for $author in the $mtnames array 
     73                        $user_id = username_exists($this->newauthornames[$key]); //use that key to get the value of the author's name from $newauthornames 
     74                } 
    5975 
    6076                return $user_id; 
     
    97113                $selectnames = array (); 
    98114 
     115                foreach ($_POST['user'] as $key => $line) { 
     116                        $newname = trim(stripslashes($line)); 
     117                        if ($newname == '') 
     118                                $newname = 'left_blank'; //passing author names from step 1 to step 2 is accomplished by using POST. left_blank denotes an empty entry in the form. 
     119                        array_push($formnames, "$newname"); 
     120                } // $formnames is the array with the form entered names 
     121 
    99122                foreach ($_POST['userselect'] as $user => $key) { 
    100123                        $selected = trim(stripslashes($key)); 
     
    126149                foreach ($authors as $author) { 
    127150                        ++ $j; 
    128                         echo '<li>Current author: <strong>'.$author.'</strong><br />'.'Map to existing: '
     151                        echo '<li>'.__('Current author:').' <strong>'.$author.'</strong><br />'.sprintf(__('Create user %1$s or map to existing'), ' <input type="text" value="'.$author.'" name="'.'user[]'.'" maxlength="30"> <br />')
    129152                        $this->users_form($j); 
    130153                        echo '</li>'; 
     
    141164                if ( isset($file['error']) ) { 
    142165                        $this->header(); 
    143                         echo '<p>Sorry, there has been an error.</p>'; 
     166                        echo '<p>'.__('Sorry, there has been an error.').'</p>'; 
    144167                        echo '<p><strong>' . $file['error'] . '</strong></p>'; 
    145168                        $this->footer(); 
     
    226249                                } } 
    227250                                if ( $num_comments ) 
    228                                         printf(__(' (%s comments)'), $num_comments); 
     251                                        printf(' '.__('(%s comments)'), $num_comments); 
    229252 
    230253                                // Now for post meta 
     
    244267                wp_import_cleanup($this->id); 
    245268 
    246                 echo '<h3>'.sprintf(__('All done. <a href="%s">Have fun!</a>'), get_option('home')).'</h3>'; 
     269                echo '<h3>'.sprintf(__('All done.').' <a href="%s">'.__('Have fun!').'</a>', get_option('home')).'</h3>'; 
    247270        } 
    248271 
  • trunk/wp-admin/page.php

    r729 r734  
    6363        <div id='preview' class='wrap'> 
    6464        <h2 id="preview-post"><?php _e('Page Preview (updated when page is saved)'); ?> <small class="quickjump"><a href="#write-post"><?php _e('edit &uarr;'); ?></a></small></h2> 
    65                 <iframe src="<?php echo add_query_arg('preview', 'true', get_permalink($post->ID)); ?>" width="100%" height="600" ></iframe> 
     65                <iframe src="<?php echo wp_specialchars(apply_filters('preview_page_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" width="100%" height="600" ></iframe> 
    6666        </div> 
    6767        <?php 
  • trunk/wp-admin/post.php

    r729 r734  
    6464        <div id='preview' class='wrap'> 
    6565        <h2 id="preview-post"><?php _e('Post Preview (updated when post is saved)'); ?> <small class="quickjump"><a href="#write-post"><?php _e('edit &uarr;'); ?></a></small></h2> 
    66                 <iframe src="<?php echo add_query_arg('preview', 'true', get_permalink($post->ID)); ?>" width="100%" height="600" ></iframe> 
     66                <iframe src="<?php echo wp_specialchars(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" width="100%" height="600" ></iframe> 
    6767        </div> 
    6868        <?php 
  • trunk/wp-content/themes/default/archive.php

    r524 r734  
    1717                <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> 
    1818                <h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2> 
    19  
    20           <?php /* If this is a search */ } elseif (is_search()) { ?> 
    21                 <h2 class="pagetitle">Search Results</h2> 
    2219 
    2320          <?php /* If this is an author archive */ } elseif (is_author()) { ?> 
  • trunk/wp-content/themes/default/searchform.php

    r439 r734  
    11<form method="get" id="searchform" action="<?php bloginfo('home'); ?>/"> 
    2 <div><input type="text" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" /> 
     2<div><input type="text" value="<?php the_search_query(); ?>" name="s" id="s" /> 
    33<input type="submit" id="searchsubmit" value="Search" /> 
    44</div> 
  • trunk/wp-content/themes/default/sidebar.php

    r713 r734  
    3131                 <?php /* If this is a monthly archive */ } elseif (is_search()) { ?> 
    3232                        <p>You have searched the <a href="<?php echo bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives 
    33                         for <strong>'<?php echo wp_specialchars($s); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p> 
     33                        for <strong>'<?php the_search_query(); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p> 
    3434 
    3535                        <?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> 
  • trunk/wp-includes/bookmark-template.php

    r729 r734  
    272272 
    273273                if ( $show_updated ) 
    274                         if ( '00' != substr($bookmark->link_updated_f, 0, 2) ) 
    275                                 $title .= ' (Last updated ' . date(get_option('links_updated_date_format'), $bookmark->link_updated_f + (get_option('gmt_offset') * 3600)) . ')'; 
     274                        if ( '00' != substr($bookmark->link_updated_f, 0, 2) ) { 
     275                                $title .= ' '; 
     276                                $title .= sprintf(__('Last updated: %s'), date(get_option('links_updated_date_format'), $bookmark->link_updated_f + (get_option('gmt_offset') * 3600))); 
     277                                $title .= ')'; 
     278                        } 
    276279 
    277280                if ( '' != $title ) 
  • trunk/wp-includes/category-template.php

    r729 r734  
    4848                $name = $parent->cat_name; 
    4949 
    50         if ( $parent->category_parent
     50        if ( $parent->category_parent && ($parent->category_parent != $parent->cat_ID)
    5151                $chain .= get_category_parents($parent->category_parent, $link, $separator, $nicename); 
    5252 
     
    170170                'selected' => 0, 'hierarchical' => 0, 'name' => 'cat', 
    171171                'class' => 'postform'); 
     172        $defaults['selected'] = ( is_category() ) ? get_query_var('cat') : 0; 
    172173        $r = array_merge($defaults, $r); 
    173174        $r['include_last_update_time'] = $r['show_last_update']; 
  • trunk/wp-includes/category.php

    r723 r734  
    173173                $path = '/' . $leaf_path; 
    174174                $curcategory = $category; 
    175                 while ($curcategory->category_parent != 0) { 
     175                while ( ($curcategory->category_parent != 0) && ($curcategory->category_parent != $curcategory->cat_ID) ) { 
    176176                        $curcategory = $wpdb->get_row("SELECT cat_ID, category_nicename, category_parent FROM $wpdb->categories WHERE cat_ID = '$curcategory->category_parent'"); 
    177177                        $path = '/' . $curcategory->category_nicename . $path; 
     
    220220        $category_list = array(); 
    221221        foreach ( $categories as $category ) { 
     222                if ( $category->cat_ID == $category_id ) 
     223                        continue; 
     224 
    222225                if ( $category->category_parent == $category_id ) { 
    223226                        $category_list[] = $category;