Skip to content
This repository has been archived by the owner on Nov 28, 2017. It is now read-only.

Rename en-GB.en-GB.plg_system_jefreg.ini to en-GB.plg_system_jefreg.ini #2

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
6 changes: 3 additions & 3 deletions plugins/system/jefreg/jefreg.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private function isDataOK()
$jefreg = $this->getJEFReg();

// Use JFormRuleUrl to check if $_POST['installat'] is valid URL
$field = new SimpleXMLElement('<field></field>');
$field = new SimpleXMLElement('<field required="true"></field>');
$rule = new JFormRuleUrl;
return $rule->test($field, $jefreg['installat']) &&
$this->getInstallFrom($jefreg['installapp']);
Expand Down Expand Up @@ -169,7 +169,7 @@ private function getInstallFrom($appid)
// Basic clean up of 'files' parameter as set in plugin options
$files = $this->params->get('files', null);
$files = preg_replace('/\s*=\s*>\s*/', '=>', $files);
$files = preg_replace('/^\s*\**\s*/', '*', $files);
$files = preg_replace('/[^\S\n]*\*\s*/', '*', $files);
$files = preg_split('/\s+/', $files);

// Match the $_POST value of the JED ID [$appid] with the extensions available on the server
Expand All @@ -183,7 +183,7 @@ private function getInstallFrom($appid)
$installfrom = '&installfrom='.base64_encode($matches[1].'&sessid='.session_id());
}
// Check for file that is available after purchase
elseif (preg_match('/^\*.*:'.$appid.'=>(.+)/', trim($f), $matches))
elseif (preg_match('/^\*.*'.$appid.'=>(.+)/', trim($f), $matches))
{
// If found, set commercial flag ON
$this->setCommercialOn();
Expand Down