Minor fixes for rendering

This commit is contained in:
Deon George 2016-08-26 15:02:40 +10:00
parent 68d96ca85f
commit e07fc159cf
4 changed files with 11 additions and 7 deletions

View File

@ -32,7 +32,11 @@ abstract class lnApp_Auth_ORM extends Kohana_Auth_ORM {
* @return Model_Account|NULL The user that the token is valid for. * @return Model_Account|NULL The user that the token is valid for.
*/ */
protected function _get_token_user($token) { protected function _get_token_user($token) {
list($id,$key) = explode(':',$token,2); try {
list($id,$key) = explode(':',$token,2);
} catch (Exception $e) {
return ORM::factory('Account');
}
$uo = ORM::factory('Account',$id); $uo = ORM::factory('Account',$id);

View File

@ -14,7 +14,7 @@
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes">
<?php <?php
if (Kohana::$environment >= Kohana::TESTING OR (Request::current() AND Request::current()->secure())) { if (Kohana::$environment >= Kohana::TESTING OR (is_object(Request::current()) AND Request::current()->secure())) {
echo HTML::style('media/theme/bootstrap/css/bootstrap.min.css'); echo HTML::style('media/theme/bootstrap/css/bootstrap.min.css');
echo HTML::style('media/vendor/font-awesome/css/font-awesome.min.css'); echo HTML::style('media/vendor/font-awesome/css/font-awesome.min.css');
} else { } else {
@ -127,7 +127,7 @@
</div> <!-- /footer --> </div> <!-- /footer -->
<?php <?php
if (Kohana::$environment >= Kohana::TESTING OR (Request::current() AND Request::current()->secure())) { if (Kohana::$environment >= Kohana::TESTING OR (is_object(Request::current()) AND Request::current()->secure())) {
echo HTML::script('media/js/jquery/jquery-1.9.1.min.js'); 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/theme/bootstrap/js/bootstrap.min.js');
echo HTML::script('media/js/lodash/lodash-1.2.1.min.js'); echo HTML::script('media/js/lodash/lodash-1.2.1.min.js');

View File

@ -14,7 +14,7 @@
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes">
<?php <?php
if (Kohana::$environment >= Kohana::TESTING OR (Request::current() AND Request::current()->secure())) { if (Kohana::$environment >= Kohana::TESTING OR (is_object(Request::current()) AND Request::current()->secure())) {
echo HTML::style('media/theme/bootstrap/css/bootstrap.min.css'); echo HTML::style('media/theme/bootstrap/css/bootstrap.min.css');
echo HTML::style('media/theme/bootstrap/css/bootstrap-theme.min.css'); echo HTML::style('media/theme/bootstrap/css/bootstrap-theme.min.css');
echo HTML::style('media/vendor/font-awesome/css/font-awesome.min.css'); echo HTML::style('media/vendor/font-awesome/css/font-awesome.min.css');
@ -103,7 +103,7 @@
</div> <!-- /footer --> </div> <!-- /footer -->
<?php <?php
if (Kohana::$environment >= Kohana::TESTING OR (Request::current() AND Request::current()->secure())) { if (Kohana::$environment >= Kohana::TESTING OR (is_object(Request::current()) AND Request::current()->secure())) {
echo HTML::script('media/js/jquery/jquery-1.9.1.min.js'); 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/theme/bootstrap/js/bootstrap.min.js');
echo HTML::script('media/js/lodash/lodash-1.2.1.min.js'); echo HTML::script('media/js/lodash/lodash-1.2.1.min.js');

View File

@ -14,7 +14,7 @@
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes">
<?php <?php
if (Kohana::$environment >= Kohana::TESTING OR (Request::current() AND Request::current()->secure())) { if (Kohana::$environment >= Kohana::TESTING OR (is_object(Request::current()) AND Request::current()->secure())) {
echo HTML::style('media/theme/bootstrap/css/bootstrap.min.css'); echo HTML::style('media/theme/bootstrap/css/bootstrap.min.css');
echo HTML::style('media/vendor/font-awesome/css/font-awesome.min.css'); echo HTML::style('media/vendor/font-awesome/css/font-awesome.min.css');
} else { } else {
@ -102,7 +102,7 @@
</div> <!-- /footer --> </div> <!-- /footer -->
</div> <!-- /wrapper --> </div> <!-- /wrapper -->
<?php <?php
if (Kohana::$environment >= Kohana::TESTING OR (Request::current() AND Request::current()->secure())) { if (Kohana::$environment >= Kohana::TESTING OR (is_object(Request::current()) AND Request::current()->secure())) {
echo HTML::script('media/js/jquery/jquery-1.9.1.min.js'); 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/theme/bootstrap/js/bootstrap.min.js');
} else { } else {