I suspect the GetMacroItem() call is needed in the nUI6 code, too, to make it work with all macros.
EDIT: See if this code block works...
Code:
-- is there a cooldown on the action and what is the name of the action itself?
if buttonDetail.isPetButton then
spellName = GetPetActionInfo( button:GetID() );
spellType, spellId = spellName and GetSpellBookItemInfo( spellName, "pet" );
caster = UnitExists( "vehicle" ) and "vehicle" or "pet";
else
spellType, spellId = GetActionInfo( button.action );
caster = "player";
if spellType == "macro" then
local item = spellId and GetMacroItem( spellId );
spellName = (item and GetItemSpell( item )) or (spellId and GetMacroSpell( spellId ));
else
spellName = spellId and GetSpellInfo( spellId );
end
end
if spellName then
start, duration, enable = GetSpellCooldown( spellName );
end