mirror of
https://github.com/e107inc/e107.git
synced 2025-08-07 15:16:30 +02:00
Fixes #1712- Theme download with suhosin active fixed. Plugin auto-install after download fixed.
This commit is contained in:
@@ -666,7 +666,7 @@ class pluginManager{
|
|||||||
// XXX Suhosin has a 512 char limit for $_GET strings.
|
// XXX Suhosin has a 512 char limit for $_GET strings.
|
||||||
e107::getDebug()->log($data['plugin_name'].' : '.strlen($base64)."<br />".print_a($data,true)); //FIXME - enable when needed to debug.
|
e107::getDebug()->log($data['plugin_name'].' : '.strlen($base64)."<br />".print_a($data,true)); //FIXME - enable when needed to debug.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Temporary Pop-up version.
|
// Temporary Pop-up version.
|
||||||
// $dicon = '<a class="e-modal" href="'.$data['plugin_url'].'" rel="external" data-modal-caption="'.$data['plugin_name']." ".$data['plugin_version'].'" target="_blank" ><img class="top" src="'.e_IMAGE_ABS.'icons/download_32.png" alt="" /></a>';
|
// $dicon = '<a class="e-modal" href="'.$data['plugin_url'].'" rel="external" data-modal-caption="'.$data['plugin_name']." ".$data['plugin_version'].'" target="_blank" ><img class="top" src="'.e_IMAGE_ABS.'icons/download_32.png" alt="" /></a>';
|
||||||
|
|
||||||
@@ -718,6 +718,7 @@ class pluginManager{
|
|||||||
|
|
||||||
if($mp->download($data['plugin_id'], $data['plugin_mode'], 'plugin'))
|
if($mp->download($data['plugin_id'], $data['plugin_mode'], 'plugin'))
|
||||||
{
|
{
|
||||||
|
$this -> pluginCheck(true); // rescan the plugin directory
|
||||||
$text = e107::getPlugin()->install($data['plugin_folder']);
|
$text = e107::getPlugin()->install($data['plugin_folder']);
|
||||||
|
|
||||||
$mes->addInfo($text);
|
$mes->addInfo($text);
|
||||||
|
@@ -164,6 +164,17 @@ if($mode == 'download' && !empty($_GET['src']))
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(e_DEBUG === true)
|
||||||
|
{
|
||||||
|
echo "<b>DEBUG MODE ACTIVE (no downloading)</b><br />";
|
||||||
|
echo '$_GET: ';
|
||||||
|
print_a($_GET);
|
||||||
|
|
||||||
|
echo 'base64 decoded and parsed as $data:';
|
||||||
|
print_a($data);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$mp = $themec->getMarketplace();
|
$mp = $themec->getMarketplace();
|
||||||
$mes->addSuccess(TPVLAN_85);
|
$mes->addSuccess(TPVLAN_85);
|
||||||
|
@@ -1076,9 +1076,17 @@ class themeHandler
|
|||||||
|
|
||||||
if($_GET['mode'] == 'online')
|
if($_GET['mode'] == 'online')
|
||||||
{
|
{
|
||||||
|
$srcData = array(
|
||||||
|
'id' => $theme['id'],
|
||||||
|
'url' => $theme['url'],
|
||||||
|
'mode' => $theme['mode'],
|
||||||
|
'price' => $theme['price']
|
||||||
|
);
|
||||||
|
|
||||||
$d = http_build_query($theme,false,'&');
|
$d = http_build_query($srcData,false,'&');
|
||||||
$url = e_SELF."?src=".base64_encode($d);
|
$base64 = base64_encode($d);
|
||||||
|
// e107::getDebug()->log($theme['name'].': '.strlen($base64));
|
||||||
|
$url = e_SELF."?src=".$base64;
|
||||||
$id = $frm->name2id($theme['name']);
|
$id = $frm->name2id($theme['name']);
|
||||||
$LAN_DOWNLOAD = ($theme['price'] > 0) ? LAN_PURCHASE."/".LAN_DOWN_THEME : LAN_DOWN_THEME;
|
$LAN_DOWNLOAD = ($theme['price'] > 0) ? LAN_PURCHASE."/".LAN_DOWN_THEME : LAN_DOWN_THEME;
|
||||||
|
|
||||||
@@ -1095,7 +1103,7 @@ class themeHandler
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$downloadUrl = e_SELF.'?mode=download&action='.$action.'&src='.base64_encode($d);//$url.'&action=download';
|
$downloadUrl = e_SELF.'?mode=download&src='.base64_encode($d);//$url.'&action=download';
|
||||||
$infoUrl = $url.'&action=info';
|
$infoUrl = $url.'&action=info';
|
||||||
|
|
||||||
$viewUrl = $theme['url'];
|
$viewUrl = $theme['url'];
|
||||||
|
Reference in New Issue
Block a user