Skip to content
This repository was archived by the owner on Nov 28, 2017. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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