[switchyard] r788 committed - [No log message]

0 views
Skip to first unread message

codesite...@google.com

unread,
Oct 1, 2009, 11:18:21 PM10/1/09
to switchy...@googlegroups.com
Revision: 788
Author: intuiworx
Date: Thu Oct 1 20:17:39 2009
Log: [No log message]
http://code.google.com/p/switchyard/source/detail?r=788

Modified:
/framework/trunk/app/core/SwitchYard_Config.class.php
/framework/trunk/app/core/SwitchYard_Form.class.php
/framework/trunk/app/external
/framework/trunk/index.php

=======================================
--- /framework/trunk/app/core/SwitchYard_Config.class.php Mon Sep 28
08:06:48 2009
+++ /framework/trunk/app/core/SwitchYard_Config.class.php Thu Oct 1
20:17:39 2009
@@ -71,9 +71,6 @@
// are we in debugging mode?
define('SY_DEBUGGING', self::value_to_boolean(self::$xml->debugging));

- // set the error reporting level to the configured level
- error_reporting(eval('return '.(string)self::$xml->errlevel.';'));
-
// set the default path
self::$defaultPath = (string)self::$xml->defaultPath;

=======================================
--- /framework/trunk/app/core/SwitchYard_Form.class.php Thu Sep 24 13:12:19
2009
+++ /framework/trunk/app/core/SwitchYard_Form.class.php Thu Oct 1 20:17:39
2009
@@ -34,7 +34,7 @@
$fld = null;

// skip anything we were told to skip
- if (is_array($skip)) if (in_array($col['name'], $skip)) continue;
+ if (isset($skip) and is_array($skip) and in_array($col['name'], $skip))
continue;

// for float columns
if ($col['type'] == 'float') {
@@ -53,7 +53,7 @@
($col['type'] == 'text' and
strstr(strtolower($col['ntype']), 'varchar'))
) {
// if we hinted that this is a checkbox, make it so ... otherwise it's
just text
- if ($col['type'] == 'integer' and $types[$col['name']] == 'checkbox') {
+ if ($col['type'] == 'integer' and isset($types) and is_array($types)
and isset($types[$col['name']]) and $types[$col['name']] == 'checkbox') {
$fld = $this->form->add(array(
'type' => 'checkbox', 'name' => $col['name'], 'checkedVal' => 1
));
@@ -108,32 +108,41 @@
if (!is_object($fld)) continue;

// loop through the the default values passed for this field type and
set them
- if (is_array($defaults[$type])) $fld->setFieldParams($defaults[$type]);
+ if (isset($defaults) and is_array($defaults) and
is_array($defaults[$type]))
+ $fld->setFieldParams($defaults[$type]);

// set the template if specified
- if (!empty($templates[$col['name']]))
$fld->setTemplate($templates[$col['name']]);
+ if (isset($templates) and !empty($templates[$col['name']]))
+ $fld->setTemplate($templates[$col['name']]);

// set the type if specified
- if (!empty($types[$col['name']])) $fld->setType($types[$col['name']]);
+ if (isset($types) and !empty($types[$col['name']]))
+ $fld->setType($types[$col['name']]);

// set the default value from the database, if possible
$fld->setDefaultVal($col['default']);

// if there are any field-specific instructions for this column, handle
them
- if (is_array($fld_config[$col['name']]))
$fld->setFieldParams($fld_config[$col['name']]);
+ if (isset($fld_config) and is_array($fld_config) and
is_array($fld_config[$col['name']]))
+ $fld->setFieldParams($fld_config[$col['name']]);

// set the validators
- if (is_array($validators))
$fld->setValidator($validators[$col['name']]);
+ if (isset($validators) and is_array($validators))
+ $fld->setValidator($validators[$col['name']]);

// is this field required?
- if (is_array($required) and in_array($col['name'], $required))
$fld->setRequired(true);
+ if (isset($required) and is_array($required) and in_array($col['name'],
$required))
+ $fld->setRequired(true);

// set the field label; either use the column name or any provided label
- $label = ($labels[$col['name']]) ? $labels[$col['name']] :
ucwords(strtolower(str_replace('_', ' ', $col['name']))) ;
- $fld->setLabel($label);
+ if (isset($labels) and is_array($labels)) {
+ $label = (isset($labels[$col['name']])) ? $labels[$col['name']] :
ucwords(strtolower(str_replace('_', ' ', $col['name']))) ;
+ $fld->setLabel($label);
+ }

// set the field label class if there is one specified
- if ($label_classes[$col['name']])
$fld->setLabelClass($label_classes[$col['name']]);
+ if (isset($label_classes) and is_array($label_classes) and
$label_classes[$col['name']])
+ $fld->setLabelClass($label_classes[$col['name']]);

}

=======================================
--- /framework/trunk/index.php Thu Oct 1 12:51:33 2009
+++ /framework/trunk/index.php Thu Oct 1 20:17:39 2009
@@ -3,13 +3,15 @@
/**
* SwitchYard Master Controller Script
* @author Jeremy Clifton <j.cl...@4-8-4.com>
- * @version 3.1.5
+ * @version 3.1.6
* @copyright 2005-2009 4-8-4 Software Works, LLC
* @license BSD
*/

error_reporting(E_ALL);
-define('SY_VERSION', '3.1.5');
+ini_set('display_errors', true);
+
+define('SY_VERSION', '3.1.6');
require 'app/core/bootstrap.php';
SwitchYard::$router = new SwitchYard_Router();
SwitchYard::$router->dispatch();

Reply all
Reply to author
Forward
0 new messages