Jump to content
WebFlake

How to null your 4.0 beta/pre-release


Decon

Recommended Posts

beta 6:

init.php

change 

 

public static function checkLicenseKey( $val, $url )
{
$test = FALSE;
if ( mb_substr( $val, -12 ) === '-TESTINSTALL' )
{
$test = TRUE;
$val = mb_substr( $val, 0, -12 );
}
$urlKey = $test ? 'test_url' : 'url';
 
try
{
$response = IPSHttpUrl::ips( 'license/' . $val )->setQueryString( $urlKey, $url )->request()->get();
switch ( $response->httpResponseCode )
{
case 200:
$response = json_decode( $response, TRUE );
if ( $response['legacy'] )
{
throw new DomainException( 'license_key_legacy' );
}
 
/* Previously, URL's were stored as http://domain.com/forums - this check here may throw a "key already in use" error if upgrading or setting up a test install */
if ( rtrim( $response[ $urlKey ], '/' ) !== rtrim( $url, '/' ) )
{
if ( $response[ $urlKey ] )
{
throw new DomainException( $test ? 'license_key_test_active' : 'license_key_active' );
}
else
{
IPSHttpUrl::ips( 'license/' . $val )->request()->post( array(
$urlKey => $url
) );
}
}
break;
 
case 404:
throw new DomainException( 'license_key_not_found' );
 
default:
throw new DomainException( 'license_server_error' );
}
}
catch ( IPSHttpRequestException $e )
{
throw new DomainException( 'license_server_error' );
}
}
to

public static function checkLicenseKey( $val, $url )
	{
		/*$test = FALSE;
		if ( mb_substr( $val, -12 ) === '-TESTINSTALL' )
		{
			$test = TRUE;
			$val = mb_substr( $val, 0, -12 );
		}
		$urlKey = $test ? 'test_url' : 'url';
				
		try
		{
			$response = IPSHttpUrl::ips( 'license/' . $val )->setQueryString( $urlKey, $url )->request()->get();
			switch ( $response->httpResponseCode )
			{
				case 200:
					$response = json_decode( $response, TRUE );
					if ( $response['legacy'] )
					{
						throw new DomainException( 'license_key_legacy' );
					}
					
					/* Previously, URL's were stored as http://domain.com/forums - this check here may throw a "key already in use" error if upgrading or setting up a test install 
					if ( rtrim( $response[ $urlKey ], '/' ) !== rtrim( $url, '/' ) )
					{
						if ( $response[ $urlKey ] )
						{
							throw new DomainException( $test ? 'license_key_test_active' : 'license_key_active' );
						}
						else
						{
							IPSHttpUrl::ips( 'license/' . $val )->request()->post( array(
								$urlKey	=> $url
							) );
						}
					}
					break;
					
				case 404:
					throw new DomainException( 'license_key_not_found' );
				
				default:
					throw new DomainException( 'license_server_error' );
			}
		}
		catch ( IPSHttpRequestException $e )
		{
			throw new DomainException( 'license_server_error' );
		}*/
	}
systemOutputOutput.php

change

public function licenseKeyWarning()
	{
	        if ( !IPSSettings::i()->ipb_reg_number and IPSMember::loggedIn()->hasAcpRestriction( 'core', 'settings', 'licensekey_manage' ) )
		{
			return 'none';
		}
		else
		{
			$licenseKey = IPSIPS::licenseKey();
			if ( ( $licenseKey === NULL or ( isset( $licenseKey['legacy'] ) and $licenseKey['legacy'] ) ) and IPSMember::loggedIn()->hasAcpRestriction( 'core', 'settings', 'licensekey_manage' ) )
			{
				return 'none';
			}
			elseif ( ( ( $licenseKey['expires'] and strtotime( $licenseKey['expires'] ) < time() ) or ! isset( $licenseKey['active'] ) or !$licenseKey['active'] ) and IPSMember::loggedIn()->hasAcpRestriction( 'core', 'settings', 'licensekey_manage' ) )
			{
				return 'expired';
			}
		}
		
		return NULL;
	}
to

public function licenseKeyWarning()
	{
		/*if ( !IPSSettings::i()->ipb_reg_number and IPSMember::loggedIn()->hasAcpRestriction( 'core', 'settings', 'licensekey_manage' ) )
		{
			return 'none';
		}
		else
		{
			$licenseKey = IPSIPS::licenseKey();
			if ( ( $licenseKey === NULL or ( isset( $licenseKey['legacy'] ) and $licenseKey['legacy'] ) ) and IPSMember::loggedIn()->hasAcpRestriction( 'core', 'settings', 'licensekey_manage' ) )
			{
				return 'none';
			}
			elseif ( ( ( $licenseKey['expires'] and strtotime( $licenseKey['expires'] ) < time() ) or ! isset( $licenseKey['active'] ) or !$licenseKey['active'] ) and IPSMember::loggedIn()->hasAcpRestriction( 'core', 'settings', 'licensekey_manage' ) )
			{
				return 'expired';
			}
		}*/
		
		return NULL;
	}
Edited by m000
  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...

I currently have RC1 (well I'm pretty sure I do... it's not really helpful since they removed the version counter from the footer and files :<)  installed with changes done to my init.php file that should fix this issue (it's working for me atm... at least).

 

Try these changes as I've published it to diffchecker:

https://www.diffchecker.com/vg8i4n2p

Let me know if this works ;3

  • Upvote 2
Link to comment
Share on other sites

I currently have RC1 (well I'm pretty sure I do... it's not really helpful since they removed the version counter from the footer and files :<)  installed with changes done to my init.php file that should fix this issue (it's working for me atm... at least).

 

Try these changes as I've published it to diffchecker:

https://www.diffchecker.com/vg8i4n2p

Let me know if this works ;3

Its working on RC2 :3

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
×
×
  • Create New...