Esempio n. 1
0
File: utils.php Progetto: yunter/crm
/** Function to return block name
 * @param Integer -- $blockid
 * @return String - Block Name
 */
function getBlockName($blockid)
{
    global $adb;
    $blockname = VTCacheUtils::lookupBlockLabelWithId($blockid);
    if (!empty($blockid) && $blockname === false) {
        $block_res = $adb->pquery('SELECT blocklabel FROM vtiger_blocks WHERE blockid = ?', array($blockid));
        if ($adb->num_rows($block_res)) {
            $blockname = $adb->query_result($block_res, 0, 'blocklabel');
        } else {
            $blockname = '';
        }
        VTCacheUtils::updateBlockLabelWithId($blockname, $blockid);
    }
    return $blockname;
}