Fix error when calling secure() on now object

This commit is contained in:
Deon George 2016-05-02 23:14:17 +10:00
parent f49b864d3a
commit 5d9d4f8d71
2 changed files with 8 additions and 8 deletions

View File

@ -14,12 +14,12 @@
<meta name="apple-mobile-web-app-capable" content="yes">
<?php
if (Kohana::$environment >= Kohana::TESTING OR Request::current()->secure()) {
if (Kohana::$environment >= Kohana::TESTING OR (Request::current() AND Request::current()->secure())) {
echo HTML::style('media/theme/bootstrap/css/bootstrap.min.css');
echo HTML::style('media/vendor/font-awesome/css/font-awesome.min.css');
} else {
echo HTML::style(Site::Protocol('maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'));
echo HTML::style(Site::Protocol('maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css'));
echo HTML::style(Site::Protocol('maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css'));
}
echo HTML::style(Site::Protocol('fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,800italic,400,600,800'));
@ -126,7 +126,7 @@
</div> <!-- /footer -->
<?php
if (Kohana::$environment >= Kohana::TESTING OR Request::current()->secure()) {
if (Kohana::$environment >= Kohana::TESTING OR (Request::current() AND Request::current()->secure())) {
echo HTML::script('media/js/jquery/jquery-1.9.1.min.js');
echo HTML::script('media/theme/bootstrap/js/bootstrap.min.js');
echo HTML::script('media/js/lodash/lodash-1.2.1.min.js');

View File

@ -14,12 +14,12 @@
<meta name="apple-mobile-web-app-capable" content="yes">
<?php
if (Kohana::$environment >= Kohana::TESTING OR Request::current()->secure()) {
if (Kohana::$environment >= Kohana::TESTING OR (Request::current() AND Request::current()->secure())) {
echo HTML::style('media/theme/bootstrap/css/bootstrap.min.css');
echo HTML::style('media/vendor/font-awesome/css/font-awesome.min.css');
} else {
echo HTML::style(Site::Protocol('maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css'));
echo HTML::style(Site::Protocol('maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css'));
echo HTML::style(Site::Protocol('maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'));
echo HTML::style(Site::Protocol('maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css'));
}
echo HTML::style(Site::Protocol('fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,800italic,400,600,800'));
@ -102,12 +102,12 @@
</div> <!-- /footer -->
</div> <!-- /wrapper -->
<?php
if (Kohana::$environment >= Kohana::TESTING OR Request::current()->secure()) {
if (Kohana::$environment >= Kohana::TESTING OR (Request::current() AND Request::current()->secure())) {
echo HTML::script('media/js/jquery/jquery-1.9.1.min.js');
echo HTML::script('media/theme/bootstrap/js/bootstrap.min.js');
} else {
echo HTML::script(Site::Protocol('code.jquery.com/jquery-1.9.1.min.js'));
echo HTML::script(Site::Protocol('maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js'));
echo HTML::script(Site::Protocol('maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js'));
}
echo HTML::script('media/theme/focusbusiness/js/focus.js');