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:
parent
6af4d57f8d
commit
aa2dd4d548
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue