Minor - Declare $fieldId attribute to ExtraFieldOption class - #scrutinizer

pull/2487/head
Yannick Warnier 9 years ago
parent ff051d15e8
commit 3e8fd23792
  1. 2
      main/admin/extra_field_options.php
  2. 5
      main/inc/lib/extra_field_option.lib.php

@ -134,7 +134,7 @@ Display::display_header($tool_name);
echo Display::page_header($extra_field_info['display_text']);
$obj = new ExtraFieldOption($extra_field->type);
$obj->field_id = $field_id;
$obj->fieldId = $field_id;
// Action handling: Add
switch ($action) {

@ -19,6 +19,7 @@ class ExtraFieldOption extends Model
);
public $extraField;
public $fieldId;
/**
* Gets the table for the type of object for which we are using an extra field
@ -114,7 +115,7 @@ class ExtraFieldOption extends Model
* Delete all the options of a specific field
* @param int $field_id
*
* @result void
* @return void
* @assert (-1) === false
*/
public function delete_all_options_by_field_id($field_id)
@ -653,7 +654,7 @@ class ExtraFieldOption extends Model
$form->addElement('hidden', 'id', $id);
$form->addElement('hidden', 'type', $this->type);
$form->addElement('hidden', 'field_id', $this->field_id);
$form->addElement('hidden', 'field_id', $this->fieldId);
if ($action == 'edit') {
$translateUrl = api_get_path(WEB_CODE_PATH).'extrafield/translate.php?'.http_build_query([

Loading…
Cancel
Save