public function upgradeCheck($warnings)
    {
        if (!User::can(Rbac::ROLE_ADMIN)) {
            return false;
        }
        if ($warnings) {
            foreach ($warnings as $warning) {
                if ($warning === static::warnings()['old_version']) {
                    return false;
                }
                if ($warning === static::warnings()['new_version']) {
                    return false;
                }
            }
        }
        $result = Helper::compareVersions(
            explode('.', $this->module->version),
            explode('.', $this->module->podiumConfig->get('version'))
        );
        if ($result === '>') {
            $this->warning(static::warnings()['old_version'], false);
        } elseif ($result === '<') {
            $this->warning(static::warnings()['new_version'], false);
        }
        return false;
    }
public function upgradeCheck($warnings)
    {
        if (!User::can(Rbac::ROLE_ADMIN)) {
            return false;
        }
        if ($warnings) {
            foreach ($warnings as $warning) {
                if ($warning === static::warnings()['old_version']) {
                    return false;
                }
                if ($warning === static::warnings()['new_version']) {
                    return false;
                }
            }
        }
        $result = Helper::compareVersions(
            explode('.', $this->module->version),
            explode('.', $this->module->podiumConfig->get('version'))
        );
        if ($result === '>') {
            $this->warning(static::warnings()['old_version'], false);
        } elseif ($result === '<') {
            $this->warning(static::warnings()['new_version'], false);
        }
        return false;
    }
public function upgradeCheck ( $ warnings ) { if ( ! User :: can ( Rbac :: ROLE_ADMIN ) ) { return false ; } if ( $ warnings ) { foreach ( $ warnings as $ warning ) { if ( $ warning === static :: warnings ( ) [ 'old_version' ] ) { return false ; } if ( $ warning === static :: warnings ( ) [ 'new_version' ] ) { return false ; } } } $ result = Helper :: compareVersions ( explode ( '.' , $ this -> module -> version ) , explode ( '.' , $ this -> module -> podiumConfig -> get ( 'version' ) ) ) ; if ( $ result === '>' ) { $ this -> warning ( static :: warnings ( ) [ 'old_version' ] , false ) ; } elseif ( $ result === '<' ) { $ this -> warning ( static :: warnings ( ) [ 'new_version' ] , false ) ; } return false ; }
Performs upgrade check.
@param array $warnings Flash warnings
@return bool
@since 0.2
Performs upgrade check .