Make WordPress Core

Changeset 1202


Ignore:
Timestamp:
04/28/2004 05:48:31 AM (21 years ago)
Author:
saxmatt
Message:

Category cleanups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/categories.php

    r1187 r1202  
    5555    $wpdb->query("INSERT INTO $tablecategories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES ('0', '$cat_name', '$category_nicename', '$category_description', '$cat')");
    5656   
    57     header('Location: categories.php#addcat');
     57    header('Location: categories.php?message=1#addcat');
    5858
    5959break;
     
    8080    $wpdb->query("UPDATE $tablepost2cat SET category_id='1' WHERE category_id='$cat_ID'");
    8181
    82     header('Location: categories.php');
     82    header('Location: categories.php?message=2');
    8383
    8484break;
     
    107107        <p><?php _e('Description:') ?><br />
    108108        <textarea name="category_description" rows="5" cols="50" style="width: 97%;"><?php echo htmlentities($category->category_description); ?></textarea></p>
    109         <p><input type="submit" name="submit" value="<?php _e('Edit it!') ?>" class="search" /></p>
     109        <p class="submit"><input type="submit" name="submit" value="<?php _e('Edit category &raquo;') ?>" /></p>
    110110    </form>
    111111</div>
     
    130130    $wpdb->query("UPDATE $tablecategories SET cat_name = '$cat_name', category_nicename = '$category_nicename', category_description = '$category_description', category_parent = $cat WHERE cat_ID = $cat_ID");
    131131   
    132     header('Location: categories.php');
     132    header('Location: categories.php?message=3');
    133133
    134134break;
     
    141141        die(sprintf(__("You have no right to edit the categories for this blog.<br />Ask for a promotion to your <a href='mailto:%s'>blog admin</a>. :)"), get_settings('admin_email')));
    142142    }
    143     ?>
     143$messages[1] = __('Category added.');
     144$messages[2] = __('Category deleted.');
     145$messages[3] = __('Category updated.');
     146?>
     147<?php if ($_GET['message']) : ?>
     148<div class="updated"><p><?php echo $messages[$_GET['message']]; ?></p></div>
     149<?php endif; ?>
    144150
    145151<div class="wrap">
     
    180186        <p><?php _e('Description: (optional)') ?> <br />
    181187        <textarea name="category_description" rows="5" cols="50" style="width: 97%;"></textarea></p>
    182         <p><input type="hidden" name="action" value="addcat" /><input type="submit" name="submit" value="<?php _e('Add') ?>" class="search" /></p>
     188        <p class="submit"><input type="hidden" name="action" value="addcat" /><input type="submit" name="submit" value="<?php _e('Add Category &raquo;') ?>" /></p>
    183189    </form>
    184190</div>
Note: See TracChangeset for help on using the changeset viewer.