Renamed template editor and fixed wordings.
git-svn-id: http://svn.automattic.com/wordpress/trunk@589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b64371a05d
commit
cbb0f32f0f
|
@ -4,7 +4,7 @@
|
||||||
5 linkmanager.php Links
|
5 linkmanager.php Links
|
||||||
3 users.php Users
|
3 users.php Users
|
||||||
4 wp-options.php Options
|
4 wp-options.php Options
|
||||||
4 b2template.php Template
|
4 templates.php Templates
|
||||||
***
|
***
|
||||||
(Everything after the '***' is a comment.)
|
(Everything after the '***' is a comment.)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
$title = "Template & file editing";
|
$title = "Template & file editing";
|
||||||
/* <Template> */
|
|
||||||
|
|
||||||
function add_magic_quotes($array) {
|
function add_magic_quotes($array) {
|
||||||
foreach ($array as $k => $v) {
|
foreach ($array as $k => $v) {
|
||||||
|
@ -46,14 +45,14 @@ case 'update':
|
||||||
die('<p>You have no right to edit the template for this blog.<br />Ask for a promotion to your <a href="mailto:$admin_email">blog admin</a>. :)</p>');
|
die('<p>You have no right to edit the template for this blog.<br />Ask for a promotion to your <a href="mailto:$admin_email">blog admin</a>. :)</p>');
|
||||||
}
|
}
|
||||||
|
|
||||||
$newcontent = stripslashes($HTTP_POST_VARS["newcontent"]);
|
$newcontent = stripslashes($HTTP_POST_VARS['newcontent']);
|
||||||
$file = $HTTP_POST_VARS["file"];
|
$file = $HTTP_POST_VARS['file'];
|
||||||
$f = fopen($file, 'w+');
|
$f = fopen($file, 'w+');
|
||||||
fwrite($f, $newcontent);
|
fwrite($f, $newcontent);
|
||||||
fclose($f);
|
fclose($f);
|
||||||
|
|
||||||
$file = str_replace('../', '', $file);
|
$file = str_replace('../', '', $file);
|
||||||
header("Location: b2template.php?file=$file&a=te");
|
header("Location: templates.php?file=$file&a=te");
|
||||||
exit();
|
exit();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -100,15 +99,15 @@ default:
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<?php
|
<?php
|
||||||
echo "Listing <strong>$file</strong> $warning";
|
echo "Editing <strong>$file</strong> $warning";
|
||||||
if ('te' == $a)
|
if ('te' == $a)
|
||||||
echo "<em>File edited successfully.</em>";
|
echo "<em>File edited successfully.</em>";
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
?>
|
?>
|
||||||
<form name="template" action="b2template.php" method="post">
|
<form name="template" action="templates.php" method="post">
|
||||||
<textarea cols="80" rows="20" style="width:100%; font-family: 'Courier New', Courier, monopace; font-size:small;" name="newcontent" tabindex="1"><?php echo $content ?></textarea>
|
<textarea cols="80" rows="20" style="width:100%; font-family: 'Courier New', Courier, monopace; font-size:small;" name="newcontent" tabindex="1"><?php echo $content ?></textarea>
|
||||||
<input type="hidden" name="action" value="update" />
|
<input type="hidden" name="action" value="update" />
|
||||||
<input type="hidden" name="file" value="<?php echo $file ?>" />
|
<input type="hidden" name="file" value="<?php echo $file ?>" />
|
||||||
|
@ -127,28 +126,18 @@ default:
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<p>You can also edit the <a href="b2template.php?file=b2comments.php">comments
|
<p>You can also edit the <a href="templates.php?file=b2comments.php">comments template</a> or the <a href="templates.php?file=b2commentspopup.php">popup comments template</a>, or edit any other file (provided it’s writable by the server, e.g. CHMOD 766).</p>
|
||||||
template</a> or the <a href="b2template.php?file=b2commentspopup.php">popup
|
|
||||||
comments template</a>, or edit any other file (provided it’s writable by
|
|
||||||
the server, e.g. CHMOD 766).</p>
|
|
||||||
<p>To edit a file, type its name here:</p>
|
<p>To edit a file, type its name here:</p>
|
||||||
<form name="file" action="b2template.php" method="get">
|
<form name="file" action="templates.php" method="get">
|
||||||
<input type="text" name="file" />
|
<input type="text" name="file" />
|
||||||
<input type="submit" name="submit" class="search" value="go" />
|
<input type="submit" name="submit" class="search" value="go" />
|
||||||
</form>
|
</form>
|
||||||
|
<p>Note: of course, you can also edit the files/templates in your text editor of choice and upload them. This online editor is only meant to be used when you don't have access to a text editor or FTP client.</p>
|
||||||
<p>Note: of course, you can also edit the files/templates in your text editor
|
|
||||||
and upload them. This online editor is only meant to be used when you don't
|
|
||||||
have access to a text editor.</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
<?php
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* </Template> */
|
|
||||||
include("b2footer.php") ?>
|
include("b2footer.php") ?>
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
$title = 'Team management';
|
$title = 'Users';
|
||||||
/* <Team> */
|
/* <Team> */
|
||||||
|
|
||||||
$b2varstoreset = array('action','standalone','redirect','profile');
|
$b2varstoreset = array('action','standalone','redirect','profile');
|
||||||
|
@ -84,7 +84,7 @@ default:
|
||||||
?>
|
?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<h2>Authors</h2>
|
<h2>Authors</h2>
|
||||||
<table cellpadding="5" cellspacing="0">
|
<table cellpadding="5" cellspacing="0" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Nickname</th>
|
<th>Nickname</th>
|
||||||
|
|
Loading…
Reference in New Issue