CMS MADE SIMPLE FORGE

Utilities

 

[#12611] editContentTabs should (for the moement) be consistent between tab/fields, ie only use position instead of keywords

avatar
Created By: atz (atz6975)
Date Submitted: Sun Apr 09 07:09:57 -0400 2023

Assigned To: Chris Taylor (chrisbt)
Version: v1.6.1
CMSMS Version: 2.2.16
Severity: Minor
Resolution: None
State: Open
Summary:
editContentTabs should (for the moement) be consistent between tab/fields, ie only use position instead of keywords
Detailed Description:
{editContentTabs debug=1 move_fields='Options,1,Main,1|Options,2,Main,2'} Only
works in English backend.
One could "repeat" the instruction in French aswell.
Also I had to intval the position : $fromPos = intval(trim(trim($tmp[1], '"'),
"'"));
Otherwise the if ( $fromTab && $toTab && is_integer($fromPos) &&
is_integer($toPos) ) expression doesn't work.
This is actually very strange because I have two sites side by side (same host
and php), one is_integer works , other doesn't.
With "intval" it is consistent on both sites


History

Comments
avatar
Date: 2023-04-09 23:55
Posted By: atz (atz6975)

After some php doc reading, it seems is_numeric is the solution instead of
intval+is_integer
      
avatar
Date: 2023-04-10 02:38
Posted By: Chris Taylor (chrisbt)

OK many thanks. I'll look at updating later in the month.
      
avatar
Date: 2024-03-12 22:05
Posted By: John Beatrice (mww)

Hi Chris - I can confirm that is_integer does not always work.
Moving to is_numeric does work.

if ( $fromTab && $toTab && is_numeric($fromPos) && is_numeric($toPos) ) {

/// do stuff
}
      
Updates

Updated: 2023-04-09 23:55
resolution_id: => 5