Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #47 from starsquare/master
Browse files Browse the repository at this point in the history
Fix for all dl() cases and short_open_tag

I'm pretty sure we should remove the dl() calls entirely, since it is not longer present in PHP 5.3, but going ahead and merging this as-is for now.
  • Loading branch information
willnorris committed Jan 2, 2012
2 parents 53c793d + 1787658 commit d4e5efe
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Tests/Auth/OpenID/StoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ function test_mdb2store()
// The MDB2 test can use any database engine. MySQL is chosen

This comment has been minimized.

Copy link
@saude

saude Jan 6, 2012

// arbitrarily.
if (!(extension_loaded('mysql') ||
@dl('mysql.' . PHP_SHLIB_SUFFIX)) ||
(function_exists('dl') && @dl('mysql.' . PHP_SHLIB_SUFFIX))) ||
!(@include_once 'MDB2.php')) {
print "(not testing MDB2 store)";
$this->pass();
Expand Down
2 changes: 1 addition & 1 deletion examples/detect.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ function detect_stores($r, &$out)

$found = array();
foreach (array('sqlite', 'mysql', 'pgsql') as $dbext) {
if (extension_loaded($dbext) || (ini_get('enable_dl') && dl($dbext . '.' . PHP_SHLIB_SUFFIX))) {
if (extension_loaded($dbext) || (function_exists('dl') && @dl($dbext . '.' . PHP_SHLIB_SUFFIX))) {
$found[] = $dbext;
}
}
Expand Down
28 changes: 14 additions & 14 deletions examples/discover.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,70 +31,70 @@ function escape($x)
<input type="text" name="openid_identifier" size="40" />
<input type="submit" value="Begin" />
</form>
<?
<?php
if ($identifier) {

$fetcher = Auth_Yadis_Yadis::getHTTPFetcher();
list($normalized_identifier, $endpoints) = Auth_OpenID_discover(
$identifier, $fetcher);

?>
<h3>Discovery Results for <?= escape($identifier) ?></h3>
<h3>Discovery Results for <?php echo escape($identifier) ?></h3>

<table cellpadding="7" cellspacing="0">
<tbody>
<tr>
<th>Claimed Identifier</th>
<td><?= escape($normalized_identifier) ?></td>
<td><?php echo escape($normalized_identifier) ?></td>
</tr>
<?
<?php
if (!$endpoints) {
?>
<tr>
<td colspan="2">No OpenID services discovered.</td>
</tr>
<?
<?php
} else {
?>
<tr>
<td colspan="2">Discovered OpenID services:</td>
</tr>
<?
<?php
foreach ($endpoints as $endpoint) {
?>
<tr>
<td colspan="2"><hr/></td>
</tr>
<tr>
<th>Server URL</th>
<td><tt><?= escape($endpoint->server_url) ?></tt></td>
<td><tt><?php echo escape($endpoint->server_url) ?></tt></td>
</tr>
<tr>
<th>Local ID</th>
<td><tt><?= escape($endpoint->local_id) ?></tt></td>
<td><tt><?php echo escape($endpoint->local_id) ?></tt></td>
</tr>
<tr>
<td colspan="2">
<h3>Service types:</h3>
<ul>
<?
<?php
foreach ($endpoint->type_uris as $type_uri) {
?>
<li><tt><?= escape($type_uri) ?></tt></li>
<?
<li><tt><?php echo escape($type_uri) ?></tt></li>
<?php
}
?>
</ul>
</td>
</tr>
<?
<?php
}
}
?>
</tbody>
</table>
<?
<?php
}
?>
</body>
</html>
</html>
6 changes: 3 additions & 3 deletions examples/server/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,19 +176,19 @@ function render_form() {

$sqlite_found = false;
if (extension_loaded('sqlite') ||
@dl('sqlite.' . PHP_SHLIB_SUFFIX)) {
(function_exists('dl') && @dl('sqlite.' . PHP_SHLIB_SUFFIX))) {
$sqlite_found = true;
}

$mysql_found = false;
if (extension_loaded('mysql') ||
@dl('mysql.' . PHP_SHLIB_SUFFIX)) {
(function_exists('dl') && @dl('mysql.' . PHP_SHLIB_SUFFIX))) {
$mysql_found = true;
}

$pgsql_found = false;
if (extension_loaded('pgsql') ||
@dl('pgsql.' . PHP_SHLIB_SUFFIX)) {
(function_exists('dl') && @dl('pgsql.' . PHP_SHLIB_SUFFIX))) {
$pgsql_found = true;
}

Expand Down

0 comments on commit d4e5efe

Please sign in to comment.