Added the GUI switch to control the adding of the asset table fix. gh-616

This commit is contained in:
2020-12-10 03:24:29 +02:00
parent a05efdbb33
commit b65d868a86
16 changed files with 1547 additions and 1307 deletions

File diff suppressed because it is too large Load Diff

View File

@ -89,33 +89,13 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
'css_site'
)
),
'dynamic_integration' => array(
'left' => array(
'add_update_server',
'update_server_url',
'update_server_target',
'note_update_server_note_ftp',
'note_update_server_note_zip',
'note_update_server_note_other',
'update_server',
'add_sales_server',
'sales_server'
),
'right' => array(
'translation_tool',
'note_crowdin',
'crowdin_project_identifier',
'crowdin_project_api_key',
'crowdin_username',
'crowdin_account_api_key'
)
),
'mysql' => array(
'fullwidth' => array(
'add_sql',
'sql',
'add_sql_uninstall',
'sql_uninstall'
'sql_uninstall',
'assets_table_fix'
)
),
'dash_install' => array(
@ -140,6 +120,27 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
'php_method_uninstall'
)
),
'dynamic_integration' => array(
'left' => array(
'add_update_server',
'update_server_url',
'update_server_target',
'note_update_server_note_ftp',
'note_update_server_note_zip',
'note_update_server_note_other',
'update_server',
'add_sales_server',
'sales_server'
),
'right' => array(
'translation_tool',
'note_crowdin',
'crowdin_project_identifier',
'crowdin_project_api_key',
'crowdin_username',
'crowdin_account_api_key'
)
),
'readme' => array(
'left' => array(
'addreadme',
@ -339,70 +340,34 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$item->metadata = $registry->toArray();
}
if (!empty($item->buildcompsql))
{
// base64 Decode buildcompsql.
$item->buildcompsql = base64_decode($item->buildcompsql);
}
if (!empty($item->php_helper_both))
{
// base64 Decode php_helper_both.
$item->php_helper_both = base64_decode($item->php_helper_both);
}
if (!empty($item->php_helper_admin))
{
// base64 Decode php_helper_admin.
$item->php_helper_admin = base64_decode($item->php_helper_admin);
}
if (!empty($item->php_admin_event))
{
// base64 Decode php_admin_event.
$item->php_admin_event = base64_decode($item->php_admin_event);
}
if (!empty($item->php_helper_site))
{
// base64 Decode php_helper_site.
$item->php_helper_site = base64_decode($item->php_helper_site);
}
if (!empty($item->php_site_event))
{
// base64 Decode php_site_event.
$item->php_site_event = base64_decode($item->php_site_event);
}
if (!empty($item->javascript))
{
// base64 Decode javascript.
$item->javascript = base64_decode($item->javascript);
}
if (!empty($item->css_admin))
{
// base64 Decode css_admin.
$item->css_admin = base64_decode($item->css_admin);
}
if (!empty($item->css_site))
if (!empty($item->php_helper_both))
{
// base64 Decode css_site.
$item->css_site = base64_decode($item->css_site);
// 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_admin_event))
{
// base64 Decode php_preflight_install.
$item->php_preflight_install = base64_decode($item->php_preflight_install);
// base64 Decode php_admin_event.
$item->php_admin_event = base64_decode($item->php_admin_event);
}
if (!empty($item->php_preflight_update))
if (!empty($item->sql_uninstall))
{
// base64 Decode php_preflight_update.
$item->php_preflight_update = base64_decode($item->php_preflight_update);
// base64 Decode sql_uninstall.
$item->sql_uninstall = base64_decode($item->sql_uninstall);
}
if (!empty($item->php_postflight_install))
@ -411,10 +376,10 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$item->php_postflight_install = base64_decode($item->php_postflight_install);
}
if (!empty($item->php_postflight_update))
if (!empty($item->php_preflight_install))
{
// base64 Decode php_postflight_update.
$item->php_postflight_update = base64_decode($item->php_postflight_update);
// base64 Decode php_preflight_install.
$item->php_preflight_install = base64_decode($item->php_preflight_install);
}
if (!empty($item->php_method_uninstall))
@ -423,16 +388,52 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$item->php_method_uninstall = base64_decode($item->php_method_uninstall);
}
if (!empty($item->php_helper_admin))
{
// base64 Decode php_helper_admin.
$item->php_helper_admin = base64_decode($item->php_helper_admin);
}
if (!empty($item->php_helper_site))
{
// base64 Decode php_helper_site.
$item->php_helper_site = base64_decode($item->php_helper_site);
}
if (!empty($item->javascript))
{
// base64 Decode javascript.
$item->javascript = base64_decode($item->javascript);
}
if (!empty($item->css_site))
{
// 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->sql_uninstall))
if (!empty($item->buildcompsql))
{
// base64 Decode sql_uninstall.
$item->sql_uninstall = base64_decode($item->sql_uninstall);
// base64 Decode buildcompsql.
$item->buildcompsql = base64_decode($item->buildcompsql);
}
if (!empty($item->readme))
@ -446,18 +447,18 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
// Get the encryption object.
$basic = new FOFEncryptAes($basickey);
if (!empty($item->crowdin_username) && $basickey && !is_numeric($item->crowdin_username) && $item->crowdin_username === base64_encode(base64_decode($item->crowdin_username, true)))
{
// basic decrypt data crowdin_username.
$item->crowdin_username = rtrim($basic->decryptString($item->crowdin_username), "\0");
}
if (!empty($item->whmcs_key) && $basickey && !is_numeric($item->whmcs_key) && $item->whmcs_key === base64_encode(base64_decode($item->whmcs_key, true)))
{
// basic decrypt data whmcs_key.
$item->whmcs_key = rtrim($basic->decryptString($item->whmcs_key), "\0");
}
if (!empty($item->crowdin_username) && $basickey && !is_numeric($item->crowdin_username) && $item->crowdin_username === base64_encode(base64_decode($item->crowdin_username, true)))
{
// basic decrypt data crowdin_username.
$item->crowdin_username = rtrim($basic->decryptString($item->crowdin_username), "\0");
}
if (!empty($item->export_key) && $basickey && !is_numeric($item->export_key) && $item->export_key === base64_encode(base64_decode($item->export_key, true)))
{
// basic decrypt data export_key.
@ -1412,70 +1413,34 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$data['addcontributors'] = '';
}
// Set the buildcompsql string to base64 string.
if (isset($data['buildcompsql']))
{
$data['buildcompsql'] = base64_encode($data['buildcompsql']);
}
// 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']);
}
// Set the php_helper_admin string to base64 string.
if (isset($data['php_helper_admin']))
{
$data['php_helper_admin'] = base64_encode($data['php_helper_admin']);
}
// Set the php_admin_event string to base64 string.
if (isset($data['php_admin_event']))
{
$data['php_admin_event'] = base64_encode($data['php_admin_event']);
}
// Set the php_helper_site string to base64 string.
if (isset($data['php_helper_site']))
{
$data['php_helper_site'] = base64_encode($data['php_helper_site']);
}
// Set the php_site_event string to base64 string.
if (isset($data['php_site_event']))
{
$data['php_site_event'] = base64_encode($data['php_site_event']);
}
// Set the javascript string to base64 string.
if (isset($data['javascript']))
{
$data['javascript'] = base64_encode($data['javascript']);
}
// Set the css_admin string to base64 string.
if (isset($data['css_admin']))
{
$data['css_admin'] = base64_encode($data['css_admin']);
}
// Set the css_site string to base64 string.
if (isset($data['css_site']))
// Set the php_helper_both string to base64 string.
if (isset($data['php_helper_both']))
{
$data['css_site'] = base64_encode($data['css_site']);
$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_admin_event string to base64 string.
if (isset($data['php_admin_event']))
{
$data['php_preflight_install'] = base64_encode($data['php_preflight_install']);
$data['php_admin_event'] = base64_encode($data['php_admin_event']);
}
// Set the php_preflight_update string to base64 string.
if (isset($data['php_preflight_update']))
// Set the sql_uninstall string to base64 string.
if (isset($data['sql_uninstall']))
{
$data['php_preflight_update'] = base64_encode($data['php_preflight_update']);
$data['sql_uninstall'] = base64_encode($data['sql_uninstall']);
}
// Set the php_postflight_install string to base64 string.
@ -1484,10 +1449,10 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$data['php_postflight_install'] = base64_encode($data['php_postflight_install']);
}
// Set the php_postflight_update string to base64 string.
if (isset($data['php_postflight_update']))
// Set the php_preflight_install string to base64 string.
if (isset($data['php_preflight_install']))
{
$data['php_postflight_update'] = base64_encode($data['php_postflight_update']);
$data['php_preflight_install'] = base64_encode($data['php_preflight_install']);
}
// Set the php_method_uninstall string to base64 string.
@ -1496,16 +1461,52 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$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']))
{
$data['php_helper_admin'] = base64_encode($data['php_helper_admin']);
}
// Set the php_helper_site string to base64 string.
if (isset($data['php_helper_site']))
{
$data['php_helper_site'] = base64_encode($data['php_helper_site']);
}
// Set the javascript string to base64 string.
if (isset($data['javascript']))
{
$data['javascript'] = base64_encode($data['javascript']);
}
// Set the css_site string to base64 string.
if (isset($data['css_site']))
{
$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 sql_uninstall string to base64 string.
if (isset($data['sql_uninstall']))
// Set the buildcompsql string to base64 string.
if (isset($data['buildcompsql']))
{
$data['sql_uninstall'] = base64_encode($data['sql_uninstall']);
$data['buildcompsql'] = base64_encode($data['buildcompsql']);
}
// Set the readme string to base64 string.
@ -1519,18 +1520,18 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
// Get the encryption object
$basic = new FOFEncryptAes($basickey);
// Encrypt data crowdin_username.
if (isset($data['crowdin_username']) && $basickey)
{
$data['crowdin_username'] = $basic->encryptString($data['crowdin_username']);
}
// Encrypt data whmcs_key.
if (isset($data['whmcs_key']) && $basickey)
{
$data['whmcs_key'] = $basic->encryptString($data['whmcs_key']);
}
// Encrypt data crowdin_username.
if (isset($data['crowdin_username']) && $basickey)
{
$data['crowdin_username'] = $basic->encryptString($data['crowdin_username']);
}
// Encrypt data export_key.
if (isset($data['export_key']) && $basickey)
{

View File

@ -2395,6 +2395,41 @@ class ComponentbuilderModelJoomla_components extends JModelList
continue;
}
// decode php_site_event
$item->php_site_event = base64_decode($item->php_site_event);
// decode css_admin
$item->css_admin = base64_decode($item->css_admin);
// decode php_helper_both
$item->php_helper_both = base64_decode($item->php_helper_both);
// decode php_admin_event
$item->php_admin_event = base64_decode($item->php_admin_event);
// decode sql_uninstall
$item->sql_uninstall = base64_decode($item->sql_uninstall);
// decode php_postflight_install
$item->php_postflight_install = base64_decode($item->php_postflight_install);
// decode php_preflight_install
$item->php_preflight_install = base64_decode($item->php_preflight_install);
// decode php_method_uninstall
$item->php_method_uninstall = base64_decode($item->php_method_uninstall);
// decode php_helper_admin
$item->php_helper_admin = base64_decode($item->php_helper_admin);
// decode php_helper_site
$item->php_helper_site = base64_decode($item->php_helper_site);
// decode javascript
$item->javascript = base64_decode($item->javascript);
// decode css_site
$item->css_site = base64_decode($item->css_site);
if ($basickey && !is_numeric($item->whmcs_key) && $item->whmcs_key === base64_encode(base64_decode($item->whmcs_key, true)))
{
// decrypt whmcs_key
$item->whmcs_key = $basic->decryptString($item->whmcs_key);
}
// decode php_preflight_update
$item->php_preflight_update = base64_decode($item->php_preflight_update);
// decode php_postflight_update
$item->php_postflight_update = base64_decode($item->php_postflight_update);
// decode sql
$item->sql = base64_decode($item->sql);
if ($basickey && !is_numeric($item->crowdin_username) && $item->crowdin_username === base64_encode(base64_decode($item->crowdin_username, true)))
{
// decrypt crowdin_username
@ -2402,46 +2437,11 @@ class ComponentbuilderModelJoomla_components extends JModelList
}
// decode buildcompsql
$item->buildcompsql = base64_decode($item->buildcompsql);
if ($basickey && !is_numeric($item->whmcs_key) && $item->whmcs_key === base64_encode(base64_decode($item->whmcs_key, true)))
{
// decrypt whmcs_key
$item->whmcs_key = $basic->decryptString($item->whmcs_key);
}
// decode php_helper_both
$item->php_helper_both = base64_decode($item->php_helper_both);
// decode php_helper_admin
$item->php_helper_admin = base64_decode($item->php_helper_admin);
// decode php_admin_event
$item->php_admin_event = base64_decode($item->php_admin_event);
// decode php_helper_site
$item->php_helper_site = base64_decode($item->php_helper_site);
// decode php_site_event
$item->php_site_event = base64_decode($item->php_site_event);
// decode javascript
$item->javascript = base64_decode($item->javascript);
// decode css_admin
$item->css_admin = base64_decode($item->css_admin);
// decode css_site
$item->css_site = base64_decode($item->css_site);
// decode php_preflight_install
$item->php_preflight_install = base64_decode($item->php_preflight_install);
// decode php_preflight_update
$item->php_preflight_update = base64_decode($item->php_preflight_update);
if ($basickey && !is_numeric($item->export_key) && $item->export_key === base64_encode(base64_decode($item->export_key, true)))
{
// decrypt export_key
$item->export_key = $basic->decryptString($item->export_key);
}
// decode php_postflight_install
$item->php_postflight_install = base64_decode($item->php_postflight_install);
// decode php_postflight_update
$item->php_postflight_update = base64_decode($item->php_postflight_update);
// decode php_method_uninstall
$item->php_method_uninstall = base64_decode($item->php_method_uninstall);
// decode sql
$item->sql = base64_decode($item->sql);
// decode sql_uninstall
$item->sql_uninstall = base64_decode($item->sql_uninstall);
// decode readme
$item->readme = base64_decode($item->readme);
if ($basickey && !is_numeric($item->crowdin_project_api_key) && $item->crowdin_project_api_key === base64_encode(base64_decode($item->crowdin_project_api_key, true)))