Fixed gh-315 to insure all the WHMCS features work as expected

This commit is contained in:
2018-07-08 22:18:32 +02:00
parent 3a4a0e613b
commit 0ca49414d2
16 changed files with 578 additions and 510 deletions

View File

@ -86,58 +86,34 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$item->metadata = $registry->toArray();
}
if (!empty($item->php_preflight_update))
if (!empty($item->php_preflight_install))
{
// base64 Decode php_preflight_update.
$item->php_preflight_update = base64_decode($item->php_preflight_update);
// base64 Decode php_preflight_install.
$item->php_preflight_install = base64_decode($item->php_preflight_install);
}
if (!empty($item->css_site))
if (!empty($item->php_postflight_install))
{
// base64 Decode css_site.
$item->css_site = base64_decode($item->css_site);
// base64 Decode php_postflight_install.
$item->php_postflight_install = base64_decode($item->php_postflight_install);
}
if (!empty($item->php_helper_site))
if (!empty($item->css_admin))
{
// base64 Decode php_helper_site.
$item->php_helper_site = base64_decode($item->php_helper_site);
// base64 Decode css_admin.
$item->css_admin = base64_decode($item->css_admin);
}
if (!empty($item->javascript))
if (!empty($item->php_method_uninstall))
{
// base64 Decode javascript.
$item->javascript = base64_decode($item->javascript);
// base64 Decode php_method_uninstall.
$item->php_method_uninstall = base64_decode($item->php_method_uninstall);
}
if (!empty($item->php_helper_admin))
if (!empty($item->sql_uninstall))
{
// base64 Decode php_helper_admin.
$item->php_helper_admin = base64_decode($item->php_helper_admin);
}
if (!empty($item->readme))
{
// base64 Decode readme.
$item->readme = base64_decode($item->readme);
}
if (!empty($item->php_postflight_update))
{
// base64 Decode php_postflight_update.
$item->php_postflight_update = base64_decode($item->php_postflight_update);
}
if (!empty($item->sql))
{
// base64 Decode sql.
$item->sql = base64_decode($item->sql);
}
if (!empty($item->php_helper_both))
{
// base64 Decode php_helper_both.
$item->php_helper_both = base64_decode($item->php_helper_both);
// base64 Decode sql_uninstall.
$item->sql_uninstall = base64_decode($item->sql_uninstall);
}
if (!empty($item->php_admin_event))
@ -152,34 +128,58 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$item->php_site_event = base64_decode($item->php_site_event);
}
if (!empty($item->css_admin))
if (!empty($item->php_helper_both))
{
// base64 Decode css_admin.
$item->css_admin = base64_decode($item->css_admin);
// base64 Decode php_helper_both.
$item->php_helper_both = base64_decode($item->php_helper_both);
}
if (!empty($item->php_preflight_install))
if (!empty($item->php_helper_admin))
{
// base64 Decode php_preflight_install.
$item->php_preflight_install = base64_decode($item->php_preflight_install);
// base64 Decode php_helper_admin.
$item->php_helper_admin = base64_decode($item->php_helper_admin);
}
if (!empty($item->php_postflight_install))
if (!empty($item->php_helper_site))
{
// base64 Decode php_postflight_install.
$item->php_postflight_install = base64_decode($item->php_postflight_install);
// base64 Decode php_helper_site.
$item->php_helper_site = base64_decode($item->php_helper_site);
}
if (!empty($item->php_method_uninstall))
if (!empty($item->javascript))
{
// base64 Decode php_method_uninstall.
$item->php_method_uninstall = base64_decode($item->php_method_uninstall);
// base64 Decode javascript.
$item->javascript = base64_decode($item->javascript);
}
if (!empty($item->sql_uninstall))
if (!empty($item->css_site))
{
// base64 Decode sql_uninstall.
$item->sql_uninstall = base64_decode($item->sql_uninstall);
// base64 Decode css_site.
$item->css_site = base64_decode($item->css_site);
}
if (!empty($item->php_preflight_update))
{
// base64 Decode php_preflight_update.
$item->php_preflight_update = base64_decode($item->php_preflight_update);
}
if (!empty($item->php_postflight_update))
{
// base64 Decode php_postflight_update.
$item->php_postflight_update = base64_decode($item->php_postflight_update);
}
if (!empty($item->sql))
{
// base64 Decode sql.
$item->sql = base64_decode($item->sql);
}
if (!empty($item->readme))
{
// base64 Decode readme.
$item->readme = base64_decode($item->readme);
}
if (!empty($item->buildcompsql))
@ -1071,58 +1071,34 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$data['addcontributors'] = '';
}
// Set the php_preflight_update string to base64 string.
if (isset($data['php_preflight_update']))
// Set the php_preflight_install string to base64 string.
if (isset($data['php_preflight_install']))
{
$data['php_preflight_update'] = base64_encode($data['php_preflight_update']);
$data['php_preflight_install'] = base64_encode($data['php_preflight_install']);
}
// Set the css_site string to base64 string.
if (isset($data['css_site']))
// Set the php_postflight_install string to base64 string.
if (isset($data['php_postflight_install']))
{
$data['css_site'] = base64_encode($data['css_site']);
$data['php_postflight_install'] = base64_encode($data['php_postflight_install']);
}
// Set the php_helper_site string to base64 string.
if (isset($data['php_helper_site']))
// Set the css_admin string to base64 string.
if (isset($data['css_admin']))
{
$data['php_helper_site'] = base64_encode($data['php_helper_site']);
$data['css_admin'] = base64_encode($data['css_admin']);
}
// Set the javascript string to base64 string.
if (isset($data['javascript']))
// Set the php_method_uninstall string to base64 string.
if (isset($data['php_method_uninstall']))
{
$data['javascript'] = base64_encode($data['javascript']);
$data['php_method_uninstall'] = base64_encode($data['php_method_uninstall']);
}
// Set the php_helper_admin string to base64 string.
if (isset($data['php_helper_admin']))
// Set the sql_uninstall string to base64 string.
if (isset($data['sql_uninstall']))
{
$data['php_helper_admin'] = base64_encode($data['php_helper_admin']);
}
// Set the readme string to base64 string.
if (isset($data['readme']))
{
$data['readme'] = base64_encode($data['readme']);
}
// Set the php_postflight_update string to base64 string.
if (isset($data['php_postflight_update']))
{
$data['php_postflight_update'] = base64_encode($data['php_postflight_update']);
}
// Set the sql string to base64 string.
if (isset($data['sql']))
{
$data['sql'] = base64_encode($data['sql']);
}
// Set the php_helper_both string to base64 string.
if (isset($data['php_helper_both']))
{
$data['php_helper_both'] = base64_encode($data['php_helper_both']);
$data['sql_uninstall'] = base64_encode($data['sql_uninstall']);
}
// Set the php_admin_event string to base64 string.
@ -1137,34 +1113,58 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$data['php_site_event'] = base64_encode($data['php_site_event']);
}
// Set the css_admin string to base64 string.
if (isset($data['css_admin']))
// Set the php_helper_both string to base64 string.
if (isset($data['php_helper_both']))
{
$data['css_admin'] = base64_encode($data['css_admin']);
$data['php_helper_both'] = base64_encode($data['php_helper_both']);
}
// Set the php_preflight_install string to base64 string.
if (isset($data['php_preflight_install']))
// Set the php_helper_admin string to base64 string.
if (isset($data['php_helper_admin']))
{
$data['php_preflight_install'] = base64_encode($data['php_preflight_install']);
$data['php_helper_admin'] = base64_encode($data['php_helper_admin']);
}
// Set the php_postflight_install string to base64 string.
if (isset($data['php_postflight_install']))
// Set the php_helper_site string to base64 string.
if (isset($data['php_helper_site']))
{
$data['php_postflight_install'] = base64_encode($data['php_postflight_install']);
$data['php_helper_site'] = base64_encode($data['php_helper_site']);
}
// Set the php_method_uninstall string to base64 string.
if (isset($data['php_method_uninstall']))
// Set the javascript string to base64 string.
if (isset($data['javascript']))
{
$data['php_method_uninstall'] = base64_encode($data['php_method_uninstall']);
$data['javascript'] = base64_encode($data['javascript']);
}
// Set the sql_uninstall string to base64 string.
if (isset($data['sql_uninstall']))
// Set the css_site string to base64 string.
if (isset($data['css_site']))
{
$data['sql_uninstall'] = base64_encode($data['sql_uninstall']);
$data['css_site'] = base64_encode($data['css_site']);
}
// Set the php_preflight_update string to base64 string.
if (isset($data['php_preflight_update']))
{
$data['php_preflight_update'] = base64_encode($data['php_preflight_update']);
}
// Set the php_postflight_update string to base64 string.
if (isset($data['php_postflight_update']))
{
$data['php_postflight_update'] = base64_encode($data['php_postflight_update']);
}
// Set the sql string to base64 string.
if (isset($data['sql']))
{
$data['sql'] = base64_encode($data['sql']);
}
// Set the readme string to base64 string.
if (isset($data['readme']))
{
$data['readme'] = base64_encode($data['readme']);
}
// Set the buildcompsql string to base64 string.