Changeset 3946
- Timestamp:
- 07/03/2006 07:03:37 PM (18 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r3907 r3946 1954 1954 } 1955 1955 1956 function wp_reset_vars($vars) { 1957 for ($i=0; $i<count($vars); $i += 1) { 1958 $var = $vars[$i]; 1959 global $$var; 1960 1961 if (!isset($$var)) { 1962 if (empty($_REQUEST["$var"])) { 1963 $$var = ''; 1964 } else { 1965 $$var = $_REQUEST["$var"]; 1966 unset($_REQUEST["$wpvar"]); 1967 } 1968 } 1969 } 1970 } 1971 1956 1972 ?> -
trunk/wp-admin/admin.php
r3862 r3946 25 25 $time_format = get_settings('time_format'); 26 26 27 $wpvarstoreset = array('profile','redirect','redirect_url','a','popuptitle','popupurl','text', 'trackback', 'pingback'); 28 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 29 $wpvar = $wpvarstoreset[$i]; 30 if (!isset($$wpvar)) { 31 if (empty($_POST["$wpvar"])) { 32 if (empty($_GET["$wpvar"])) { 33 $$wpvar = ''; 34 } else { 35 $$wpvar = $_GET["$wpvar"]; 36 } 37 } else { 38 $$wpvar = $_POST["$wpvar"]; 39 } 40 } 41 } 27 wp_reset_vars(array('profile', 'redirect', 'redirect_url', 'a', 'popuptitle', 'popupurl', 'text', 'trackback', 'pingback')); 42 28 43 29 wp_enqueue_script( 'fat' ); -
trunk/wp-admin/categories.php
r3928 r3946 5 5 $parent_file = 'edit.php'; 6 6 7 $wpvarstoreset = array('action','cat'); 8 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 9 $wpvar = $wpvarstoreset[$i]; 10 if (!isset($$wpvar)) { 11 if (empty($_POST["$wpvar"])) { 12 if (empty($_GET["$wpvar"])) { 13 $$wpvar = ''; 14 } else { 15 $$wpvar = $_GET["$wpvar"]; 16 } 17 } else { 18 $$wpvar = $_POST["$wpvar"]; 19 } 20 } 21 } 7 wp_reset_vars(array('action', 'cat')); 22 8 23 9 switch($action) { -
trunk/wp-admin/inline-uploading.php
r3928 r3946 8 8 die(__('You do not have permission to upload files.')); 9 9 10 $wpvarstoreset = array('action', 'post', 'all', 'last', 'link', 'sort', 'start', 'imgtitle', 'descr', 'attachment'); 11 12 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 13 $wpvar = $wpvarstoreset[$i]; 14 if (!isset($$wpvar)) { 15 if (empty($_POST["$wpvar"])) { 16 if (empty($_GET["$wpvar"])) { 17 $$wpvar = ''; 18 } else { 19 $$wpvar = $_GET["$wpvar"]; 20 } 21 } else { 22 $$wpvar = $_POST["$wpvar"]; 23 } 24 } 25 } 10 wp_reset_vars(array('action', 'post', 'all', 'last', 'link', 'sort', 'start', 'imgtitle', 'descr', 'attachment')); 26 11 27 12 $post = (int) $post; -
trunk/wp-admin/link-add.php
r3830 r3946 7 7 8 8 9 $wpvarstoreset =array('action', 'cat_id', 'linkurl', 'name', 'image',9 wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 10 10 'description', 'visible', 'target', 'category', 'link_id', 11 11 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 12 'notes', 'linkcheck[]'); 13 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 14 $wpvar = $wpvarstoreset[$i]; 15 if (!isset($$wpvar)) { 16 if (empty($_POST["$wpvar"])) { 17 if (empty($_GET["$wpvar"])) { 18 $$wpvar = ''; 19 } else { 20 $$wpvar = $_GET["$wpvar"]; 21 } 22 } else { 23 $$wpvar = $_POST["$wpvar"]; 24 } 25 } 26 } 12 'notes', 'linkcheck[]')); 27 13 28 14 wp_enqueue_script( array('xfn', 'dbx-admin-key?pagenow=link.php') ); -
trunk/wp-admin/link-manager.php
r3907 r3946 11 11 wp_enqueue_script( 'listman' ); 12 12 13 $wpvarstoreset = array ('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'); 14 15 for ($i = 0; $i < count($wpvarstoreset); $i += 1) { 16 $wpvar = $wpvarstoreset[$i]; 17 if (!isset ($$wpvar)) { 18 if (empty ($_POST["$wpvar"])) { 19 if (empty ($_GET["$wpvar"])) { 20 $$wpvar = ''; 21 } else { 22 $$wpvar = $_GET["$wpvar"]; 23 } 24 } else { 25 $$wpvar = $_POST["$wpvar"]; 26 } 27 } 28 } 13 wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]')); 29 14 30 15 if (empty ($cat_id)) -
trunk/wp-admin/link.php
r3928 r3946 2 2 require_once ('admin.php'); 3 3 4 $wpvarstoreset = array ('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'); 5 6 for ($i = 0; $i < count($wpvarstoreset); $i += 1) { 7 $wpvar = $wpvarstoreset[$i]; 8 if (!isset ($$wpvar)) { 9 if (empty ($_POST["$wpvar"])) { 10 if (empty ($_GET["$wpvar"])) { 11 $$wpvar = ''; 12 } else { 13 $$wpvar = $_GET["$wpvar"]; 14 } 15 } else { 16 $$wpvar = $_POST["$wpvar"]; 17 } 18 } 19 } 4 wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]')); 20 5 21 6 if ('' != $_POST['deletebookmarks']) -
trunk/wp-admin/moderation.php
r3928 r3946 6 6 wp_enqueue_script( 'admin-comments' ); 7 7 8 $wpvarstoreset = array('action', 'item_ignored', 'item_deleted', 'item_approved', 'item_spam', 'feelinglucky'); 9 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 10 $wpvar = $wpvarstoreset[$i]; 11 if (!isset($$wpvar)) { 12 if (empty($_POST["$wpvar"])) { 13 if (empty($_GET["$wpvar"])) { 14 $$wpvar = ''; 15 } else { 16 $$wpvar = $_GET["$wpvar"]; 17 } 18 } else { 19 $$wpvar = $_POST["$wpvar"]; 20 } 21 } 22 } 8 wp_reset_vars(array('action', 'item_ignored', 'item_deleted', 'item_approved', 'item_spam', 'feelinglucky')); 23 9 24 10 $comment = array(); -
trunk/wp-admin/options-head.php
r2762 r3946 1 <?php 2 3 $wpvarstoreset = array('action','standalone', 'option_group_id'); 4 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 5 $wpvar = $wpvarstoreset[$i]; 6 if (!isset($$wpvar)) { 7 if (empty($_POST["$wpvar"])) { 8 if (empty($_GET["$wpvar"])) { 9 $$wpvar = ''; 10 } else { 11 $$wpvar = $_GET["$wpvar"]; 12 } 13 } else { 14 $$wpvar = $_POST["$wpvar"]; 15 } 16 } 17 } 18 ?> 1 <?php wp_reset_vars(array('action', 'standalone', 'option_group_id')); ?> 19 2 20 3 <br clear="all" /> -
trunk/wp-admin/options.php
r3908 r3946 6 6 $parent_file = 'options-general.php'; 7 7 8 $wpvarstoreset = array('action'); 9 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 10 $wpvar = $wpvarstoreset[$i]; 11 if (!isset($$wpvar)) { 12 if (empty($_POST["$wpvar"])) { 13 if (empty($_GET["$wpvar"])) { 14 $$wpvar = ''; 15 } else { 16 $$wpvar = $_GET["$wpvar"]; 17 } 18 } else { 19 $$wpvar = $_POST["$wpvar"]; 20 } 21 } 22 } 8 wp_reset_vars(array('action')); 23 9 24 10 if ( !current_user_can('manage_options') ) -
trunk/wp-admin/page.php
r3928 r3946 4 4 $parent_file = 'edit.php'; 5 5 $submenu_file = 'edit-pages.php'; 6 $wpvarstoreset = array('action');7 6 8 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 9 $wpvar = $wpvarstoreset[$i]; 10 if (!isset($$wpvar)) { 11 if (empty($_POST["$wpvar"])) { 12 if (empty($_GET["$wpvar"])) { 13 $$wpvar = ''; 14 } else { 15 $$wpvar = $_GET["$wpvar"]; 16 } 17 } else { 18 $$wpvar = $_POST["$wpvar"]; 19 } 20 } 21 } 7 wp_reset_vars(array('action')); 22 8 23 9 if (isset($_POST['deletepost'])) { -
trunk/wp-admin/plugin-editor.php
r3928 r3946 5 5 $parent_file = 'plugins.php'; 6 6 7 $wpvarstoreset = array('action','redirect','profile','error','warning','a','file'); 8 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 9 $wpvar = $wpvarstoreset[$i]; 10 if (!isset($$wpvar)) { 11 if (empty($_POST["$wpvar"])) { 12 if (empty($_GET["$wpvar"])) { 13 $$wpvar = ''; 14 } else { 15 $$wpvar = $_GET["$wpvar"]; 16 } 17 } else { 18 $$wpvar = $_POST["$wpvar"]; 19 } 20 } 21 } 7 wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file')); 22 8 23 9 $plugins = get_plugins(); -
trunk/wp-admin/post.php
r3928 r3946 4 4 $parent_file = 'edit.php'; 5 5 $submenu_file = 'edit.php'; 6 $wpvarstoreset = array('action', 'safe_mode', 'withcomments', 'posts', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder' );7 6 8 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 9 $wpvar = $wpvarstoreset[$i]; 10 if (!isset($$wpvar)) { 11 if (empty($_POST["$wpvar"])) { 12 if (empty($_GET["$wpvar"])) { 13 $$wpvar = ''; 14 } else { 15 $$wpvar = $_GET["$wpvar"]; 16 } 17 } else { 18 $$wpvar = $_POST["$wpvar"]; 19 } 20 } 21 } 7 wp_reset_vars(array('action', 'safe_mode', 'withcomments', 'posts', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder')); 22 8 23 9 if ( isset( $_POST['deletepost'] ) ) -
trunk/wp-admin/templates.php
r3928 r3946 4 4 $parent_file = 'edit.php'; 5 5 6 $wpvarstoreset = array('action','redirect','profile','error','warning','a','file'); 7 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 8 $wpvar = $wpvarstoreset[$i]; 9 if (!isset($$wpvar)) { 10 if (empty($_POST["$wpvar"])) { 11 if (empty($_GET["$wpvar"])) { 12 $$wpvar = ''; 13 } else { 14 $$wpvar = $_GET["$wpvar"]; 15 } 16 } else { 17 $$wpvar = $_POST["$wpvar"]; 18 } 19 } 20 } 6 wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file')); 21 7 22 8 $recents = get_option('recently_edited'); -
trunk/wp-admin/theme-editor.php
r3928 r3946 5 5 $parent_file = 'themes.php'; 6 6 7 $wpvarstoreset = array('action','redirect','profile','error','warning','a','file', 'theme'); 8 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 9 $wpvar = $wpvarstoreset[$i]; 10 if (!isset($$wpvar)) { 11 if (empty($_POST["$wpvar"])) { 12 if (empty($_GET["$wpvar"])) { 13 $$wpvar = ''; 14 } else { 15 $$wpvar = $_GET["$wpvar"]; 16 } 17 } else { 18 $$wpvar = $_POST["$wpvar"]; 19 } 20 } 21 } 7 wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file', 'theme')); 22 8 23 9 $themes = get_themes(); -
trunk/wp-admin/user-edit.php
r3928 r3946 9 9 $submenu_file = 'users.php'; 10 10 11 $wpvarstoreset = array('action', 'redirect', 'profile', 'user_id', 'wp_http_referer'); 12 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 13 $wpvar = $wpvarstoreset[$i]; 14 if (!isset($$wpvar)) { 15 if (empty($_POST["$wpvar"])) { 16 if (empty($_GET["$wpvar"])) { 17 $$wpvar = ''; 18 } else { 19 $$wpvar = $_GET["$wpvar"]; 20 } 21 } else { 22 $$wpvar = $_POST["$wpvar"]; 23 } 24 } 25 } 11 wp_reset_vars(array('action', 'redirect', 'profile', 'user_id', 'wp_http_referer')); 26 12 27 13 $wp_http_referer = remove_query_arg(array('update', 'delete_count'), stripslashes($wp_http_referer));
Note: See TracChangeset
for help on using the changeset viewer.