mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-06-10 05:10:19 +00:00
Add some error avoidance to SetLookup.
This commit is contained in:
parent
22a6b10edb
commit
8bb9a45cbb
@ -25,7 +25,7 @@ class EditorField
|
||||
var $LookupSql;
|
||||
var $OptionList;
|
||||
|
||||
function EditorField( $field, $sql="", $lookup_sql="" ) {
|
||||
function __construct( $field, $sql="", $lookup_sql="" ) {
|
||||
global $session;
|
||||
$this->Field = $field;
|
||||
$this->Sql = $sql;
|
||||
@ -116,7 +116,7 @@ class Editor
|
||||
var $SubmitName;
|
||||
var $Id;
|
||||
|
||||
function Editor( $title = "", $fields = null ) {
|
||||
function __construct( $title = "", $fields = null ) {
|
||||
global $c, $session, $form_id_increment;
|
||||
$this->Title = $title;
|
||||
$this->Order = "";
|
||||
@ -156,7 +156,9 @@ class Editor
|
||||
}
|
||||
|
||||
function SetLookup( $field, $lookup_sql ) {
|
||||
$this->Fields[$field]->SetLookup( $lookup_sql );
|
||||
if (is_object($this->Fields[$field])) {
|
||||
$this->Fields[$field]->SetLookup( $lookup_sql );
|
||||
}
|
||||
}
|
||||
|
||||
function Value( $value_field_name ) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user