cvs: pearweb /include pear-config.php /public_html login.php
| From: | Stig Bakken | Date: | Thu, 02 Aug 2001 07:10:11 +0000 |
| Subject: | cvs: pearweb /include pear-config.php /public_html login.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-402@lists.php.net to get a copy of this message | ||
ssb Thu Aug 2 03:10:11 2001 EDT
Modified files:
/pearweb/include pear-config.php
/pearweb/public_html login.php
Log:
* fixed "login" function (uses mysql first, then cvs passwd file, does not
yet check cvs acls though)
Index: pearweb/include/pear-config.php
diff -u pearweb/include/pear-config.php:1.1 pearweb/include/pear-config.php:1.2
--- pearweb/include/pear-config.php:1.1 Fri Apr 20 06:31:36 2001
+++ pearweb/include/pear-config.php Thu Aug 2 03:10:11 2001
@@ -1,7 +1,8 @@
<?php
-define('PEAR_AUTH_REALM', 'PEAR user');
+define('PEAR_AUTH_REALM', 'PEAR');
define('PEAR_UPLOAD_TMPDIR', '/var/tmp/pear/uploads');
+define('PEAR_CVS_TMPDIR', '/var/tmp/pear/cvs');
define('PEAR_TARBALL_DIR', '/var/lib/pear');
define('PEAR_DATABASE_DSN', 'mysql://pear:pear@localhost/pear');
Index: pearweb/public_html/login.php
diff -u pearweb/public_html/login.php:1.4 pearweb/public_html/login.php:1.5
--- pearweb/public_html/login.php:1.4 Wed Aug 1 10:34:26 2001
+++ pearweb/public_html/login.php Thu Aug 2 03:10:11 2001
@@ -1,15 +1,13 @@
-<?php response_header("Login"); ?>
-
-<H2>Login</H2>
-
-<P>This function has not been implemented yet.</P>
-
<?php
-/**
-auth_require();
-header("Location: ./");
-*/
+auth_require();
+$url = "http://$HTTP_HOST";
+if ($SERVER_PORT != 80) {
+ $url .= ":$SERVER_PORT";
+}
+$bn = str_replace('.', '\.', basename($PHP_SELF));
+$url .= preg_replace(":/$bn\$:", "/", $REQUEST_URI);
+header("Location: $url");
+exit;
-response_footer();
?>