예제 #1
0
 /**
  * @param Boolean $display_service_notifications
  * @return Boolean
  */
 public static function checkForUpgrade($display_service_notifications = true)
 {
     $is_upgradable = false;
     $user_have_upgrade_priveleges = isset($_SESSION['auth']) && $_SESSION['auth']['area'] == 'A' && !empty($_SESSION['auth']['user_id']) && fn_check_user_access($_SESSION['auth']['user_id'], 'upgrade_store');
     if ($user_have_upgrade_priveleges) {
         $is_upgradable = !fn_twg_is_on_saas() && TwigmoConnector::checkUpdates();
         TwigmoConnector::updateUARules();
         if (TwigmoConnector::getAccessID('A')) {
             $connector = new TwigmoConnector();
             $connector->updateConnections();
             self::displayServiceNotifications(array('display_service_notifications' => $display_service_notifications, 'connector' => $connector));
         }
         UserAgent::sendUaStat();
     }
     return $is_upgradable;
 }