Unpack a quicktabs row array from the database.

2 calls to _quicktabs_unpack()
quicktabs_get_all_quicktabs in ./quicktabs.module
Load all from defaults and database quicktabs.
quicktabs_load in ./quicktabs.module
Load the quicktabs data.

File

./quicktabs.module, line 187

Code

function _quicktabs_unpack($quicktab) {
    $tabs = unserialize($quicktab->tabs);
    $weight = array();
    foreach ($tabs as $key => $tab) {
        $weight[$key] = $tab['weight'];
        if ($tab['type'] == 'qtabs' && $tab['machine_name'] == $quicktab->machine_name) {
            unset($tabs[$key]);
            unset($weight[$key]);
        }
    }
    array_multisort($weight, SORT_ASC, $tabs);
    $quicktab->tabs = $tabs;
    drupal_alter('quicktabs', $quicktabs);
    return $quicktab;
}