Changeset 1818 for trunk/wp-admin/post.php
- Timestamp:
- 10/19/2004 03:03:06 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/post.php
r1813 r1818 1 1 <?php 2 require_once('../wp-includes/wp-l10n.php'); 3 4 function add_magic_quotes($array) { 5 foreach ($array as $k => $v) { 6 if (is_array($v)) { 7 $array[$k] = add_magic_quotes($v); 8 } else { 9 $array[$k] = addslashes($v); 10 } 11 } 12 return $array; 13 } 14 15 if (!get_magic_quotes_gpc()) { 16 $_GET = add_magic_quotes($_GET); 17 $_POST = add_magic_quotes($_POST); 18 $_COOKIE = add_magic_quotes($_COOKIE); 19 } 2 require_once('admin.php'); 20 3 21 4 $wpvarstoreset = array('action', 'safe_mode', 'withcomments', 'posts', 'poststart', 'postend', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder', 'enclosure_url' ); … … 38 21 switch($action) { 39 22 case 'post': 40 $standalone = 1;41 23 require_once('admin-header.php'); 42 24 … … 184 166 $title = __('Edit'); 185 167 186 $standalone = 0;187 168 require_once('admin-header.php'); 188 169 … … 237 218 case 'editpost': 238 219 // die(var_dump('<pre>', $_POST)); 239 $standalone = 1;240 require_once('./admin-header.php');241 242 220 if (!isset($blog_ID)) { 243 221 $blog_ID = 1; … … 399 377 400 378 case 'delete': 401 402 $standalone = 1;403 require_once('./admin-header.php');404 405 379 check_admin_referer(); 406 380 … … 429 403 case 'editcomment': 430 404 $title = __('Edit Comment'); 431 $standalone = 0;432 405 $parent_file = 'edit.php'; 433 406 require_once ('admin-header.php'); … … 452 425 case 'confirmdeletecomment': 453 426 454 $standalone = 0;455 427 require_once('./admin-header.php'); 456 428 … … 488 460 case 'deletecomment': 489 461 490 $standalone = 1;491 require_once('./admin-header.php');492 493 462 check_admin_referer(); 494 463 … … 521 490 case 'unapprovecomment': 522 491 523 $standalone = 1;524 492 require_once('./admin-header.php'); 525 493 … … 552 520 case 'mailapprovecomment': 553 521 554 $standalone = 1;555 require_once('./admin-header.php');556 557 522 $comment = (int) $_GET['comment']; 558 523 … … 574 539 575 540 case 'approvecomment': 576 577 $standalone = 1;578 require_once('./admin-header.php');579 541 580 542 $comment = $_GET['comment']; … … 606 568 607 569 case 'editedcomment': 608 609 $standalone = 1;610 require_once('./admin-header.php');611 570 612 571 $comment_ID = $_POST['comment_ID']; … … 654 613 655 614 default: 656 $standalone = 0;657 615 $title = __('Create New Post'); 658 616 require_once ('./admin-header.php');
Note: See TracChangeset
for help on using the changeset viewer.