Due to an apparent bug in the core View class, raw images were not being generated with the inclusion of the DebugToolkit. This checkin does NOT fix the problem, but it does include some debug mechanisms that I have continued to need from time to time.

git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@98 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-06-11 02:38:54 +00:00
parent e2f623b7ee
commit ff5c7260f8
2 changed files with 16 additions and 10 deletions

View File

@@ -211,9 +211,13 @@ class MapsController extends AppController {
*/ */
function image($info, $legend = false) { function image($info, $legend = false) {
$this->layout = null; $debug = false;
$this->autoLayout = false;
Configure::write('debug', '0'); if (!$debug) {
$this->layout = null;
$this->autoLayout = false;
Configure::write('debug', '0');
}
// Define our color palate // Define our color palate
// REVISIT <AP>: 20090513 // REVISIT <AP>: 20090513
@@ -254,9 +258,7 @@ class MapsController extends AppController {
$code['fg'] = $component; $code['fg'] = $component;
} }
//pr($info); $this->set(compact('info', 'debug'));
$this->set(compact('info'));
$this->render('image'); $this->render('image');
} }

View File

@@ -83,10 +83,14 @@ foreach ($info['units'] AS $unit) {
} }
if ($debug) {
header("Content-type: image/png"); print("<H2>Would Now Render Image as image/png</H2>\n");
if (! imagepng($image)) { }
die("Couldn't output image!"); else {
header("Content-type: image/png");
if (! imagepng($image)) {
die("Couldn't output image!");
}
} }
// Clear image from memory // Clear image from memory