Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1:/tmp/cvs-serv28560
Modified Files:
serendipity_admin_installer.inc.php
Log Message:
Fixed problem with echo'ing of .htaccess, changed the layout a little, fixed echo of wrong paths
Index: serendipity_admin_installer.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin_installer.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- serendipity_admin_installer.inc.php 5 Apr 2003 00:17:57 -0000 1.9
+++ serendipity_admin_installer.inc.php 29 Apr 2003 19:38:04 -0000 1.10
@@ -84,30 +84,29 @@
echo "<input type='hidden' name='installAction' value='check'>";
echo "<br>";
foreach ($t as $key => $value) {
- echo "<b>$key:</b><br>";
- echo "<table>";
+ echo "<table>";
+ echo "<tr><td colspan='3'><b>$key:</b></td</tr>";
for ($x=0; $x<count($value); $x++) {
- if (@is_array($from)) $value[$x]["default"] = $from[$value[$x]["name"]];
+ if (@is_array($from)) $value[$x]["default"] = $from[$value[$x]["name"]];
echo "<tr>";
- echo "<td valign='top'>".$value[$x]["name"].":</td>";
- echo "<td valign='top'>";
- if ($value[$x]["type"] == "bool") {
+ echo "<td valign='top' width='250'>".$value[$x]["name"]." <font size='1'>(". $value[$x]["type"] .")</font></font></td>";
+ echo "<td valign='top'><font size='2'>";
+ if ($value[$x]["type"] == "bool") {
echo "<input type='radio' name='".$value[$x]["name"]."' value='true' ";
echo (($value[$x]["default"]==true) ? "CHECKED" : "")."> Yes<br>";
- echo "<input type='radio' name='".$value[$x]["name"]."' value='false' ";
+ echo "<input type='radio' name='".$value[$x]["name"]."' value='false' ";
echo (($value[$x]["default"]==true) ? "" : "CHECKED")."> No<br>";
- }
- else {
- echo "<input type='text' name='".$value[$x]["name"]."' value=\"";
+ } else {
+ echo "<input type='text' size='30' name='".$value[$x]["name"]."' value=\"";
echo htmlentities($value[$x]["default"])."\">";
- }
- echo "</td>";
- echo "<td valign='top'><font color='#bbbbbb'>// ".$value[$x]["desc"];
- echo " (".$value[$x]["type"].")</font></td>";
- echo "</tr>";
- }
- echo "</table>";
- echo "<p>";
+ }
+ echo "</font></td>";
+ echo "<td valign='middle'><font color='#AAAAAA'><i>".$value[$x]["desc"]."</i></font></td>";
+ echo "</tr>";
+
+ }
+ echo "</table>";
+ echo "<p>";
}
echo "<input type='submit' value='Check & save'>";
echo "</form>";
@@ -165,16 +164,16 @@
// Attempt to create the archives directory
if (!is_dir($_POST["serendipityPath"]."archives") &&
@mkdir($_POST["serendipityPath"]."archives", 0770) !== true) {
- $errs[] = "Couldn't create the archives directory, you do it.";
- $errs[] = " -> Run <i>mkdir ".$_POST["serendipityPath"]."</i>";
+ $errs[] = "Couldn't create the archives directory, you do it:";
+ $errs[] = " -> Run <i>mkdir ".$_POST["serendipityPath"]."archives</i>";
$errs[] = " -> and <i>chmod g+rwx ".$_POST["serendipityPath"]."archives</i>";
}
// Attempt to create the plugins dir
if (!is_dir($_POST['serendipityPath'] . "plugins") &&
@mkdir($_POST['serendipityPath'] . "plugins", 0770) !== true) {
- $errs[] = "Couldn't create the plugins directory, you do it.";
- $errs[] = " -> Run <i>mkdir ".$_POST["serendipityPath"]."</i>";
+ $errs[] = "Couldn't create the plugins directory, you do it:";
+ $errs[] = " -> Run <i>mkdir ".$_POST["serendipityPath"]."plugins</i>";
$errs[] = " -> and <i>chmod g+rwx ".$_POST["serendipityPath"]."plugins</i>";
}
@@ -226,15 +225,20 @@
$query = "INSERT into $_POST[dbPrefix]css (name, data) values ('default', '$text')";
$res = serendipity_db_query($query);
if (is_string($res)) {
- echo $res;
+ echo $res;
+ } else {
+ echo " Done";
}
+ echo "<br>";
}
// Create .htaccess
$a = file("./htaccess.tpl");
$fp = @fopen("./.htaccess", "w");
- if (!is_resource($fp)) {
- echo "<font color='#ff0000'>Error: Could not create .htaccess file, create it yourself:<pre>\n";
- echo implode("\n", $a);
+ if (!$fp) {
+ echo "<font color='#ff0000'>Error: Could not create <b>.htaccess</b> file, create it yourself\n";
+ echo "<br>* Just copy the code below and place it in .htaccess in your serendipity folder:<b><pre>\n";
+ echo str_replace("{PREFIX}", $_POST["serendipityHTTPPath"], implode("", $a));
+ echo "</pre></b></font>";
}
else {
for($x = 0; $x < count($a); $x++) {
@@ -289,7 +293,8 @@
serendipity_plugin_api::register_default_plugins();
echo "<p>Welcome to serendipity!</b><p>";
- echo "Write down your password: ".$_POST["pass"]." and <a href='".$_POST["serendipityHTTPPath"]."'>check out your blog</a>";
+ echo "Write down your password: ".$_POST["pass"];
+ echo "<br>Your blog is now ready... <a href='".$_POST["serendipityHTTPPath"]."'>Check it out</a>";
session_destroy();
} else {
echo "Configuration variables saved";
|