diff --git a/e107_admin/plugin.php b/e107_admin/plugin.php
index 06a833034..54c73e7df 100644
--- a/e107_admin/plugin.php
+++ b/e107_admin/plugin.php
@@ -700,7 +700,7 @@ class pluginManager{
$string = base64_decode($_GET['src']);
parse_str($string, $data);
- if(e_DEBUG === true)
+ if(deftrue('e_DEBUG_MARKETPLACE'))
{
echo "DEBUG MODE ACTIVE (no downloading)
";
echo '$_GET[src]: ';
diff --git a/e107_admin/theme.php b/e107_admin/theme.php
index 247f63f17..3e207df9e 100644
--- a/e107_admin/theme.php
+++ b/e107_admin/theme.php
@@ -165,7 +165,7 @@ if($mode == 'download' && !empty($_GET['src']))
return true;
}
- if(e_DEBUG === true)
+ if(deftrue('e_DEBUG_MARKETPLACE'))
{
echo "DEBUG MODE ACTIVE (no downloading)
";
echo '$_GET: ';
diff --git a/e107_handlers/file_class.php b/e107_handlers/file_class.php
index 5f30f209d..e5bd00a84 100644
--- a/e107_handlers/file_class.php
+++ b/e107_handlers/file_class.php
@@ -1338,6 +1338,7 @@ class e_file
for($i = 0; $i < $zip->numFiles; $i++ )
{
$filename = $zip->getNameIndex($i);
+
$fileinfo = pathinfo($filename);
if($fileinfo['dirname'] === '.')
@@ -1345,6 +1346,10 @@ class e_file
$dir = $fileinfo['basename'];
break;
}
+ elseif($fileinfo['basename'] === 'plugin.php' || $fileinfo['basename'] === 'theme.php')
+ {
+ $dir = $fileinfo['dirname'];
+ }
// $stat = $zip->statIndex( $i );
// print_a( $stat['name'] );
@@ -1354,10 +1359,18 @@ class e_file
$zip->extractTo(e_TEMP);
chmod(e_TEMP.$dir, 0755);
+ if(empty($dir) && e_DEBUG)
+ {
+ print_a($fileinfo);
+ }
+
+
$zip->close();
}
+
+
}
else // Legacy Method.
{