Skip to content

Commit f963a70

Browse files
author
Luke Shepard
committed
[ correct errors in removing trailing ?> ]
In the last commit, I over-aggressively removed closing PHP tags. While I dislike the practice of using close tags within templates, it is how this library works, so let's put them back. Checked that all PHP compiles with "php -l".
1 parent a2bdc5c commit f963a70

File tree

8 files changed

+84
-73
lines changed

8 files changed

+84
-73
lines changed

Tests/Auth/OpenID/OpenID_Yadis.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
require_once "Auth/OpenID/Discover.php";
1010

1111
global $__XRDS_BOILERPLATE;
12-
$__XRDS_BOILERPLATE = '<?xml version="1.0" encoding="UTF-8"
12+
$__XRDS_BOILERPLATE = '<?xml version="1.0" encoding="UTF-8"?>
1313
<xrds:XRDS xmlns:xrds="xri://$xrds"
1414
xmlns="xri://$xrd*($v*2.0)"
1515
xmlns:openid="http://openid.net/xmlns/1.0">

Tests/Auth/OpenID/RPVerify.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function test_badXML()
9090

9191
function test_noEntries()
9292
{
93-
$this->failUnlessXRDSHasReturnURLs('<?xml version="1.0" encoding="UTF-8"
93+
$this->failUnlessXRDSHasReturnURLs('<?xml version="1.0" encoding="UTF-8"?>
9494
<xrds:XRDS xmlns:xrds="xri://$xrds"
9595
xmlns="xri://$xrd*($v*2.0)"
9696
>
@@ -102,7 +102,7 @@ function test_noEntries()
102102

103103
function test_noReturnToEntries()
104104
{
105-
$this->failUnlessXRDSHasReturnURLs('<?xml version="1.0" encoding="UTF-8"
105+
$this->failUnlessXRDSHasReturnURLs('<?xml version="1.0" encoding="UTF-8"?>
106106
<xrds:XRDS xmlns:xrds="xri://$xrds"
107107
xmlns="xri://$xrd*($v*2.0)"
108108
>
@@ -118,7 +118,7 @@ function test_noReturnToEntries()
118118

119119
function test_oneEntry()
120120
{
121-
$this->failUnlessXRDSHasReturnURLs('<?xml version="1.0" encoding="UTF-8"
121+
$this->failUnlessXRDSHasReturnURLs('<?xml version="1.0" encoding="UTF-8"?>
122122
<xrds:XRDS xmlns:xrds="xri://$xrds"
123123
xmlns="xri://$xrd*($v*2.0)"
124124
>
@@ -134,7 +134,7 @@ function test_oneEntry()
134134

135135
function test_twoEntries()
136136
{
137-
$this->failUnlessXRDSHasReturnURLs('<?xml version="1.0" encoding="UTF-8"
137+
$this->failUnlessXRDSHasReturnURLs('<?xml version="1.0" encoding="UTF-8"?>
138138
<xrds:XRDS xmlns:xrds="xri://$xrds"
139139
xmlns="xri://$xrd*($v*2.0)"
140140
>
@@ -155,7 +155,7 @@ function test_twoEntries()
155155

156156
function test_twoEntries_withOther()
157157
{
158-
$this->failUnlessXRDSHasReturnURLs('<?xml version="1.0" encoding="UTF-8"
158+
$this->failUnlessXRDSHasReturnURLs('<?xml version="1.0" encoding="UTF-8"?>
159159
<xrds:XRDS xmlns:xrds="xri://$xrds"
160160
xmlns="xri://$xrd*($v*2.0)"
161161
>

examples/consumer/index.php

+14-4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
require_once "common.php";
33

44
global $pape_policy_uris;
5+
?>
56

67
<html>
78
<head><title>PHP OpenID Authentication Example</title></head>
@@ -48,9 +49,17 @@
4849
is your identity URL.
4950
</p>
5051

51-
<?php if (isset($msg)) { print "<div class=\"alert\">$msg</div>"; }
52-
<?php if (isset($error)) { print "<div class=\"error\">$error</div>"; }
53-
<?php if (isset($success)) { print "<div class=\"success\">$success</div>"; }
52+
<?php
53+
if (isset($msg)) {
54+
print "<div class=\"alert\">$msg</div>";
55+
}
56+
if (isset($error)) {
57+
print "<div class=\"error\">$error</div>";
58+
}
59+
if (isset($success)) {
60+
print "<div class=\"success\">$success</div>";
61+
}
62+
?>
5463

5564
<div id="verify-form">
5665
<form method="get" action="try_auth.php">
@@ -63,7 +72,8 @@
6372
<?php foreach ($pape_policy_uris as $i => $uri) {
6473
print "<input type=\"checkbox\" name=\"policies[]\" value=\"$uri\" />";
6574
print "$uri<br/>";
66-
}
75+
}
76+
?>
6777
</p>
6878

6979
<input type="submit" value="Verify" />

examples/discover.php

+15-13
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ function escape($x)
1717

1818

1919
$identifier = getOpenIDIdentifier();
20+
?>
2021

2122
<html>
2223
<head>
@@ -37,64 +38,65 @@ function escape($x)
3738
$fetcher = Auth_Yadis_Yadis::getHTTPFetcher();
3839
list($normalized_identifier, $endpoints) = Auth_OpenID_discover(
3940
$identifier, $fetcher);
41+
?>
4042

41-
42-
<h3>Discovery Results for <?= escape($identifier) </h3>
43+
<h3>Discovery Results for <?= escape($identifier) ?></h3>
4344

4445
<table cellpadding="7" cellspacing="0">
4546
<tbody>
4647
<tr>
4748
<th>Claimed Identifier</th>
48-
<td><?= escape($normalized_identifier) </td>
49+
<td><?= escape($normalized_identifier) ?></td>
4950
</tr>
5051
<?
5152
if (!$endpoints) {
52-
53+
?>
5354
<tr>
5455
<td colspan="2">No OpenID services discovered.</td>
5556
</tr>
5657
<?
5758
} else {
58-
59+
?>
5960
<tr>
6061
<td colspan="2">Discovered OpenID services:</td>
6162
</tr>
6263
<?
6364
foreach ($endpoints as $endpoint) {
64-
65+
?>
6566
<tr>
6667
<td colspan="2"><hr/></td>
6768
</tr>
6869
<tr>
6970
<th>Server URL</th>
70-
<td><tt><?= escape($endpoint->server_url) </tt></td>
71+
<td><tt><?= escape($endpoint->server_url) ?></tt></td>
7172
</tr>
7273
<tr>
7374
<th>Local ID</th>
74-
<td><tt><?= escape($endpoint->local_id) </tt></td>
75+
<td><tt><?= escape($endpoint->local_id) ?></tt></td>
7576
</tr>
7677
<tr>
7778
<td colspan="2">
7879
<h3>Service types:</h3>
7980
<ul>
8081
<?
8182
foreach ($endpoint->type_uris as $type_uri) {
82-
83-
<li><tt><?= escape($type_uri) </tt></li>
83+
?>
84+
<li><tt><?= escape($type_uri) ?> </tt></li>
8485
<?
8586
}
86-
87+
?>
8788
</ul>
8889
</td>
8990
</tr>
9091
<?
9192
}
9293
}
93-
94+
?>
9495
</tbody>
9596
</table>
9697
<?
9798
}
99+
?>
98100

99101
</body>
100-
</html>
102+
</html>

examples/server/lib/render/idpXrds.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
require_once "Auth/OpenID/Discover.php";
77

8-
define('idp_xrds_pat', '<?xml version="1.0" encoding="UTF-8"
8+
define('idp_xrds_pat', '<?xml version="1.0" encoding="UTF-8"?>
99
<xrds:XRDS
1010
xmlns:xrds="xri://$xrds"
1111
xmlns="xri://$xrd*($v*2.0)">

examples/server/lib/render/userXrds.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
require_once "Auth/OpenID/Discover.php";
77

8-
define('user_xrds_pat', '<?xml version="1.0" encoding="UTF-8"
8+
define('user_xrds_pat', '<?xml version="1.0" encoding="UTF-8"?>
99
<xrds:XRDS
1010
xmlns:xrds="xri://$xrds"
1111
xmlns="xri://$xrd*($v*2.0)">

examples/server/server.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
writeResponse($resp);
3131
} else {
32-
32+
?>
3333
<html>
3434
<head>
3535
<title>PHP OpenID Server</title>

0 commit comments

Comments
 (0)