Misc many fixes
This commit is contained in:
@@ -15,7 +15,7 @@ class Controller_Admin_Module extends Controller_TemplateDefault_Admin {
|
||||
'add'=>TRUE,
|
||||
'edit'=>TRUE,
|
||||
'list'=>TRUE,
|
||||
);
|
||||
);
|
||||
|
||||
/**
|
||||
* Get the list of methods for a class
|
||||
@@ -51,7 +51,7 @@ class Controller_Admin_Module extends Controller_TemplateDefault_Admin {
|
||||
$mo = ORM::factory('module');
|
||||
|
||||
Block::add(array(
|
||||
'title'=>sprintf('%s: %s - %s',_('Email For'),$this->ao->accnum(),$this->ao->name(TRUE)),
|
||||
'title'=>_('Defined Modules'),
|
||||
'body'=>Table::display(
|
||||
$mo->find_all(),
|
||||
25,
|
||||
|
28
application/classes/controller/debug.php
Normal file
28
application/classes/controller/debug.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
class Controller_Debug extends Controller_TemplateDefault {
|
||||
public function before() {
|
||||
if (! in_array(Config::sitemode(),array(Kohana::DEVELOPMENT,Kohana::TESTING)))
|
||||
$this->request->redirect();
|
||||
|
||||
parent::before();
|
||||
}
|
||||
|
||||
public function action_site() {
|
||||
$output = '';
|
||||
|
||||
$output .= debug::vars(array(
|
||||
'm'=>__METHOD__,
|
||||
'site'=>Config::site(),
|
||||
'siteID'=>Config::siteid(),
|
||||
'siteMode'=>Config::sitemodeverbose(),
|
||||
'modules'=>Config::appmodules(),
|
||||
));
|
||||
|
||||
Block::add(array(
|
||||
'title'=>_('Site debug'),
|
||||
'body'=>$output,
|
||||
));
|
||||
}
|
||||
}
|
||||
?>
|
@@ -155,6 +155,8 @@ class Controller_lnApp_Login extends Controller_TemplateDefault {
|
||||
$mt->save();
|
||||
|
||||
// Send our email with the token
|
||||
// @todo Need to provide an option if Email_Template is not installed/activited.
|
||||
// @todo Need to provide an option if account_reset_password template doesnt exist.
|
||||
$et = Email_Template::instance('account_reset_password');
|
||||
$et->to = array('account'=>array($mt->account_id));
|
||||
$et->variables = array(
|
||||
|
@@ -89,7 +89,7 @@ abstract class Controller_lnApp_TemplateDefault extends Controller_Template {
|
||||
SystemMessage::add(array(
|
||||
'title'=>_('Insufficient Access'),
|
||||
'type'=>'debug',
|
||||
'body'=>Kohana::debug(array('required'=>$this->auth_required,'action'=>$this->request->action(),'user'=>Auth::instance()->get_user()->username)),
|
||||
'body'=>Debug::vars(array('required'=>$this->auth_required,'action'=>$this->request->action(),'user'=>Auth::instance()->get_user()->username)),
|
||||
));
|
||||
|
||||
// @todo Login No Access redirects are not handled in JS?
|
||||
@@ -206,7 +206,7 @@ abstract class Controller_lnApp_TemplateDefault extends Controller_Template {
|
||||
* Default Method to call from the tree menu
|
||||
*/
|
||||
public function action_menu() {
|
||||
$this->template->content = _('Please choose from the menu.');
|
||||
$this->template->content = _('Please choose from the menu on the left - you may need to expand the items by pressing on the triangle.');
|
||||
}
|
||||
|
||||
protected function _headimages() {
|
||||
|
@@ -27,7 +27,7 @@ class Controller_TemplateDefault extends Controller_lnApp_TemplateDefault {
|
||||
}
|
||||
|
||||
private function _cart() {
|
||||
if (! Cart::instance()->contents()->reset(FALSE)->count_all())
|
||||
if (! class_exists('cart') OR ! Cart::instance()->contents()->reset(FALSE)->count_all())
|
||||
return '';
|
||||
|
||||
return Cart::instance()->cart_block();
|
||||
|
Reference in New Issue
Block a user