Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX : Missing hooks extrafields : addExtraField, update, delete #29678

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

atm-irvine
Copy link
Contributor

FIX|Fix Missing hooks extrafields : addExtraField, update, delete

I added a few missing hooks to better handle extra fields, because update is here but create and delete no.

@eldy
Copy link
Member

eldy commented May 15, 2024

As this change the structure and behaviour of the framework, this must be pushed on develop.

@eldy eldy changed the base branch from 14.0 to develop May 15, 2024 13:54

$field_desc = array('type' => $typedb, 'value' => $lengthdb, 'null' => ($required ? 'NOT NULL' : 'NULL'), 'default' => $default);

if ($type != 'separate') { // No table update when separate type
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why moving this before the hook ?

@@ -243,13 +243,16 @@ public function __construct($db)
*/
public function addExtraField($attrname, $label, $type, $pos, $size, $elementtype, $unique = 0, $required = 0, $default_value = '', $param = '', $alwayseditable = 0, $perms = '', $list = '-1', $help = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0, $printable = 0)
{
global $hookmanager, $action;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no reason to add $action here to add a missing hook.

@eldy eldy added the PR to fix or conflict to solve PR needs to be fixed to be integrated (except for conflicts, a comment describes the fix to do) label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR to fix or conflict to solve PR needs to be fixed to be integrated (except for conflicts, a comment describes the fix to do)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants