public function frontendping($custom = false, $hash = null)
 {
     global $aecConfig;
     if (!empty($aecConfig->cfg['disable_regular_heartbeat']) && empty($custom)) {
         return;
     }
     if (empty($aecConfig->cfg['allow_frontend_heartbeat']) && !empty($custom)) {
         return;
     }
     if (!empty($custom) && !empty($aecConfig->cfg['custom_heartbeat_securehash'])) {
         if (empty($hash)) {
             return;
         } elseif ($hash != $aecConfig->cfg['custom_heartbeat_securehash']) {
             $short = 'custom heartbeat failure';
             $event = 'Custom Frontend Heartbeat attempted, but faile due to false hashcode: "' . $hash . '"';
             $tags = 'heartbeat, failure';
             $params = array();
             $eventlog = new eventLog();
             $eventlog->issue($short, $tags, $event, 128, $params);
             return;
         }
     }
     if (!empty($aecConfig->cfg['allow_frontend_heartbeat']) && !empty($custom)) {
         aecHeartbeat::ping(0);
     } elseif (!empty($aecConfig->cfg['heartbeat_cycle'])) {
         aecHeartbeat::ping($aecConfig->cfg['heartbeat_cycle']);
     }
 }