[wp-trac] Re: [WordPress Trac] #9515: feed_link functions should add a slash before the query when permalink structure is default

WordPress Trac wp-trac at lists.automattic.com
Mon May 11 16:04:38 GMT 2009


#9515: feed_link functions should add a slash before the query when permalink
structure is default
------------------------------------+---------------------------------------
 Reporter:  peaceablewhale          |        Owner:  ryan    
     Type:  defect (bug)            |       Status:  reopened
 Priority:  low                     |    Milestone:  2.8     
Component:  Permalinks              |      Version:  2.7.1   
 Severity:  minor                   |   Resolution:          
 Keywords:  has-patch dev-feedback  |  
------------------------------------+---------------------------------------

Comment(by Denis-de-Bernardy):

 no idea what it rejects it, but:

 {{{
 DB:~/Sites/wp $ svn up

 Fetching external item into 'wp-content/plugins/akismet'
 External at revision 117154.

 At revision 11262.

 DB:~/Sites/wp $ wptest
 http://core.trac.wordpress.org/attachment/ticket/9515/link-template.php-
 trunk-user_trailingslashit.patch
 (Stripping trailing CRs from patch.)
 patching file link-template.php
 Hunk #1 FAILED at 154.
 Hunk #2 FAILED at 225.
 Hunk #3 FAILED at 269.
 Hunk #4 FAILED at 292.
 Hunk #5 FAILED at 317.
 Hunk #6 FAILED at 347.
 Hunk #7 FAILED at 382.
 Hunk #8 FAILED at 414.
 Hunk #9 FAILED at 468.
 Hunk #10 FAILED at 512.
 Hunk #11 FAILED at 551.
 Hunk #12 FAILED at 626.
 Hunk #13 FAILED at 651.
 13 out of 13 hunks FAILED -- saving rejects to file link-template.php.rej

 DB:~/Sites/wp $ cat ~/bin/wptest
 #!/bin/sh

 wpreset && wppatch $*

 DB:~/Sites/wp $ cat ~/bin/wpreset
 #!/bin/sh

 find . -name *.diff -exec rm '{}' \;
 find . -name *.patch -exec rm '{}' \;
 find . -name *.rej -exec rm '{}' \;
 find . -name *.orig -exec rm '{}' \;
 svn revert -R * -q

 DB:~/Sites/wp $ cat ~/bin/wppatch
 #!/bin/sh
 #
 # Automatically download and apply a patch from core.trac.wordpress.org
 #
 # Usage:
 #
 #   wp_patch http://core.trac.wordpress.org/attachment/ticket/132/132.diff
 #   wp_patch 123                        --
 http://core.trac.wordpress.org/attachment/ticket/132/132.diff
 #   wp_patch 123.2.diff         --
 http://core.trac.wordpress.org/attachment/ticket/132/132.2.diff
 #   wp_patch 123 456.diff       --
 http://core.trac.wordpress.org/attachment/ticket/132/456.diff
 #

 if [ ! -f wp-config.php ];
 then
         echo 'Invalid WP install'
         exit 1
 fi

 case $#
 in
         1 )
                 ticket=$1
                 if [ $ticket != ${ticket%/*} ];
                 then
                         ticket=${ticket##*/ticket/}
                         patch=${ticket##*/}
                         ticket=${ticket%%/*}
                 elif [ $ticket != ${ticket%%.*} ];
                 then
                         patch=$ticket
                         ticket=${ticket%%.*}
                 else
                         patch=$ticket.diff
                 fi
                 ;;
         2 )
                 ticket=$1
                 patch=$2
                 ;;
         * )
                 echo 'Invalid number of args'
                 exit 1
 esac

 curl -s --connect-timeout 3 http://core.trac.wordpress.org/raw-
 attachment/ticket/$ticket/$patch -o $PWD/$patch

 if [ $? -ne 0 ];
 then
         echo 'Error downloading patch'
         exit 1
 fi

 patch -p0 -i $PWD/$patch && rm $PWD/$patch
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9515#comment:28>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list