Make WordPress Core

Ticket #2382: 2382.diff

File 2382.diff, 1.9 KB (added by westi, 19 years ago)

Patch containing the changes from $id to $post->ID

  • edit-pages.php

     
    4343if ( isset($_GET['s']) ) {
    4444foreach ( $posts as $post ) :
    4545        $class = ('alternate' != $class) ? 'alternate' : ''; ?>
    46   <tr id='page-<?php echo $id; ?>' class='<?php echo $class; ?>'>
     46  <tr id='page-<?php echo $post->ID; ?>' class='<?php echo $class; ?>'>
    4747    <th scope="row"><?php echo $post->ID; ?></th>
    4848    <td>
    4949      <?php echo $pad; ?><?php the_title() ?>
     
    5151    <td><?php the_author() ?></td>
    5252    <td><?php echo mysql2date('Y-m-d g:i a', $post->post_modified); ?></td>
    5353        <td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e('View'); ?></a></td>
    54     <td><?php if ( current_user_can('edit_pages') ) { echo "<a href='post.php?action=edit&amp;post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td>
    55     <td><?php if ( current_user_can('edit_pages') ) { echo "<a href='post.php?action=delete&amp;post=$id' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . sprintf(__("You are about to delete the &quot;%s&quot; page.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop."), wp_specialchars(get_the_title('','',0), 1)) . "' );\">" . __('Delete') . "</a>"; } ?></td>
     54    <td><?php if ( current_user_can('edit_pages') ) { echo "<a href='post.php?action=edit&amp;post={$post->ID}' class='edit'>" . __('Edit') . "</a>"; } ?></td>
     55    <td><?php if ( current_user_can('edit_pages') ) { echo "<a href='post.php?action=delete&amp;post={$post->ID}' class='delete' onclick=\"return deleteSomething( 'page', " . $post->ID . ", '" . sprintf(__("You are about to delete the &quot;%s&quot; page.\\n&quot;OK&quot; to delete, &quot;Cancel&quot; to stop."), wp_specialchars(get_the_title('','',0), 1)) . "' );\">" . __('Delete') . "</a>"; } ?></td>
    5656  </tr>
    5757<?php
    5858endforeach;