Merge in from pre_0.1 branch
git-svn-id: file:///svn-source/pmgr/trunk/site@847 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -35,16 +35,312 @@
|
||||
* @subpackage cake.app
|
||||
*/
|
||||
class AppController extends Controller {
|
||||
var $uses = array('Option', 'Permission');
|
||||
var $helpers = array('Html', 'Form', 'Javascript', 'Format', 'Time', 'Grid');
|
||||
var $components = array('DebugKit.Toolbar');
|
||||
|
||||
var $sidemenu = array('areas' => array('SITE' => false, 'CONTROLLER' => false, 'ACTION' => false, 'SANDBOX' => false));
|
||||
var $std_area = 10;
|
||||
var $admin_area = 20;
|
||||
var $dev_area = 30;
|
||||
var $op_area = 40;
|
||||
var $new_area = 50;
|
||||
|
||||
function __construct() {
|
||||
$this->params['dev'] = false;
|
||||
$this->params['admin'] = false;
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function sideMenuLinks() {
|
||||
/**************************************************************************
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
* function: sideMenuAreaVerify
|
||||
* - Verifies the validity of the sidemenu area/subarea/priority,
|
||||
* and ensures the class member is set to appropriately handle it.
|
||||
*/
|
||||
|
||||
function sideMenuAreaVerify(&$area, $subarea, $priority = null) {
|
||||
$area = strtoupper($area);
|
||||
if (!array_key_exists($area, $this->sidemenu['areas']))
|
||||
$this->INTERNAL_ERROR("Sidemenu link '{$area}': Unknown");
|
||||
|
||||
if ($area == 'SITE')
|
||||
$name = 'Navigation';
|
||||
elseif ($area == 'CONTROLLER')
|
||||
$name = Inflector::humanize($this->params['controller']);
|
||||
elseif ($area == 'ACTION')
|
||||
$name = Inflector::humanize(Inflector::singularize($this->params['controller']));
|
||||
elseif ($area == 'SANDBOX')
|
||||
$name = 'Sandbox';
|
||||
|
||||
if (empty($this->sidemenu['areas'][$area]))
|
||||
$this->sidemenu['areas'][$area]
|
||||
= array('enable' => true, 'name' => $name, 'subareas' => array());
|
||||
|
||||
if (empty($subarea))
|
||||
return;
|
||||
|
||||
$subname = $name;
|
||||
if ($subarea == $this->std_area)
|
||||
$subname .= '';
|
||||
elseif ($subarea == $this->op_area)
|
||||
//$subname .= '-Ops';
|
||||
$subname = 'Actions';
|
||||
elseif ($subarea == $this->new_area)
|
||||
//$subname .= '-New';
|
||||
$subname = 'Creation';
|
||||
elseif ($subarea == $this->admin_area)
|
||||
$subname .= '-Admin';
|
||||
elseif ($subarea == $this->dev_area)
|
||||
$subname .= '-Dev';
|
||||
else
|
||||
$subname .= '-' . $subarea;
|
||||
|
||||
if (empty($this->sidemenu['areas'][$area]['subareas'][$subarea]))
|
||||
$this->sidemenu['areas'][$area]['subareas'][$subarea]
|
||||
= array('enable' => true, 'name' => $subname, 'priorities' => array());
|
||||
|
||||
if (empty($priority))
|
||||
return;
|
||||
|
||||
if (empty($this->sidemenu['areas'][$area]['subareas'][$subarea]['priorities'][$priority]))
|
||||
$this->sidemenu['areas'][$area]['subareas'][$subarea]['priorities'][$priority]
|
||||
= array();
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
* function: sideMenuAreaName
|
||||
* - Sets the name of the sidemenu area/subarea
|
||||
*/
|
||||
|
||||
function sideMenuAreaName($name, $area, $subarea = null) {
|
||||
$this->sideMenuAreaVerify($area, $subarea);
|
||||
if (empty($subarea))
|
||||
$this->sidemenu['areas'][$area]['name'] = $name;
|
||||
else
|
||||
$this->sidemenu['areas'][$area]['subareas'][$subarea]['name'] = $name;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
* function: sideMenuAreaActivate
|
||||
* - Sets the selected area/subarea to be active when the
|
||||
* page is first loaded.
|
||||
*/
|
||||
|
||||
function sideMenuAreaActivate($area, $subarea = null) {
|
||||
$this->sidemenu['active'] = compact('area', 'subarea');
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
* function: sideMenuEnable
|
||||
* - Enables/Disables an area or subarea of the sidemenu
|
||||
*/
|
||||
|
||||
function sideMenuEnable($area, $subarea = null, $enable = true) {
|
||||
$this->sideMenuAreaVerify($area, $subarea);
|
||||
if (isset($subarea))
|
||||
$this->sidemenu['areas'][$area]['subareas'][$subarea]['enable'] = $enable;
|
||||
else
|
||||
$this->sidemenu['areas'][$area]['enable'] = $enable;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
* function: addSideMenuLink
|
||||
* - Adds another link to the sidemenu area/subarea/priority
|
||||
*/
|
||||
|
||||
function addSideMenuLink($name, $url, $extra, $area, $subarea = null, $priority = 10) {
|
||||
if (empty($subarea))
|
||||
$subarea = $this->std_area;
|
||||
$this->sideMenuAreaVerify($area, $subarea);
|
||||
$this->sidemenu['areas'][$area]['subareas'][$subarea]['priorities'][$priority][]
|
||||
= array('name' => $name, 'url' => $url) + (empty($extra) ? array() : $extra);
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
* function: addDefaultSideMenuLinks
|
||||
* - Adds the standard links present on all generated pages
|
||||
*/
|
||||
|
||||
function addDefaultSideMenuLinks() {
|
||||
|
||||
$this->addSideMenuLink('Site Map',
|
||||
array('controller' => 'maps', 'action' => 'view', 1), null,
|
||||
'SITE');
|
||||
$this->addSideMenuLink('Unit Sizes',
|
||||
array('controller' => 'unit_sizes', 'action' => 'index'), null,
|
||||
'SITE');
|
||||
$this->addSideMenuLink('Units',
|
||||
array('controller' => 'units', 'action' => 'index'), null,
|
||||
'SITE');
|
||||
$this->addSideMenuLink('Leases',
|
||||
array('controller' => 'leases', 'action' => 'index'), null,
|
||||
'SITE');
|
||||
$this->addSideMenuLink('Customers',
|
||||
array('controller' => 'customers', 'action' => 'index'), null,
|
||||
'SITE');
|
||||
$this->addSideMenuLink('Deposits',
|
||||
array('controller' => 'transactions', 'action' => 'deposit'), null,
|
||||
'SITE');
|
||||
|
||||
$this->addSideMenuLink('Accounts',
|
||||
array('controller' => 'accounts', 'action' => 'index'), null,
|
||||
'SITE', $this->admin_area);
|
||||
$this->addSideMenuLink('Contacts',
|
||||
array('controller' => 'contacts', 'action' => 'index'), null,
|
||||
'SITE', $this->admin_area);
|
||||
$this->addSideMenuLink('Ledgers',
|
||||
array('controller' => 'ledgers', 'action' => 'index'), null,
|
||||
'SITE', $this->admin_area);
|
||||
$this->addSideMenuLink('Tenders',
|
||||
array('controller' => 'tenders', 'action' => 'index'), null,
|
||||
'SITE', $this->admin_area);
|
||||
$this->addSideMenuLink('Transactions',
|
||||
array('controller' => 'transactions', 'action' => 'index'), null,
|
||||
'SITE', $this->admin_area);
|
||||
$this->addSideMenuLink('Ldgr Entries',
|
||||
array('controller' => 'ledger_entries', 'action' => 'index'), null,
|
||||
'SITE', $this->admin_area);
|
||||
$this->addSideMenuLink('Stmt Entries',
|
||||
array('controller' => 'statement_entries', 'action' => 'index'), null,
|
||||
'SITE', $this->admin_area);
|
||||
|
||||
$this->addSideMenuLink('Un-Nuke',
|
||||
'#', array('htmlAttributes' =>
|
||||
array('onclick' => '$(".pr-section").show(); return false;')),
|
||||
'SITE', $this->dev_area);
|
||||
$this->addSideMenuLink('New Ledgers',
|
||||
array('controller' => 'accounts', 'action' => 'newledger'), null,
|
||||
'SITE', $this->dev_area);
|
||||
//array('name' => 'RESET DATA', array('controller' => 'accounts', 'action' => 'reset_data'));
|
||||
|
||||
|
||||
$this->addSideMenuLink('New Receipt',
|
||||
array('controller' => 'customers', 'action' => 'receipt'), null,
|
||||
'SITE', $this->op_area);
|
||||
$this->addSideMenuLink('New Invoice',
|
||||
array('controller' => 'leases', 'action' => 'invoice'), null,
|
||||
'SITE', $this->op_area);
|
||||
$this->addSideMenuLink('Move-In',
|
||||
array('controller' => 'customers', 'action' => 'move_in'), null,
|
||||
'SITE', $this->op_area);
|
||||
$this->addSideMenuLink('Move-Out',
|
||||
array('controller' => 'leases', 'action' => 'move_out'), null,
|
||||
'SITE', $this->op_area);
|
||||
$this->addSideMenuLink('New Deposit',
|
||||
array('controller' => 'tenders', 'action' => 'deposit'), null,
|
||||
'SITE', $this->op_area);
|
||||
if (!empty($this->params['admin']))
|
||||
$this->addSideMenuLink('Assess Charges',
|
||||
array('controller' => 'leases', 'action' => 'assess_all'), null,
|
||||
'SITE', $this->op_area);
|
||||
|
||||
$url_components = array('plugin', 'controller', 'action', 'named');
|
||||
if (devbox()) {
|
||||
/* $sources = ConnectionManager::sourceList(); */
|
||||
/* $db = ConnectionManager::getDataSource($sources[0])->config['database']; */
|
||||
/* $this->sideMenuAreaName($db, 'SANDBOX', $this->std_area); */
|
||||
$this->sideMenuAreaName('DevBox', 'SANDBOX', $this->std_area);
|
||||
$this->addSideMenuLink('Rebuild DevBox',
|
||||
array('controller' => 'util', 'action' => 'rebuild_devbox'), null,
|
||||
'SANDBOX');
|
||||
}
|
||||
elseif (sandbox()) {
|
||||
$this->addSideMenuLink('Rebuild Sandbox',
|
||||
array('controller' => 'util', 'action' => 'rebuild_sandbox'), null,
|
||||
'SANDBOX');
|
||||
$this->addSideMenuLink('Leave Sandbox',
|
||||
array('sand_route' => false)
|
||||
+ array_intersect_key($this->params, array_flip($url_components))
|
||||
+ $this->params['pass'],
|
||||
null, 'SANDBOX');
|
||||
}
|
||||
else {
|
||||
$this->addSideMenuLink('Enter Sandbox',
|
||||
array('sand_route' => true)
|
||||
+ array_intersect_key($this->params, array_flip($url_components))
|
||||
+ $this->params['pass'],
|
||||
null, 'SANDBOX');
|
||||
}
|
||||
|
||||
// REVISIT <AP>: 20090824
|
||||
// Depending on preference, we may put this into the gridView
|
||||
// function, making the links available only when navigating.
|
||||
$this->addGridViewSideMenuLinks();
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
* virtual: addGridViewSideMenuLinks
|
||||
* - Adds the grid view specific navigation links, if overridden.
|
||||
*/
|
||||
|
||||
function addGridViewSideMenuLinks() {
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
* hook: beforeFilter
|
||||
* - Called just before the action function
|
||||
*/
|
||||
|
||||
function beforeFilter() {
|
||||
$this->params['user'] = $this->Permission->User->currentUser();
|
||||
$this->params['admin'] = $this->Option->enabled('admin');
|
||||
$this->params['dev'] = devbox();
|
||||
|
||||
if ($this->params['dev'] && !$this->Option->enabled('dev'))
|
||||
$this->redirect("/");
|
||||
|
||||
if (!$this->params['dev'])
|
||||
Configure::write('debug', '0');
|
||||
|
||||
$this->addDefaultSideMenuLinks();
|
||||
//$this->sideMenuEnable('SITE', $this->op_area, false);
|
||||
|
||||
foreach ($this->sidemenu['areas'] AS $area_name => $area) {
|
||||
if (empty($this->params['dev']))
|
||||
$this->sideMenuEnable($area_name, $this->dev_area, false);
|
||||
if (empty($this->params['admin']))
|
||||
$this->sideMenuEnable($area_name, $this->admin_area, false);
|
||||
}
|
||||
|
||||
$this->authorize("controller.{$this->params['controller']}");
|
||||
$this->authorize("action.{$this->params['controller']}.{$this->params['action']}");
|
||||
|
||||
$this->log('----------------------------------------------------------------------', 'request');
|
||||
$this->log('----------------------------------------------------------------------', 'request');
|
||||
$this->log($this->params, 'request');
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
* hook: beforeRender
|
||||
* - Called just before rendering the page
|
||||
*/
|
||||
|
||||
function beforeRender() {
|
||||
// Stupid Cake... our constructor sets admin/dev,
|
||||
// but cake stomps it somewhere along the way
|
||||
// after constructing the CakeError controller.
|
||||
@@ -53,51 +349,56 @@ class AppController extends Controller {
|
||||
$this->params['admin'] = false;
|
||||
}
|
||||
|
||||
$menu = array();
|
||||
$menu[] = array('name' => 'Common', 'header' => true);
|
||||
$menu[] = array('name' => 'Site Map', 'url' => array('controller' => 'maps', 'action' => 'view', 1));
|
||||
$menu[] = array('name' => 'Units', 'url' => array('controller' => 'units', 'action' => 'index'));
|
||||
$menu[] = array('name' => 'Leases', 'url' => array('controller' => 'leases', 'action' => 'index'));
|
||||
$menu[] = array('name' => 'Customers', 'url' => array('controller' => 'customers', 'action' => 'index'));
|
||||
$menu[] = array('name' => 'Deposits', 'url' => array('controller' => 'transactions', 'action' => 'deposit'));
|
||||
foreach ($this->sidemenu['areas'] AS $aname => &$area) {
|
||||
if (empty($area['enable']))
|
||||
$area = array();
|
||||
if (empty($area['subareas']))
|
||||
continue;
|
||||
ksort($area['subareas']);
|
||||
|
||||
if ($this->params['admin']) {
|
||||
$menu[] = array('name' => 'Admin', 'header' => true);
|
||||
$menu[] = array('name' => 'Accounts', 'url' => array('controller' => 'accounts', 'action' => 'index'));
|
||||
$menu[] = array('name' => 'Contacts', 'url' => array('controller' => 'contacts', 'action' => 'index'));
|
||||
$menu[] = array('name' => 'Ledgers', 'url' => array('controller' => 'ledgers', 'action' => 'index'));
|
||||
$menu[] = array('name' => 'Tenders', 'url' => array('controller' => 'tenders', 'action' => 'index'));
|
||||
$menu[] = array('name' => 'Transactions', 'url' => array('controller' => 'transactions', 'action' => 'index'));
|
||||
$menu[] = array('name' => 'Ldgr Entries', 'url' => array('controller' => 'ledger_entries', 'action' => 'index'));
|
||||
$menu[] = array('name' => 'Stmt Entries', 'url' => array('controller' => 'statement_entries', 'action' => 'index'));
|
||||
$menu[] = array('name' => 'New Ledgers', 'url' => array('controller' => 'accounts', 'action' => 'newledger'));
|
||||
$menu[] = array('name' => 'Assess Charges', 'url' => array('controller' => 'leases', 'action' => 'assess_all'));
|
||||
foreach ($area['subareas'] AS $sname => &$subarea) {
|
||||
if (empty($subarea['enable']))
|
||||
$subarea = array();
|
||||
if (empty($subarea['priorities']))
|
||||
continue;
|
||||
ksort($subarea['priorities']);
|
||||
|
||||
foreach ($subarea['priorities'] AS $pname => &$priority) {
|
||||
if (empty($priority))
|
||||
unset($subarea['priorities'][$pname]);
|
||||
}
|
||||
unset($priority);
|
||||
|
||||
if (empty($subarea['priorities']))
|
||||
unset($area['subareas'][$sname]);
|
||||
}
|
||||
unset($subarea);
|
||||
|
||||
if (empty($area['subareas']))
|
||||
unset($this->sidemenu['areas'][$aname]);
|
||||
}
|
||||
unset($area);
|
||||
|
||||
// Activate a default section (unless already specified)
|
||||
foreach (array_reverse(array_diff_key($this->sidemenu['areas'], array('SANDBOX'=>1))) AS $area_name => $area) {
|
||||
if (empty($area))
|
||||
continue;
|
||||
|
||||
if (empty($this->sidemenu['active']) ||
|
||||
empty($this->sidemenu['areas'][$this->sidemenu['active']['area']]))
|
||||
$this->sideMenuAreaActivate($area_name);
|
||||
}
|
||||
|
||||
if ($this->params['dev']) {
|
||||
$menu[] = array('name' => 'Development', 'header' => true);
|
||||
$menu[] = array('name' => 'Un-Nuke', 'url' => '#', 'htmlAttributes' =>
|
||||
array('onclick' => '$(".pr-section").show(); return false;'));
|
||||
$menu[] = array('name' => 'New Ledgers', 'url' => array('controller' => 'accounts', 'action' => 'newledger'));
|
||||
//array('name' => 'RESET DATA', 'url' => array('controller' => 'accounts', 'action' => 'reset_data'));
|
||||
}
|
||||
|
||||
return $menu;
|
||||
//pr($this->sidemenu);
|
||||
$this->set('sidemenu', $this->sidemenu);
|
||||
}
|
||||
|
||||
function beforeFilter() {
|
||||
$this->params['dev'] =
|
||||
(!empty($this->params['dev_route']));
|
||||
$this->params['admin'] =
|
||||
(!empty($this->params['admin_route']) || !empty($this->params['dev_route']));
|
||||
|
||||
if (!$this->params['dev'])
|
||||
Configure::write('debug', '0');
|
||||
}
|
||||
|
||||
function beforeRender() {
|
||||
$this->set('sidemenu', $this->sideMenuLinks());
|
||||
}
|
||||
/**************************************************************************
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
* override: redirect
|
||||
*/
|
||||
|
||||
function redirect($url, $status = null, $exit = true) {
|
||||
// OK, since the controller will not be able to
|
||||
@@ -127,28 +428,6 @@ class AppController extends Controller {
|
||||
return parent::redirect($url, $status, $exit);
|
||||
}
|
||||
|
||||
function reset_data() {
|
||||
$this->layout = null;
|
||||
$this->autoLayout = false;
|
||||
$this->autoRender = false;
|
||||
Configure::write('debug', '0');
|
||||
$script = $_SERVER['DOCUMENT_ROOT'] . '/pmgr/build.cmd';
|
||||
echo "<P>" . date('r') . "\n";
|
||||
//echo "<P>Script: $script" . "\n";
|
||||
$db = & $this->Account->getDataSource();
|
||||
$script .= ' "' . $db->config['database'] . '"';
|
||||
$script .= ' "' . $db->config['login'] . '"';
|
||||
$script .= ' "' . $db->config['password'] . '"';
|
||||
$handle = popen($script . ' 2>&1', 'r');
|
||||
//echo "<P>Handle: $handle; " . gettype($handle) . "\n";
|
||||
echo "<P><PRE>\n";
|
||||
while (($read = fread($handle, 2096))) {
|
||||
echo $read;
|
||||
}
|
||||
echo "</PRE>\n";
|
||||
pclose($handle);
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
**************************************************************************
|
||||
@@ -156,8 +435,14 @@ class AppController extends Controller {
|
||||
* helper: gridView
|
||||
* - called by derived controllers to create an index listing
|
||||
*/
|
||||
function index() {
|
||||
$names = Inflector::humanize(Inflector::pluralize($this->params['controller']));
|
||||
$this->gridView('All ' . $names, 'all');
|
||||
}
|
||||
|
||||
function gridView($title, $action = null, $element = null) {
|
||||
$this->sideMenuEnable('SITE', $this->op_area);
|
||||
$this->sideMenuAreaActivate('CONTROLLER');
|
||||
$this->set('title', $title);
|
||||
// The resulting page will contain a grid, which will
|
||||
// use ajax to obtain the actual data for this action
|
||||
@@ -294,6 +579,7 @@ class AppController extends Controller {
|
||||
$xml = preg_replace("/</", "<", $xml);
|
||||
$xml = preg_replace("/>/", ">", $xml);
|
||||
echo ("\n<PRE>\n$xml\n</PRE>\n");
|
||||
$this->render_empty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,8 +600,8 @@ class AppController extends Controller {
|
||||
// Grouping (which would not be typical)
|
||||
$query['group'] = $this->gridDataCountGroup($params, $model);
|
||||
|
||||
// DEBUG PURPOSES ONLY!
|
||||
$params['count_query'] = $query;
|
||||
if ($params['debug'])
|
||||
$params['count_query'] = $query;
|
||||
|
||||
// Get the number of records prior to pagination
|
||||
return $this->gridDataCountExecute($params, $model, $query);
|
||||
@@ -571,8 +857,8 @@ class AppController extends Controller {
|
||||
isset($params['sidx']) ? $params['sidx'] : null,
|
||||
isset($params['sord']) ? $params['sord'] : null);
|
||||
|
||||
// DEBUG PURPOSES ONLY!
|
||||
$params['query'] = $query;
|
||||
if ($params['debug'])
|
||||
$params['query'] = $query;
|
||||
|
||||
return $this->gridDataRecordsExecute($params, $model, $query);
|
||||
}
|
||||
@@ -695,6 +981,7 @@ class AppController extends Controller {
|
||||
$this->gridDataPostProcessLinks($params, $model, $records, array());
|
||||
|
||||
// DEBUG PURPOSES ONLY!
|
||||
//if ($params['debug'])
|
||||
//$params['records'] = $records;
|
||||
}
|
||||
|
||||
@@ -772,6 +1059,7 @@ class AppController extends Controller {
|
||||
continue;
|
||||
|
||||
// DEBUG PURPOSES ONLY!
|
||||
//if ($params['debug'])
|
||||
//$params['linkrecord'][] = compact('table', 'field', 'id', 'controller', 'record');
|
||||
$record[$table][$field] =
|
||||
'<A HREF="' .
|
||||
@@ -802,9 +1090,8 @@ class AppController extends Controller {
|
||||
}
|
||||
|
||||
function gridDataOutputHeader(&$params, &$model) {
|
||||
if (!$params['debug']) {
|
||||
if (!$params['debug'])
|
||||
header("Content-type: text/xml;charset=utf-8");
|
||||
}
|
||||
}
|
||||
|
||||
function gridDataOutputXMLHeader(&$params, &$model) {
|
||||
@@ -867,14 +1154,26 @@ class AppController extends Controller {
|
||||
echo " <cell><![CDATA[$data]]></cell>\n";
|
||||
}
|
||||
|
||||
function authorize($name) {
|
||||
if ($this->Permission->deny($name))
|
||||
$this->UNAUTHORIZED("Unauthorized: $name");
|
||||
}
|
||||
|
||||
function UNAUTHORIZED($msg) {
|
||||
//$this->redirect('controller' => '???', 'action' => 'login');
|
||||
//$this->render('/unauthorized');
|
||||
$this->set('message', '<H2>' . $msg . '</H2>');
|
||||
$this->render_empty();
|
||||
}
|
||||
|
||||
function INTERNAL_ERROR($msg, $depth = 0) {
|
||||
INTERNAL_ERROR($msg, false, $depth+1);
|
||||
$this->render_empty();
|
||||
$this->_stop();
|
||||
}
|
||||
|
||||
function render_empty() {
|
||||
$this->render('/empty');
|
||||
echo $this->render('/empty');
|
||||
$this->_stop();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user