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']); echo Display::page_header($extra_field_info['display_text']);
$obj = new ExtraFieldOption($extra_field->type); $obj = new ExtraFieldOption($extra_field->type);
$obj->field_id = $field_id; $obj->fieldId = $field_id;
// Action handling: Add // Action handling: Add
switch ($action) { switch ($action) {

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

Loading…
Cancel
Save