Resource icon

xF1 Guides HowTo Null Brivuim.txt Howto by Speddy 1.0.0

No permission to download
  • Author Author speddy
  • Creation date Creation date
Compatible XF Versions
  1. 1.2
  2. 1.3
  3. 1.4
  4. 1.5
Screenshot_1.png


Screenshot_2.png



Then, here in the file:

Code:
protected $_licenseData = null;
protected $_lcUrl = 'http://brivium.com/index.php?license';
protected function _checkLicense()
{
if(!$response = $this->_validateLicense($errorString)){
throw new XenForo_Exception($errorString, true);
}
if(!empty($response['valid'])){
$this->_initData();
}else{
throw new XenForo_Exception('Invalid data response from server. Please contact Brivium Administrator for more information.');
}
}
 
protected function _validateLicense(&$errorString)
{
$addOnToInstall = $this->getAddOnToInstall();
try
{
$validator = XenForo_Helper_Http::getClient($this->_lcUrl);
$paths = XenForo_Application::get('requestPaths');
$domain = !empty($paths['host'])?$paths['host']:'';
$validator->setParameterPost('domain', $domain);
$validator->setParameterPost('addOnData', $addOnToInstall);
$validatorResponse = $validator->request('POST');
$response = $validatorResponse->getBody();
$response = trim($response);
if(!$validatorResponse || !$response || ($response != serialize(false) && @unserialize($response) === false) || $validatorResponse->getStatus() != 200)
{
$errorString = 'Request not validated';
return false;
}
if($response == serialize(false) || @unserialize($response) !== false){
$response = @unserialize($response);
}
if($response['error']){
$errorString = $response['error'];
return false;
}
return $response;
}
catch (Zend_Http_Client_Exception $e)
{
$errorString = 'Connection to Brivium server failed';
return false;
}
}

Delete and:
Code:
 public function initialize($existingAddOn = array(), $addOnToInstall = array(), $triggerType = 'install')
{
$this->_triggerType = $triggerType;
$this->_existingAddOn = $existingAddOn;
$this->_addOnToInstall = $addOnToInstall;
$this->_versionId = !empty($addOnToInstall['version_id'])?$addOnToInstall['version_id']:0;
$this->_existingVersionId = !empty($existingAddOn['version_id'])?$existingAddOn['version_id']:0;
 
if($triggerType=='install' && !$existingAddOn && $this->_installerType==1){
$this->_checkLicense();
}else{
$this->_initData();
}
}

Change to :
Code:
 public function initialize($existingAddOn = array(), $addOnToInstall = array(), $triggerType = 'install')
{
$this->_triggerType = $triggerType;
$this->_existingAddOn = $existingAddOn;
$this->_addOnToInstall = $addOnToInstall;
$this->_versionId = !empty($addOnToInstall['version_id'])?$addOnToInstall['version_id']:0;
$this->_existingVersionId = !empty($existingAddOn['version_id'])?$existingAddOn['version_id']:0;
 
if($triggerType=='install' && !$existingAddOn && $this->_installerType==1){
$this->_initData();
}
}

Finished.
Author
speddy
Size
3.5 KB
Extension
txt
Downloads
7
Views
1,761
First release
Last update

Latest reviews

This tutorial is very excellent! Removal the callback for license! Thanks for help!
S
speddy
Yes and Thanks
731Threads
2,287Messages
63,890Members
adefreitasLatest member
Back