Skip to content

Commit

Permalink
Fixed resource create
Browse files Browse the repository at this point in the history
  • Loading branch information
W1W1-M committed Feb 15, 2024
1 parent c97e375 commit 1b5ea15
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion htdocs/resource/class/dolresource.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,21 @@ public function create(User $user, int $no_trigger = 0)
$error = 0;

// Clean parameters
$new_resource_values = [$this->ref, $this->address, $this->zip, $this->town, $this->description, $this->country_id, $this->state_id, $this->fk_code_type_resource, $this->note_public, $this->note_private];
$new_resource_values = [
$this->ref,
$this->address,
$this->zip,
$this->town,
$this->country_id,
$this->state_id,
$this->description,
$this->phone,
$this->email,
$this->max_users,
$this->fk_code_type_resource,
$this->note_public,
$this->note_private
];
foreach ($new_resource_values as $key => $value) {
if (isset($value)) {
$new_resource_values[$key] = trim($value);
Expand Down

0 comments on commit 1b5ea15

Please sign in to comment.