Pass theme in URI when sending update header. Bug 491.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren 2004-11-25 16:15:27 +00:00
parent 6af4d57f8d
commit aa2dd4d548
1 changed files with 3 additions and 2 deletions

View File

@ -44,13 +44,14 @@ case 'update':
} }
$newcontent = stripslashes($_POST['newcontent']); $newcontent = stripslashes($_POST['newcontent']);
$theme = urlencode($theme);
if (is_writeable($real_file)) { if (is_writeable($real_file)) {
$f = fopen($real_file, 'w+'); $f = fopen($real_file, 'w+');
fwrite($f, $newcontent); fwrite($f, $newcontent);
fclose($f); fclose($f);
header("Location: theme-editor.php?file=$file&a=te"); header("Location: theme-editor.php?file=$file&theme=$theme&a=te");
} else { } else {
header("Location: theme-editor.php?file=$file"); header("Location: theme-editor.php?file=$file&theme=$theme");
} }
exit(); exit();