Use of secured scheme for external apis in case of https

This commit is contained in:
Romain Neutron
2012-01-06 14:42:41 +01:00
parent e7bab79c85
commit d933c64b2f
9 changed files with 21 additions and 13 deletions

View File

@@ -738,8 +738,10 @@ if ($cssfile)
<?php
if (trim($registry->get('GV_bitly_user')) !== '' && trim($registry->get('GV_bitly_key')) !== '')
{
?>
<script type="text/javascript" src="http://bit.ly/javascript-api.js?version=latest&login=<?php echo $registry->get('GV_bitly_user') ?>&apiKey=<?php echo $registry->get('GV_bitly_key') ?>"></script>
$request = new http_request();
?>
<script type="text/javascript" src="http<?php echo $request->is_secure() ? 's' : '' ?>://bit.ly/javascript-api.js?version=latest&login=<?php echo $registry->get('GV_bitly_user') ?>&apiKey=<?php echo $registry->get('GV_bitly_key') ?>"></script>
<?php
}
?>