diff --git a/README.md b/README.md index fb121a21..502f4ee4 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,25 @@ -PHP Core Library -================ +# PHP Core Library Base PHP class files to setup any project -* login -* database wrapper -* basic helper class for debugging and other features -* admin/frontend split -* domain controlled database/settings split -* dynamic layout groups + * login + * database wrapper + * basic helper class for debugging and other features + * admin/frontend split + * domain controlled database/settings split + * dynamic layout groups + +## NOTE + +There are three branches: + +### master + +This is currently the legacy branch set live. This will change to the namespace branch once development is finished + +### legacy + +The old non namepsace format layout. This will only get bug fixes and no new development + +### namespace + +The new namespace branch. Once development is finished this branch will be removed or renamed to development only branch diff --git a/www/Smarty b/www/Smarty index 6f6e682f..da807799 120000 --- a/www/Smarty +++ b/www/Smarty @@ -1 +1 @@ -smarty-3.1.27/ \ No newline at end of file +smarty-3.1.30 \ No newline at end of file diff --git a/www/layout/admin/default/lang/en_utf8.mp b/www/layout/admin/default/lang/en_utf8.mo similarity index 100% rename from www/layout/admin/default/lang/en_utf8.mp rename to www/layout/admin/default/lang/en_utf8.mo diff --git a/www/layout/admin/default/lang/ja_utf8.mp b/www/layout/admin/default/lang/ja_utf8.mo similarity index 100% rename from www/layout/admin/default/lang/ja_utf8.mp rename to www/layout/admin/default/lang/ja_utf8.mo diff --git a/www/libs/db_pgsql.inc b/www/libs/db_pgsql.inc index ee143c5b..13715d9c 100644 --- a/www/libs/db_pgsql.inc +++ b/www/libs/db_pgsql.inc @@ -41,7 +41,6 @@ class db_pgsql { private $last_error_query; private $dbh; -// public $currval_query; // METHOD: __construct // PARAMS: none @@ -227,7 +226,6 @@ class db_pgsql } $seq = (($schema) ? $schema.'.' : '').$table."_".$pk_name."_seq"; $q = "SELECT CURRVAL('$seq') AS insert_id"; - // $this->currval_query = $q; // I have to do manually or I overwrite the original insert internal vars ... if ($q = $this->_db_query($q)) { list($id) = $this->_db_fetch_array($q); diff --git a/www/smarty-3.1.27/plugins/function.html_checkboxes.php b/www/smarty-3.1.27/plugins/function.html_checkboxes.php index 1d710ae7..82e93300 100644 --- a/www/smarty-3.1.27/plugins/function.html_checkboxes.php +++ b/www/smarty-3.1.27/plugins/function.html_checkboxes.php @@ -91,19 +91,21 @@ function smarty_function_html_checkboxes($params, $template) if (method_exists($_sel, "__toString")) { $_sel = smarty_function_escape_special_chars((string) $_sel->__toString()); } else { - trigger_error("html_checkboxes: selected attribute contains an object of class '" . get_class($_sel) . "' without __toString() method", E_USER_NOTICE); + trigger_error("html_checkboxes: selected attribute contains an object of class '" . + get_class($_sel) . "' without __toString() method", E_USER_NOTICE); continue; } } else { $_sel = smarty_function_escape_special_chars((string) $_sel); } - $selected[$_sel] = true; + $selected[ $_sel ] = true; } } elseif (is_object($_val)) { if (method_exists($_val, "__toString")) { $selected = smarty_function_escape_special_chars((string) $_val->__toString()); } else { - trigger_error("html_checkboxes: selected attribute is an object of class '" . get_class($_val) . "' without __toString() method", E_USER_NOTICE); + trigger_error("html_checkboxes: selected attribute is an object of class '" . get_class($_val) . + "' without __toString() method", E_USER_NOTICE); } } else { $selected = smarty_function_escape_special_chars((string) $_val); @@ -111,7 +113,8 @@ function smarty_function_html_checkboxes($params, $template) break; case 'checkboxes': - trigger_error('html_checkboxes: the use of the "checkboxes" attribute is deprecated, use "options" instead', E_USER_WARNING); + trigger_error('html_checkboxes: the use of the "checkboxes" attribute is deprecated, use "options" instead', + E_USER_WARNING); $options = (array) $_val; break; @@ -127,9 +130,10 @@ function smarty_function_html_checkboxes($params, $template) case 'disabled': case 'readonly': - if (!empty($params['strict'])) { + if (!empty($params[ 'strict' ])) { if (!is_scalar($_val)) { - trigger_error("html_options: $_key attribute must be a scalar, only boolean true or string '$_key' will actually add the attribute", E_USER_NOTICE); + trigger_error("html_options: $_key attribute must be a scalar, only boolean true or string '$_key' will actually add the attribute", + E_USER_NOTICE); } if ($_val === true || $_val === $_key) { @@ -158,25 +162,30 @@ function smarty_function_html_checkboxes($params, $template) if (isset($options)) { foreach ($options as $_key => $_val) { - $_pos = isset($pos[$_key]) ? $pos[$_key] : ''; - $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $_pos, $escape); + $_pos = isset($pos[ $_key ]) ? $pos[ $_key ] : ''; + $_html_result[] = + smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels, + $label_ids, $_pos, $escape); } } else { foreach ($values as $_i => $_key) { - $_val = isset($output[$_i]) ? $output[$_i] : ''; - $_pos = isset($pos[$_i]) ? $pos[$_i] : ''; - $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $_pos, $escape); + $_val = isset($output[ $_i ]) ? $output[ $_i ] : ''; + $_pos = isset($pos[ $_i ]) ? $pos[ $_i ] : ''; + $_html_result[] = + smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels, + $label_ids, $_pos, $escape); } } - if (!empty($params['assign'])) { - $template->assign($params['assign'], $_html_result); + if (!empty($params[ 'assign' ])) { + $template->assign($params[ 'assign' ], $_html_result); } else { return implode("\n", $_html_result); } } -function smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids, $pos, $escape = true) +function smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels, + $label_ids, $pos, $escape = true) { $_output = ''; @@ -184,7 +193,8 @@ function smarty_function_html_checkboxes_output($name, $value, $output, $selecte if (method_exists($value, "__toString")) { $value = (string) $value->__toString(); } else { - trigger_error("html_options: value is an object of class '" . get_class($value) . "' without __toString() method", E_USER_NOTICE); + trigger_error("html_options: value is an object of class '" . get_class($value) . + "' without __toString() method", E_USER_NOTICE); return ''; } @@ -196,7 +206,8 @@ function smarty_function_html_checkboxes_output($name, $value, $output, $selecte if (method_exists($output, "__toString")) { $output = (string) $output->__toString(); } else { - trigger_error("html_options: output is an object of class '" . get_class($output) . "' without __toString() method", E_USER_NOTICE); + trigger_error("html_options: output is an object of class '" . get_class($output) . + "' without __toString() method", E_USER_NOTICE); return ''; } @@ -206,7 +217,8 @@ function smarty_function_html_checkboxes_output($name, $value, $output, $selecte if ($labels) { if ($label_ids) { - $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!' . Smarty::$_UTF8_MODIFIER, '_', $name . '_' . $value)); + $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!' . Smarty::$_UTF8_MODIFIER, '_', + $name . '_' . $value)); $_output .= '