public function sendNotificationIfUpdatesAvailable()
    {
        $pluginsHavingUpdate = $this->getPluginsHavingUpdate();

        if (empty($pluginsHavingUpdate)) {
            return;
        }

        $pluginsToBeNotified = array();

        foreach ($pluginsHavingUpdate as $plugin) {
            if ($this->hasNotificationAlreadyReceived($plugin)) {
                continue;
            }

            $this->setHasLatestUpdateNotificationReceived($plugin);

            $pluginsToBeNotified[] = $plugin;
        }

        if (!empty($pluginsToBeNotified)) {
            $this->sendNotifications($pluginsToBeNotified);
        }
    }
public function sendNotificationIfUpdatesAvailable()
    {
        $pluginsHavingUpdate = $this->getPluginsHavingUpdate();

        if (empty($pluginsHavingUpdate)) {
            return;
        }

        $pluginsToBeNotified = array();

        foreach ($pluginsHavingUpdate as $plugin) {
            if ($this->hasNotificationAlreadyReceived($plugin)) {
                continue;
            }

            $this->setHasLatestUpdateNotificationReceived($plugin);

            $pluginsToBeNotified[] = $plugin;
        }

        if (!empty($pluginsToBeNotified)) {
            $this->sendNotifications($pluginsToBeNotified);
        }
    }
public function sendNotificationIfUpdatesAvailable ( ) { $ pluginsHavingUpdate = $ this -> getPluginsHavingUpdate ( ) ; if ( empty ( $ pluginsHavingUpdate ) ) { return ; } $ pluginsToBeNotified = array ( ) ; foreach ( $ pluginsHavingUpdate as $ plugin ) { if ( $ this -> hasNotificationAlreadyReceived ( $ plugin ) ) { continue ; } $ this -> setHasLatestUpdateNotificationReceived ( $ plugin ) ; $ pluginsToBeNotified [ ] = $ plugin ; } if ( ! empty ( $ pluginsToBeNotified ) ) { $ this -> sendNotifications ( $ pluginsToBeNotified ) ; } }
Sends an email to all super users if there is an update available for any plugins from the Marketplace.
For each update we send an email only once.

@return bool
Sends an email to all super users if there is an update available for any plugins from the Marketplace . For each update we send an email only once .