Remove unneeded quotes around vars. Props johnbillion. fixes #10245

git-svn-id: http://svn.automattic.com/wordpress/trunk@12513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-12-23 15:16:53 +00:00
parent ca9d676eef
commit 354607036c
12 changed files with 34 additions and 34 deletions

View File

@ -29,11 +29,11 @@ wp_enqueue_script('utils');
$hook_suffix = '';
if ( isset($page_hook) )
$hook_suffix = "$page_hook";
$hook_suffix = $page_hook;
else if ( isset($plugin_page) )
$hook_suffix = "$plugin_page";
$hook_suffix = $plugin_page;
else if ( isset($pagenow) )
$hook_suffix = "$pagenow";
$hook_suffix = $pagenow;
$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
?>

View File

@ -407,7 +407,7 @@ class Dotclear_Import {
// WordPressify Data
$comment_ID = (int) ltrim($comment_id, '0');
$comment_post_ID = (int) $postarr[$post_id];
$comment_approved = "$comment_pub";
$comment_approved = $comment_pub;
$name = $wpdb->escape(csc ($comment_auteur));
$email = $wpdb->escape($comment_email);
$web = "http://".$wpdb->escape($comment_site);

View File

@ -86,14 +86,14 @@ class GM_Import {
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($_POST["$wpvar"])) {
if (empty($_GET["$wpvar"])) {
if (empty($_POST[$wpvar])) {
if (empty($_GET[$wpvar])) {
$$wpvar = '';
} else {
$$wpvar = $_GET["$wpvar"];
$$wpvar = $_GET[$wpvar];
}
} else {
$$wpvar = $_POST["$wpvar"];
$$wpvar = $_POST[$wpvar];
}
}
}
@ -139,7 +139,7 @@ class GM_Import {
continue;
}
$user_info = array("user_login"=>"$user_login", "user_pass"=>"$pass1", "user_nickname"=>"$user_nickname", "user_email"=>"$user_email", "user_url"=>"$user_url", "user_ip"=>"$user_ip", "user_domain"=>"$user_domain", "user_browser"=>"$user_browser", "dateYMDhour"=>"$user_joindate", "user_level"=>"1", "user_idmode"=>"nickname");
$user_info = array("user_login"=>$user_login, "user_pass"=>$pass1, "user_nickname"=>$user_nickname, "user_email"=>$user_email, "user_url"=>$user_url, "user_ip"=>$user_ip, "user_domain"=>$user_domain, "user_browser"=>$user_browser, "dateYMDhour"=>$user_joindate, "user_level"=>"1", "user_idmode"=>"nickname");
$user_id = wp_insert_user($user_info);
$this->gmnames[$userdata[0]] = $user_id;
@ -171,7 +171,7 @@ class GM_Import {
$entryfile .= "0";
}}}}}}}
$entryfile .= "$i";
$entryfile .= $i;
if (is_file($entryfile.".cgi")) {

View File

@ -155,7 +155,7 @@ class MT_Import {
for ($x = 1; $x < $y; $x ++) {
$next = array_shift($temp);
if (!(in_array($next, $authors)))
array_push($authors, "$next");
array_push($authors, $next);
}
$this->fclose($handle);
@ -171,12 +171,12 @@ class MT_Import {
$newname = trim(stripslashes($line));
if ($newname == '')
$newname = 'left_blank'; //passing author names from step 1 to step 2 is accomplished by using POST. left_blank denotes an empty entry in the form.
array_push($formnames, "$newname");
array_push($formnames, $newname);
} // $formnames is the array with the form entered names
foreach ($_POST['userselect'] as $user => $key) {
$selected = trim(stripslashes($key));
array_push($selectnames, "$selected");
array_push($selectnames, $selected);
}
$count = count($formnames);

View File

@ -163,7 +163,7 @@ class WP_Import {
for ($x = 1; $x < $y; $x ++) {
$next = array_shift($temp);
if (!(in_array($next, $authors)))
array_push($authors, "$next");
array_push($authors, $next);
}
return $authors;

View File

@ -239,13 +239,13 @@ function wp_reset_vars( $vars ) {
global $$var;
if (!isset( $$var ) ) {
if ( empty( $_POST["$var"] ) ) {
if ( empty( $_GET["$var"] ) )
if ( empty( $_POST[$var] ) ) {
if ( empty( $_GET[$var] ) )
$$var = '';
else
$$var = $_GET["$var"];
$$var = $_GET[$var];
} else {
$$var = $_POST["$var"];
$$var = $_POST[$var];
}
}
}

View File

@ -1406,12 +1406,12 @@ function wp_tiny_mce( $teeny = false, $settings = false ) {
'width' => '100%',
'theme' => 'advanced',
'skin' => 'wp_theme',
'theme_advanced_buttons1' => "$mce_buttons",
'theme_advanced_buttons2' => "$mce_buttons_2",
'theme_advanced_buttons3' => "$mce_buttons_3",
'theme_advanced_buttons4' => "$mce_buttons_4",
'language' => "$mce_locale",
'spellchecker_languages' => "$mce_spellchecker_languages",
'theme_advanced_buttons1' => $mce_buttons,
'theme_advanced_buttons2' => $mce_buttons_2,
'theme_advanced_buttons3' => $mce_buttons_3,
'theme_advanced_buttons4' => $mce_buttons_4,
'language' => $mce_locale,
'spellchecker_languages' => $mce_spellchecker_languages,
'theme_advanced_toolbar_location' => 'top',
'theme_advanced_toolbar_align' => 'left',
'theme_advanced_statusbar_location' => 'bottom',
@ -1432,13 +1432,13 @@ function wp_tiny_mce( $teeny = false, $settings = false ) {
'paste_remove_spans' => true,
'paste_strip_class_attributes' => 'all',
'wpeditimage_disable_captions' => $no_captions,
'plugins' => "$plugins"
'plugins' => $plugins
);
$mce_css = trim(apply_filters('mce_css', ''), ' ,');
if ( ! empty($mce_css) )
$initArray['content_css'] = "$mce_css";
$initArray['content_css'] = $mce_css;
if ( is_array($settings) )
$initArray = array_merge($initArray, $settings);

View File

@ -1519,7 +1519,7 @@ function make_site_theme_from_default($theme_name, $template) {
// Copy files from the default theme to the site theme.
//$files = array('index.php', 'comments.php', 'comments-popup.php', 'footer.php', 'header.php', 'sidebar.php', 'style.css');
$theme_dir = @ opendir("$default_dir");
$theme_dir = @ opendir($default_dir);
if ($theme_dir) {
while(($theme_file = readdir( $theme_dir )) !== false) {
if (is_dir("$default_dir/$theme_file"))

View File

@ -155,7 +155,7 @@ if ($allowed_files) :
foreach ( $themes[$theme]['Template Files'] as $template_file ) {
$description = trim( get_file_description($template_file) );
$template_show = basename($template_file);
$filedesc = ( $description != $template_file ) ? "$description <span class='nonessential'>($template_show)</span>" : "$description";
$filedesc = ( $description != $template_file ) ? "$description <span class='nonessential'>($template_show)</span>" : $description;
$filedesc = ( $template_file == $file ) ? "<span class='highlight'>$description <span class='nonessential'>($template_show)</span></span>" : $filedesc;
// If we have two files of the same name prefer the one in the Template Directory

View File

@ -467,15 +467,15 @@ function wp_title($sep = '&raquo;', $display = true, $seplocation = '') {
$my_year = substr($m, 0, 4);
$my_month = $wp_locale->get_month(substr($m, 4, 2));
$my_day = intval(substr($m, 6, 2));
$title = "$my_year" . ($my_month ? "$t_sep$my_month" : "") . ($my_day ? "$t_sep$my_day" : "");
$title = $my_year . ($my_month ? $t_sep . $my_month : "") . ($my_day ? $t_sep . $my_day : "");
}
if ( !empty($year) ) {
$title = $year;
if ( !empty($monthnum) )
$title .= "$t_sep" . $wp_locale->get_month($monthnum);
$title .= $t_sep . $wp_locale->get_month($monthnum);
if ( !empty($day) )
$title .= "$t_sep" . zeroise($day, 2);
$title .= $t_sep . zeroise($day, 2);
}
// If there is a post
@ -491,7 +491,7 @@ function wp_title($sep = '&raquo;', $display = true, $seplocation = '') {
$tax = $tax->label;
$term = $wp_query->get_queried_object();
$term = $term->name;
$title = "$tax$t_sep$term";
$title = $tax . $t_sep . $term;
}
//If it's a search

View File

@ -225,7 +225,7 @@ function _get_page_link( $id = false, $leavename = false, $sample = false ) {
if ( '' != $pagestruct && ( ( isset($post->post_status) && 'draft' != $post->post_status && 'pending' != $post->post_status ) || $sample ) ) {
$link = get_page_uri($id);
$link = ( $leavename ) ? $pagestruct : str_replace('%pagename%', $link, $pagestruct);
$link = trailingslashit(get_option('home')) . "$link";
$link = trailingslashit(get_option('home')) . $link;
$link = user_trailingslashit($link, 'page');
} else {
$link = trailingslashit(get_option('home')) . "?page_id=$id";

View File

@ -574,7 +574,7 @@ function wp_link_pages($args = '') {
if ( 'number' == $next_or_number ) {
$output .= $before;
for ( $i = 1; $i < ($numpages+1); $i = $i + 1 ) {
$j = str_replace('%',"$i",$pagelink);
$j = str_replace('%',$i,$pagelink);
$output .= ' ';
if ( ($i != $page) || ((!$more) && ($page==1)) ) {
if ( 1 == $i ) {