Make WordPress Core


Ignore:
Timestamp:
05/11/2006 11:05:45 PM (20 years ago)
Author:
ryan
Message:

Backport nonces and pluggable cookies.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/wp-admin/link-categories.php

    r3737 r3771  
    2727  case 'addcat':
    2828  {
    29       check_admin_referer();
     29      check_admin_referer('add-link-category');
    3030
    3131      if ( !current_user_can('manage_links') )
     
    8383  case 'Delete':
    8484  {
    85     check_admin_referer();
    86 
    87     $cat_id = (int) $_GET['cat_id'];
     85        $cat_id = (int) $_GET['cat_id'];
     86    check_admin_referer('delete-link-category' . $cat_id);
     87
    8888    $cat_name=get_linkcatname($cat_id);
    8989
     
    117117
    118118  <form name="editcat" method="post">
     119  <?php wp_nonce_field('update-link-category' . $row->cat_id) ?>
    119120      <input type="hidden" name="action" value="editedcat" />
    120121      <input type="hidden" name="cat_id" value="<?php echo $row->cat_id ?>" />
     
    204205  case "editedcat":
    205206  {
    206     check_admin_referer();
     207    $cat_id = (int)$_POST["cat_id"];
     208    check_admin_referer('update-link-category' . $cat_id);
    207209
    208210    if ( !current_user_can('manage_links') )
     
    211213    $submit=$_POST["submit"];
    212214    if (isset($submit)) {
    213 
    214     $cat_id = (int)$_POST["cat_id"];
    215215
    216216    $cat_name= wp_specialchars($_POST["cat_name"]);
     
    357357                <td><?php echo $row->list_limit ?></td>
    358358                <td><a href="link-categories.php?cat_id=<?php echo $row->cat_id?>&amp;action=Edit" class="edit"><?php _e('Edit') ?></a></td>
    359                 <td><a href="link-categories.php?cat_id=<?php echo $row->cat_id?>&amp;action=Delete" onclick="return deleteSomething( 'link category', <?php echo $row->cat_id . ", '" . sprintf(__("You are about to delete the &quot;%s&quot; link category.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), wp_specialchars($row->cat_name,1)); ?>' );" class="delete"><?php _e('Delete') ?></a></td>
     359                <td><a href="<?php echo wp_nonce_url("link-categories.php?cat_id=$row->cat_id?>&amp;action=Delete", 'delete-link-category' . $row->cat_id) ?>" "onclick="return deleteSomething( 'link category', <?php echo $row->cat_id . ", '" . sprintf(__("You are about to delete the &quot;%s&quot; link category.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), wp_specialchars($row->cat_name,1)); ?>' );" class="delete"><?php _e('Delete') ?></a></td>
    360360              </tr>
    361361<?php
     
    372372<div class="wrap">
    373373    <form name="addcat" method="post">
     374    <?php wp_nonce_field('add-link-category'); ?>
    374375      <input type="hidden" name="action" value="addcat" />
    375376          <h2><?php _e('Add a Link Category:') ?></h2>
Note: See TracChangeset for help on using the changeset viewer.