1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-12 17:44:37 +02:00

Theme download/unzip method reactivated.

This commit is contained in:
Cameron
2015-02-10 12:57:38 -08:00
parent fc7e563cbe
commit e745a2398a
2 changed files with 40 additions and 4 deletions

View File

@@ -72,6 +72,11 @@ h2 { text-align: right; margin-bottom: -30px; padding-right: 10px; }
require_once(e_HANDLER."theme_handler.php");
$themec = new themeHandler;
$mode = varset($_GET['mode'],'main'); // (e_QUERY) ? e_QUERY :"main" ;
if(e_AJAX_REQUEST)
{
define('e_IFRAME',true);
@@ -170,9 +175,35 @@ else
$mode = varset($_GET['mode'],'main'); // (e_QUERY) ? e_QUERY :"main" ;
if(vartrue($_POST['selectadmin']))
if($mode == 'download' && !empty($_GET['src']))
{
define('e_IFRAME', true);
$frm = e107::getForm();
$mes = e107::getMessage();
$string = base64_decode($_GET['src']);
parse_str($string, $data);
$mp = $themec->getMarketplace();
$mes->addSuccess("Connecting...");
if($mp->download($data['id'], $data['mode'], 'theme'))
{
// Auto install?
// $text = e107::getPlugin()->install($data['plugin_folder']);
// $mes->addInfo($text);
echo $mes->render('default', 'success');
}
else
{
echo $mes->addError('Unable to continue')->render('default', 'error');
}
echo $mes->render('default', 'debug');
}
elseif(vartrue($_POST['selectadmin']))
{
$mode = "admin";
}