| Status: | SUCCESS!";
@@ -202,7 +199,7 @@ if (isset($_POST['start'])) {
$openid = $message->getArrayFormat();
- $email = (isset($openid['openid.ext1.value.email'])) ? $openid['openid.ext1.value.email'] : null;
+ $email = (isset($openid['openid.ext1.value.email'])) ? $openid['openid.ext1.value.email'] : null;
$email = (isset($openid['openid.ext2.value.email']) && !isset($email)) ? $openid['openid.ext2.value.email'] : $email;
$email = (isset($openid['openid.sreg.email']) && !isset($email)) ? $openid['openid.sreg.email'] : $email;
$email = (isset($openid['openid.ax.value.email']) && !isset($email)) ? $openid['openid.ax.value.email'] : $email;
diff --git a/www/delete.php b/www/delete.php
index f332028..85f6258 100644
--- a/www/delete.php
+++ b/www/delete.php
@@ -5,7 +5,7 @@ namespace phorkie;
*/
require_once 'www-header.php';
if ($GLOBALS['phorkie']['auth']['secure'] > 0) {
- require_once 'secure.php';
+ include_once 'secure.php';
}
$repo = new Repository();
diff --git a/www/display.php b/www/display.php
index 2376d30..6f754d9 100644
--- a/www/display.php
+++ b/www/display.php
@@ -5,7 +5,7 @@ namespace phorkie;
*/
require_once 'www-header.php';
if ($GLOBALS['phorkie']['auth']['secure'] == 2) {
- require_once 'secure.php';
+ include_once 'secure.php';
}
$repo = new Repository();
diff --git a/www/edit.php b/www/edit.php
index db4428b..20e7793 100644
--- a/www/edit.php
+++ b/www/edit.php
@@ -5,7 +5,7 @@ namespace phorkie;
*/
require_once 'www-header.php';
if ($GLOBALS['phorkie']['auth']['secure'] > 0) {
- require_once 'secure.php';
+ include_once 'secure.php';
}
$repo = new Repository();
diff --git a/www/forbidden.php b/www/forbidden.php
index 1f587a2..3646b0a 100644
--- a/www/forbidden.php
+++ b/www/forbidden.php
@@ -1,6 +1,6 @@
0) {
- require_once 'secure.php';
+ include_once 'secure.php';
}
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
@@ -33,4 +33,4 @@ foreach (\glob($new->gitDir . '/hooks/*') as $hookfile) {
//FIXME: where to put fork source link?
redirect($new->getLink('display'));
-?>
\ No newline at end of file
+?>
diff --git a/www/list.php b/www/list.php
index 17f46b1..5a394eb 100644
--- a/www/list.php
+++ b/www/list.php
@@ -5,7 +5,7 @@
namespace phorkie;
require_once 'www-header.php';
if ($GLOBALS['phorkie']['auth']['secure'] == 2) {
- require_once 'secure.php';
+ include_once 'secure.php';
}
$rs = new Repositories();
diff --git a/www/new.php b/www/new.php
index 8d1a231..0675b4d 100644
--- a/www/new.php
+++ b/www/new.php
@@ -12,7 +12,7 @@ namespace phorkie;
*/
require_once 'www-header.php';
if ($GLOBALS['phorkie']['auth']['secure'] > 0) {
- require_once 'secure.php';
+ include_once 'secure.php';
}
$repopo = new Repository_Post();
diff --git a/www/raw.php b/www/raw.php
index 67a21ee..6b20633 100644
--- a/www/raw.php
+++ b/www/raw.php
@@ -5,7 +5,7 @@
namespace phorkie;
require_once 'www-header.php';
if ($GLOBALS['phorkie']['auth']['secure'] == 2) {
- require_once 'secure.php';
+ include_once 'secure.php';
}
$repo = new Repository();
$repo->loadFromRequest();
diff --git a/www/user.php b/www/user.php
index 1cc8aeb..fd851c4 100644
--- a/www/user.php
+++ b/www/user.php
@@ -5,7 +5,7 @@
namespace phorkie;
require_once 'www-header.php';
if (!isset($_SESSION['identity'])) {
- require_once 'secure.php';
+ include_once 'secure.php';
}
if (isset($_POST['name'])) {
diff --git a/www/www-header.php b/www/www-header.php
index 5785a3e..64dca11 100644
--- a/www/www-header.php
+++ b/www/www-header.php
@@ -50,8 +50,12 @@ if ($GLOBALS['phorkie']['cfg']['setupcheck']) {
// Set/Get git commit session variables
$_SESSION['ipaddr'] = $_SERVER['REMOTE_ADDR'];
-if (!isset($_SESSION['name'])) { $_SESSION['name'] = $GLOBALS['phorkie']['auth']['anonymousName']; }
-if (!isset($_SESSION['email'])) { $_SESSION['email'] = $GLOBALS['phorkie']['auth']['anonymousEmail']; }
+if (!isset($_SESSION['name'])) {
+ $_SESSION['name'] = $GLOBALS['phorkie']['auth']['anonymousName'];
+}
+if (!isset($_SESSION['email'])) {
+ $_SESSION['email'] = $GLOBALS['phorkie']['auth']['anonymousEmail'];
+}
\Twig_Autoloader::register();
--
cgit v1.2.3
From f5bdbfca6e34e35231ab7ae72241c152b047f86b Mon Sep 17 00:00:00 2001
From: "Justin J. Novack"
Date: Mon, 17 Sep 2012 15:50:56 -0400
Subject: FIX: Combine auth.php to login.php
---
README.rst | 3 -
data/templates/login.htm | 6 +-
src/openid/config.php | 2 +-
www/.htaccess | 1 -
www/auth.php | 216 ----------------------------------------------
www/login.php | 217 +++++++++++++++++++++++++++++++++++++++++++++--
6 files changed, 216 insertions(+), 229 deletions(-)
delete mode 100644 www/auth.php
(limited to 'src')
diff --git a/README.rst b/README.rst
index 0b40b39..b92804a 100644
--- a/README.rst
+++ b/README.rst
@@ -192,8 +192,6 @@ URLs
Shows form for new paste
``/login``
Login page for protecting site
-``/auth``
- Authentication callback url
``/user``
Edit logged-in user information
@@ -236,6 +234,5 @@ If you use nginx, place the following lines into your ``server`` block:
rewrite ^/search/([0-9]+)$ /search.php?page=$1;
rewrite ^/login$ /login.php;
- rewrite ^/auth$ /auth.php;
rewrite ^/user$ /user.php;
}
diff --git a/data/templates/login.htm b/data/templates/login.htm
index 7e724b0..418432e 100644
--- a/data/templates/login.htm
+++ b/data/templates/login.htm
@@ -5,7 +5,7 @@
- |