Fixes for php 8.2
This commit is contained in:
parent
29faed4b35
commit
6c4ca64e43
9 changed files with 36 additions and 8 deletions
|
|
@ -160,7 +160,7 @@ function padminConsole($options)
|
|||
{
|
||||
|
||||
//echo "Error, please, check ${post_install_script} file and execute padmin.php again\n";
|
||||
$climate->white()->backgroundRed()->out("Error, please, check ${post_install_script} file and execute padmin.php again");
|
||||
$climate->white()->backgroundRed()->out("Error, please, check {$post_install_script} file and execute padmin.php again");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ class MoneyField extends DoubleField{
|
|||
static function currency_format($value, $symbol_currency='€')
|
||||
{
|
||||
|
||||
settype($value, 'integer');
|
||||
|
||||
return number_format($value, 2, MoneyField::$dec_point, MoneyField::$thousands_sep).' '.$symbol_currency;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ class ParentField extends IntegerField{
|
|||
|
||||
//field related in the model...
|
||||
public $parent_model='';
|
||||
public $name_field='';
|
||||
public $name_value='';
|
||||
|
||||
function __construct($size=11, $name_field='', $name_value='')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ use PhangoApp\PhaI18n\I18n;
|
|||
|
||||
class PasswordField extends CharField {
|
||||
|
||||
public $min_length;
|
||||
|
||||
function __construct($size=255)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -24,6 +24,17 @@ class BaseForm {
|
|||
*/
|
||||
|
||||
public $enctype=0;
|
||||
public $label='';
|
||||
public $name='';
|
||||
public $default_value='';
|
||||
public $css='';
|
||||
public $type='text';
|
||||
public $required=0;
|
||||
public $field;
|
||||
public $comment_form='';
|
||||
public $txt_error='';
|
||||
public $extra_param='';
|
||||
public $form;
|
||||
|
||||
public function __construct($name, $value, $extra_parameters=array())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ use PhangoApp\PhaUtils\Utils;
|
|||
|
||||
class FileForm extends BaseForm{
|
||||
|
||||
public $file_url;
|
||||
|
||||
public function __construct($name, $value='')
|
||||
{
|
||||
|
||||
|
|
@ -29,8 +31,6 @@ class FileForm extends BaseForm{
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ class SelectModelForm extends SelectForm{
|
|||
|
||||
public $empty_value=true;
|
||||
|
||||
public $form;
|
||||
|
||||
public function __construct($name, $value, $model, $field_name, $field_value)
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,10 @@ class SelectModelFormByOrder extends SelectForm {
|
|||
public $model_name;
|
||||
public $identifier_field;
|
||||
public $field_parent;
|
||||
public $model;
|
||||
public $where;
|
||||
public $null_yes;
|
||||
public $form;
|
||||
|
||||
public function __construct($name, $value, $model, $identifier_field, $field_parent, $where=['WHERE 1=1', []], $null_yes=1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class Webmodel {
|
|||
* String where save the query if error.
|
||||
*/
|
||||
|
||||
static public $save_query=array();
|
||||
static public $save_query=0;
|
||||
|
||||
/**
|
||||
* Variable for the db prefix. For security, change this always.
|
||||
|
|
@ -486,7 +486,8 @@ class Webmodel {
|
|||
|
||||
Webmodel::$model[$name_model]=&$this;
|
||||
|
||||
Webmodel::$m->$name_model=&Webmodel::$model[$name_model];
|
||||
//Webmodel::$m->$name_model=&Webmodel::$model[$name_model];
|
||||
//Webmodel::$m->__set($name_model, Webmodel::$model[$name_model]);
|
||||
|
||||
Webmodel::$model_type[get_class($this)]=1;
|
||||
|
||||
|
|
@ -2616,13 +2617,18 @@ class Webmodel {
|
|||
}
|
||||
|
||||
//A simple shortcut for access to models
|
||||
|
||||
/*
|
||||
class SuperModel {
|
||||
|
||||
public function __set(string $name, mixed $value) {
|
||||
|
||||
echo $name;
|
||||
$this->{$name}=&$value;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Webmodel::$m=new SuperModel();
|
||||
Webmodel::$m=new SuperModel();*/
|
||||
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue