diff --git a/e107_admin/theme.php b/e107_admin/theme.php index b43e28f63..275870f08 100644 --- a/e107_admin/theme.php +++ b/e107_admin/theme.php @@ -73,6 +73,12 @@ if(e_AJAX_REQUEST) { switch ($_GET['action']) { + case 'login': + $mp = $themec->getMarketplace(); + echo $mp->renderLoginForm(); + exit; + break; + case 'download': $string = base64_decode($_GET['src']); parse_str($string, $p); diff --git a/e107_handlers/e_marketplace.php b/e107_handlers/e_marketplace.php index 1dc7c2aac..12fd721d2 100644 --- a/e107_handlers/e_marketplace.php +++ b/e107_handlers/e_marketplace.php @@ -38,6 +38,10 @@ class e_marketplace */ public function generateAuthKey($username, $password) { + if(trim($username) == '' || trim($password) == '') + { + return false; + } $this->setAuthKey($this->makeAuthKey($username, $password, true)); return $this; } @@ -65,6 +69,92 @@ class e_marketplace if($plain && !empty($password)) $password = md5($password); return sha1($username.$password.$now); } + + + + /** + * Have the admin enter their e107.org login details in order to create the authorization key. + */ + public function renderLoginForm() + { + + $text = ' +