Added #31 feature to build fields and views dynamically via a sql dump. Fixed #29 to insure that a redirect loop does not occur easily. Made many other compiler improvements.

This commit is contained in:
2016-12-30 12:47:19 +02:00
parent 829384a56b
commit 0ae4e4f80d
388 changed files with 5052 additions and 3714 deletions

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.2.5
@build 22nd December, 2016
@version 2.2.6
@build 30th December, 2016
@created 30th April, 2015
@package Component Builder
@subpackage script.php
@ -1263,9 +1263,9 @@ class com_componentbuilderInstallerScript
$component->type_title = 'Componentbuilder Component';
$component->type_alias = 'com_componentbuilder.component';
$component->table = '{"special": {"dbtable": "#__componentbuilder_component","key": "id","type": "Component","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$component->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "readme","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","component_version":"component_version","short_description":"short_description","companyname":"companyname","author":"author","update_server_target":"update_server_target","php_helper_admin":"php_helper_admin","adduikit":"adduikit","sql":"sql","update_server_ftp":"update_server_ftp","add_email_helper":"add_email_helper","debug_linenr":"debug_linenr","php_helper_site":"php_helper_site","update_server":"update_server","add_php_preflight_install":"add_php_preflight_install","description":"description","bom":"bom","image":"image","add_css":"add_css","add_update_server":"add_update_server","php_helper_both":"php_helper_both","add_php_postflight_install":"add_php_postflight_install","php_admin_event":"php_admin_event","add_php_method_uninstall":"add_php_method_uninstall","php_site_event":"php_site_event","php_dashboard_methods":"php_dashboard_methods","name":"name","add_php_preflight_update":"add_php_preflight_update","email":"email","add_php_postflight_update":"add_php_postflight_update","website":"website","addreadme":"addreadme","number":"number","add_sales_server":"add_sales_server","copyright":"copyright","add_license":"add_license","license_type":"license_type","whmcs_key":"whmcs_key","creatuserhelper":"creatuserhelper","whmcs_url":"whmcs_url","addfootable":"addfootable","license":"license","css":"css","add_php_helper_both":"add_php_helper_both","add_php_helper_admin":"add_php_helper_admin","add_admin_event":"add_admin_event","add_php_helper_site":"add_php_helper_site","add_site_event":"add_site_event","add_sql":"add_sql","add_php_dashboard_methods":"add_php_dashboard_methods","php_preflight_install":"php_preflight_install","php_preflight_update":"php_preflight_update","php_postflight_install":"php_postflight_install","php_postflight_update":"php_postflight_update","php_method_uninstall":"php_method_uninstall","readme":"readme","not_required":"not_required","emptycontributors":"emptycontributors","sales_server_ftp":"sales_server_ftp"}}';
$component->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "readme","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","component_version":"component_version","short_description":"short_description","companyname":"companyname","author":"author","update_server_target":"update_server_target","add_php_helper_admin":"add_php_helper_admin","creatuserhelper":"creatuserhelper","add_sql":"add_sql","update_server_ftp":"update_server_ftp","css":"css","debug_linenr":"debug_linenr","add_php_helper_site":"add_php_helper_site","update_server":"update_server","description":"description","name":"name","bom":"bom","image":"image","addfootable":"addfootable","add_update_server":"add_update_server","add_php_helper_both":"add_php_helper_both","php_preflight_update":"php_preflight_update","add_admin_event":"add_admin_event","php_postflight_update":"php_postflight_update","add_site_event":"add_site_event","readme":"readme","add_php_dashboard_methods":"add_php_dashboard_methods","sales_server_ftp":"sales_server_ftp","php_preflight_install":"php_preflight_install","email":"email","php_postflight_install":"php_postflight_install","website":"website","php_method_uninstall":"php_method_uninstall","copyright":"copyright","not_required":"not_required","add_license":"add_license","buildcomp":"buildcomp","license_type":"license_type","whmcs_key":"whmcs_key","whmcs_url":"whmcs_url","adduikit":"adduikit","license":"license","add_css":"add_css","add_email_helper":"add_email_helper","php_helper_both":"php_helper_both","php_helper_admin":"php_helper_admin","php_admin_event":"php_admin_event","php_helper_site":"php_helper_site","php_site_event":"php_site_event","sql":"sql","php_dashboard_methods":"php_dashboard_methods","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","add_php_postflight_install":"add_php_postflight_install","add_php_postflight_update":"add_php_postflight_update","add_php_method_uninstall":"add_php_method_uninstall","addreadme":"addreadme","emptycontributors":"emptycontributors","add_sales_server":"add_sales_server","number":"number","buildcompsql":"buildcompsql"}}';
$component->router = 'ComponentbuilderHelperRoute::getComponentRoute';
$component->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/component.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","update_server_target","adduikit","add_email_helper","debug_linenr","add_php_preflight_install","add_css","add_update_server","add_php_postflight_install","add_php_method_uninstall","add_php_preflight_update","add_php_postflight_update","addreadme","number","add_sales_server","add_license","license_type","creatuserhelper","addfootable","add_php_helper_both","add_php_helper_admin","add_admin_event","add_php_helper_site","add_site_event","add_sql","add_php_dashboard_methods","not_required","emptycontributors"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}';
$component->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/component.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","update_server_target","add_php_helper_admin","creatuserhelper","add_sql","debug_linenr","add_php_helper_site","addfootable","add_update_server","add_php_helper_both","add_admin_event","add_site_event","add_php_dashboard_methods","not_required","add_license","buildcomp","license_type","adduikit","add_css","add_email_helper","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","addreadme","emptycontributors","add_sales_server","number"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}';
// Set the object into the content types table.
$component_Inserted = $db->insertObject('#__content_types', $component);
@ -1447,9 +1447,9 @@ class com_componentbuilderInstallerScript
$component->type_title = 'Componentbuilder Component';
$component->type_alias = 'com_componentbuilder.component';
$component->table = '{"special": {"dbtable": "#__componentbuilder_component","key": "id","type": "Component","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$component->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "readme","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","component_version":"component_version","short_description":"short_description","companyname":"companyname","author":"author","update_server_target":"update_server_target","php_helper_admin":"php_helper_admin","adduikit":"adduikit","sql":"sql","update_server_ftp":"update_server_ftp","add_email_helper":"add_email_helper","debug_linenr":"debug_linenr","php_helper_site":"php_helper_site","update_server":"update_server","add_php_preflight_install":"add_php_preflight_install","description":"description","bom":"bom","image":"image","add_css":"add_css","add_update_server":"add_update_server","php_helper_both":"php_helper_both","add_php_postflight_install":"add_php_postflight_install","php_admin_event":"php_admin_event","add_php_method_uninstall":"add_php_method_uninstall","php_site_event":"php_site_event","php_dashboard_methods":"php_dashboard_methods","name":"name","add_php_preflight_update":"add_php_preflight_update","email":"email","add_php_postflight_update":"add_php_postflight_update","website":"website","addreadme":"addreadme","number":"number","add_sales_server":"add_sales_server","copyright":"copyright","add_license":"add_license","license_type":"license_type","whmcs_key":"whmcs_key","creatuserhelper":"creatuserhelper","whmcs_url":"whmcs_url","addfootable":"addfootable","license":"license","css":"css","add_php_helper_both":"add_php_helper_both","add_php_helper_admin":"add_php_helper_admin","add_admin_event":"add_admin_event","add_php_helper_site":"add_php_helper_site","add_site_event":"add_site_event","add_sql":"add_sql","add_php_dashboard_methods":"add_php_dashboard_methods","php_preflight_install":"php_preflight_install","php_preflight_update":"php_preflight_update","php_postflight_install":"php_postflight_install","php_postflight_update":"php_postflight_update","php_method_uninstall":"php_method_uninstall","readme":"readme","not_required":"not_required","emptycontributors":"emptycontributors","sales_server_ftp":"sales_server_ftp"}}';
$component->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "readme","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","component_version":"component_version","short_description":"short_description","companyname":"companyname","author":"author","update_server_target":"update_server_target","add_php_helper_admin":"add_php_helper_admin","creatuserhelper":"creatuserhelper","add_sql":"add_sql","update_server_ftp":"update_server_ftp","css":"css","debug_linenr":"debug_linenr","add_php_helper_site":"add_php_helper_site","update_server":"update_server","description":"description","name":"name","bom":"bom","image":"image","addfootable":"addfootable","add_update_server":"add_update_server","add_php_helper_both":"add_php_helper_both","php_preflight_update":"php_preflight_update","add_admin_event":"add_admin_event","php_postflight_update":"php_postflight_update","add_site_event":"add_site_event","readme":"readme","add_php_dashboard_methods":"add_php_dashboard_methods","sales_server_ftp":"sales_server_ftp","php_preflight_install":"php_preflight_install","email":"email","php_postflight_install":"php_postflight_install","website":"website","php_method_uninstall":"php_method_uninstall","copyright":"copyright","not_required":"not_required","add_license":"add_license","buildcomp":"buildcomp","license_type":"license_type","whmcs_key":"whmcs_key","whmcs_url":"whmcs_url","adduikit":"adduikit","license":"license","add_css":"add_css","add_email_helper":"add_email_helper","php_helper_both":"php_helper_both","php_helper_admin":"php_helper_admin","php_admin_event":"php_admin_event","php_helper_site":"php_helper_site","php_site_event":"php_site_event","sql":"sql","php_dashboard_methods":"php_dashboard_methods","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","add_php_postflight_install":"add_php_postflight_install","add_php_postflight_update":"add_php_postflight_update","add_php_method_uninstall":"add_php_method_uninstall","addreadme":"addreadme","emptycontributors":"emptycontributors","add_sales_server":"add_sales_server","number":"number","buildcompsql":"buildcompsql"}}';
$component->router = 'ComponentbuilderHelperRoute::getComponentRoute';
$component->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/component.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","update_server_target","adduikit","add_email_helper","debug_linenr","add_php_preflight_install","add_css","add_update_server","add_php_postflight_install","add_php_method_uninstall","add_php_preflight_update","add_php_postflight_update","addreadme","number","add_sales_server","add_license","license_type","creatuserhelper","addfootable","add_php_helper_both","add_php_helper_admin","add_admin_event","add_php_helper_site","add_site_event","add_sql","add_php_dashboard_methods","not_required","emptycontributors"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}';
$component->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/component.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","update_server_target","add_php_helper_admin","creatuserhelper","add_sql","debug_linenr","add_php_helper_site","addfootable","add_update_server","add_php_helper_both","add_admin_event","add_site_event","add_php_dashboard_methods","not_required","add_license","buildcomp","license_type","adduikit","add_css","add_email_helper","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","addreadme","emptycontributors","add_sales_server","number"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}';
// Check if component type is already in content_type DB.
$component_id = null;
@ -1823,7 +1823,7 @@ class com_componentbuilderInstallerScript
echo '<a target="_blank" href="http://vdm.bz/component-builder" title="Component Builder">
<img src="components/com_componentbuilder/assets/images/component-300.jpg"/>
</a>
<h3>Upgrade to Version 2.2.5 Was Successful! Let us know if anything is not working as expected.</h3>';
<h3>Upgrade to Version 2.2.6 Was Successful! Let us know if anything is not working as expected.</h3>';
}
}
}