Example #1
0
function prettyPrintLastJump($jump)
{
    error_log($jump, true);
    $label = trimPageTitle(get_first_heading($jump['page']), 40);
    if (isset($jump['section'])) {
        $label = $jump['section'] . ' <sub>(' . substr($label, 0, 5) . '...)</sub>';
    }
    return $label;
}
Example #2
0
function processTrailArrayForPrinting($trail)
{
    $data = array();
    foreach ($trail as $jump) {
        $pageId = $jump['page'];
        $name = noNSorNS($pageId);
        $title = get_first_heading($pageId);
        if (isset($title)) {
            $name = $title;
        }
        $r['id'] = $pageId;
        $r['section'] = $jump['section'];
        $r['name'] = $name;
        $r['flag'] = $jump['flag'];
        $data[] = $r;
    }
    return $data;
}